Reseting differencing VDI files
Posted: 31. Jan 2023, 18:08
Hi everyone,
I'm looking for a simple way to reset my VDI differencing files to their original size (which is usually about 2MB).
I'm using several VMs to automate our build process. They are all configured to use "immutable" VDIs (we want to be sure to use the exact same OS each time we build something),
This is working great, except that the "differencing" VDI is not reset to its initial size when the VM is stopped. Not a big issue, but we have lots of build machines, and this is starting to take some significant space. Also the process to shrink the VDI using the VirtualBox UI is a bit teddious.
So I'm just looking for either a way to tell VirtualBox to "shrink" the differencing VDIs on close / shutdown, or a simple command line that could shring the differencing VDI for a given machine (I've already tried the usual "vboxmanage modifyhd --compact" command, but it has no effect on differencing VDIs - vboxmanage seems to consider that their content is still useful).
Laurent
I'm looking for a simple way to reset my VDI differencing files to their original size (which is usually about 2MB).
I'm using several VMs to automate our build process. They are all configured to use "immutable" VDIs (we want to be sure to use the exact same OS each time we build something),
This is working great, except that the "differencing" VDI is not reset to its initial size when the VM is stopped. Not a big issue, but we have lots of build machines, and this is starting to take some significant space. Also the process to shrink the VDI using the VirtualBox UI is a bit teddious.
So I'm just looking for either a way to tell VirtualBox to "shrink" the differencing VDIs on close / shutdown, or a simple command line that could shring the differencing VDI for a given machine (I've already tried the usual "vboxmanage modifyhd --compact" command, but it has no effect on differencing VDIs - vboxmanage seems to consider that their content is still useful).
Laurent