howtothings.co.uk
How to convert virtual hard drive files VDI, VMDK, VHD and RAW using VBoxManage - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Operating System and Software Support (https://www.howtothings.co.uk/forumdisplay.php?fid=17)
+--- Thread: How to convert virtual hard drive files VDI, VMDK, VHD and RAW using VBoxManage (/showthread.php?tid=1316)



How to convert virtual hard drive files VDI, VMDK, VHD and RAW using VBoxManage - Mark - 15-09-2013


How to convert virtual hard drive files VDI, VMDK, VHD and RAW using VBoxManage

I was trying to get an old virtual machine up and running again for testing and for some reason thought converting from a .vdi to .vhd would help.

I already had virtual box installed which means I already had the VBoxManage program.

Open a command prompt

Check VBoxManage syntax.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" /?

The bit we're interested in
clonehd <uuid|inputfile> <uuid|outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--existing]

What I used
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd "E:\Virtual Machines\VirtualBox\XP-Spiceworks\XP-Spiceworks.vdi" "E:\Virtual Machines\VirtualBox\XP-Spiceworks\XP-Spiceworks.vhd" --format VHD

Only took a few minutes to convert it

Files sizes
XP-Spiceworks.vdi 11,811,205,632
XP-Spiceworks.vhd 9,710,111,232