convert a vhd to vdi

Virtual PC and Virtual Box

Moderator: sjj1805

Post Reply
User avatar
sjj1805
Site Admin
Posts: 1194
Joined: Fri Oct 27, 2006 12:45 am
operating_system: Windows 10 Pro
motherboard: Hewlett Packard 2AF7
system_drive: C
32bit or 64bit: 64 Bit
processor: 2-90 gigahertz Intel Core i5 4460S
ram: 8 GB
video card: NVIDIA GeForce GT 705
sound card: P40D100-4 NVIDIA High Definition Audio
Hard_Drive_Capacity: 8 TB
Location: Birmingham UK
Contact:

convert a vhd to vdi

Post by sjj1805 » Thu Nov 20, 2008 1:12 am

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

User avatar
sjj1805
Site Admin
Posts: 1194
Joined: Fri Oct 27, 2006 12:45 am
operating_system: Windows 10 Pro
motherboard: Hewlett Packard 2AF7
system_drive: C
32bit or 64bit: 64 Bit
processor: 2-90 gigahertz Intel Core i5 4460S
ram: 8 GB
video card: NVIDIA GeForce GT 705
sound card: P40D100-4 NVIDIA High Definition Audio
Hard_Drive_Capacity: 8 TB
Location: Birmingham UK
Contact:

Re: convert a vhd to vdi

Post by sjj1805 » Tue Jan 29, 2013 2:48 am

This works:

Code: Select all

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

Post Reply