Wednesday, August 10, 2016

Resizing disk space in Virtualbox virtual machine

If you need to increase your disk space in a virtual machine, if your disk is in vmdk format then you need to execute the following steps:

First you need to convert your disk to vdi by cloning.
Vdi can be resized and replace the vmdk disk in place. Just remove the vmdk in the settings
Internal partition needs to be resized this can be done by using the gparted iso:

http://gparted.sourceforge.net/download.php


Add the gparted as a cd iso and boot from it, resize the partition. In the next boot the system will recognize the new capacity

Vdi cloning and disk increase can be done with the following two commands:
  • VBoxManage clonehd "/home/nickapos/VirtualBox VMs/NCRWin7/NCRWin7-2016-06-27-disk1.vmdk" "/home/nickapos/VirtualBox VMs/NCRWin7/win7clone.vdi" --format vdi
  • VBoxManage modifyhd "/home/nickapos/VirtualBox VMs/NCRWin7/win7clone.vdi" --resize 100000



After that we are ready to boot. This will work with windows as well as linux. If you need to export your vm, there is a chance that Virtualbox will convert the image back to vmdk

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.