https://www.itsfullofstars.de/2020/03/s ... isk-image/
I used the below commands to add and remove the big empty file, and I shut down the VM.
Code: Select all
dd if=/dev/zero of=/var/dummy bs=8126k
rm /var/dummy
Screenshot:
Code: Select all
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifymedium --compact C:\my\vbox\path\to\vm-disk1.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "C:\my\vbox\path\to\vm-disk1.vdi" --compact
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
C:\Program Files\Oracle\VirtualBox>
I'm still wondering why the formal way didn't work in the first place? Any pointers will be highly appreciated.