Enlarge or reduce your Pisi Linux or Windows Virtualbox .vdi

Each one who use the VirtualBox for Windows Mac OS X or Linux , becomes after a while space problems at the .vdi when it is not big enough.

You can clean the virtual System no problem, but when you have after the cleaning not space enough , or you need more space at your Host-System and you would decrease the virtual media is with the Virtualbox no problem. A bit work at the command line and you have it.

At the first when you have open the Virtualbox, shutdown your System at the Virtualbox.

Reduce the .vdi

When you are ready open now at your Linux System a Terminal, and navigate to your .vdi image.

Now open a terminal window (Linux & Mac) Give in the command:

VBoxManage modifyhd /groni/VirtualBox VMs/Pisi Linux 2.0 test/Pisi Linux 2.0 test.vdi –compact

Replace the Pathnames with your name and path

You must not type the path manually, you can type first “VBoxManage modifyhd” press Enter, then pull the VDI file into the terminal window to copy the path, and then complete the string with -compact. Pressing the Enter key reduces the VDI file to what is necessary and the space on the host system is free again.

Enlarge the .vdi

Now open at your Linux / Mac OS X host system a terminal window. Navigate to a file manager for your VDI file and pulls it into the terminal: You become the Output from the path. Alternatively, you can notice the path and give it later in. On my system is the file, for example, /groni/VirtualBox VMs/Pisi Linux 2.0 test/Pisi Linux 2.0 test.vdi

Press now Enter to initiate a new input option. The error message can you ignore. Now Give the command
VBoxManage modifyhd (absolute path to the file) –resize (in megabytes) in. The values in parentheses your exchanges against what want to have, the path to the file and the desired size of the disk in megabytes. I want to increase the existing 30-gigabyte hard drive to 40 gigabytes (= 40,960 megabytes). In my example, this would look like this:

VBoxManage modifyhd /groni/VirtualBox VMs/Pisi Linux 2.0 test/Pisi Linux 2.0 test.vdi –resize 40960

Replace the Pathnames with your name and path

Confirms the entry with the Enter key, the percentage display shows you how the calculations run. Subsequently, the file is increased.

For Windows .vdi

Windows can the new memory not detect automatically, you have to there still afford some handles. So Starts your virtual Windows again and opens there the Disk Management, optionally via the search function or Control Panel -> System and Security -> Administrative Tools -> Create disk partitions and formatting. There you do not see unallocated space. Click the main partition of your virtual system C : with the right mouse button and choose “Upgrade Storage”.

Click your way now through the wizard. Normally you must not change the default settings, the Windows pretending: The entire unallocated space is now by the C: partition allocated. Click “Finish” to: The space is now available on Windows platforms and the dynamic virtual VirtualBox hard drive is adjusted to the desired size.