Friday, November 21, 2014

virtualbox command to change configuration of virtual machine

1) change the disk size of centos4
http://scott2595.blogspot.com/2014/02/change-size-of-hard-disk-of-virtual.html

2) command to resize a vdi disk
VBoxManage.exe modifyhd ubuntu12_copy.vdi --resize 100000

3) command to clone a vdi disk
http://scott2595.blogspot.com/2014/02/vboxmanagevbox.html

4) command to change the uuid of a vdi disk
VBoxManage.exe internalcommands sethduuid  ubuntu12_copy.vdi

5) command to compact a vdi disk
In linux virtual machine:
sudo dd if=/dev/zero of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile

In host:
VBoxManage.exe modifyhd ubuntu12_copy.vdi --compact