Page 1 of 1

convert a vhd to vdi

Posted: Thu Nov 20, 2008 1:12 am
by sjj1805
To convert a vhd to vdi:

If the vhd is not fixed-size, make it so, using Virtual PC's disk wizard

Start VirtualBox

Move the virtual disk to the \"Virtual Box\" Program Directory
M:\\Program Files\\Sun\\xVM VirtualBox

Open a CMD prompt and navigate to the \"Virtual Box\" Program Directory
M:\\Program Files\\Sun\\xVM VirtualBox

Code: Select all

vboxmanage convertdd the_disk.vhd the_disk.vdi
Make the vdi dynamic:

Code: Select all

vboxmanage modifyvdi the_disk.vdi compact
Note: ideally, you should delete (or exclude) the last 512 bytes of the vhd file before using convertdd, but it still works fine if you don't (the vdi disk will have an extra sector.)

Useful Links:
http://www.virtualbox.org/wiki/VirtualBox_architecture
http://blog.mdijksman.nl/item/65

Re: convert a vhd to vdi

Posted: Tue Jan 29, 2013 2:48 am
by sjj1805
This works:

Code: Select all

"C:\Program Files\Oracle\VirtualBox\VBOXMANAGE" clonehd "xpsp3 Hard Disk.vhd" XP.vdi --format vdi