![]() ![]() VBoxManage modifyhd box-disk1.vdi -compact In order to compact the disk, you need to convert it to VDI format using this command VBoxManage clonehd box-disk1.vmdk box-disk1.vdi -format vdi Write down the reported UUID because you will need it later. Of course, you have to change the name of the vmdk file if it is different. This command assumes that your working directory is the directory that contains the vmdk file. ![]() The command to do this is: vboxmanage showhdinfo box-disk1.vmdk You have to obtain the UUID of the disk you want to shrink. You have to navigate to the folder containing the files of the virtual machine having disk you want to compact and open terminal. Every machine has its own directory with name starting with the machine name. The virtual machines you have configured in VirtualBox are stored in folder “VirtualBox VMs” inside your home directory (or at least when Ubuntu is your host machine). Navigate to VirtualBox virtual machine folder ![]() Login into the virtual machine and run the following command: cat /dev/zero > zero.fill sync sleep 1 sync rm -f zero.fill VirtualBox only knows that the space is really free if it’s been set to zero, and standard deletion won’t do this. It is also easier to upload and share them with other people. vmdk) of your VirtualBox virtual machines so they consume less disk space. This guide explains how to shrink (compact) the virtual disk files (files having extension. ![]()
0 Comments
Leave a Reply. |