Convert VDI to VMDK with VBoxManage
Cloning virtual HDs
First, make sure you have enough HD space to store both hard drive (images) so you can maintain original in case of failure/conversion corruption/power outage during conversion etc.
If this is on an external HD or remote drive, make sure both VM HDs on same drive otherwise the process will be slow and error prone.
Make sure VBoxManage.exe and its’ DLL dependencies are on harddrive where HDs are which is always good practice since you may never know if app was designed to work localized only.
Dependencies:
VBoxDDU.dll VBoxRT.dll
Open cmd prompt to the VBoxManage.exe path or follow my post to create batch shortcut from your start menu folder if you will be doing this again.
Enter VBoxManage clonehd source dest –format VMDK:
VBoxManage clonehd HardDisks/win7x86.vdi ./VMWare/HardDisks/win7x86.vmdk --format VMDK
Notice there are no quotes surrounding the source and dest paths since the pathnames do not have spaces. In general programming practice it is a simple habit not to use spaces to avoid issues parsing double quoted values or consecutive quoted values in the case of passed in parameters. If space is necessary, I usually use underscore _ instead.
If you’re new to command line, also notice the the dot slash in the dest path ./ and no root slash / in the source path. I moved VBoxManage.exe and its DLLs to my VirtualBox directory which contains the HardDisks folder so I did not need to specify the exact location of HardDisks since it is relative to VBoxManage. The dot slash tells VBoxManage to go up one level and then into the VMWare folder where it will create the vmdk file.
The clone will show progress indicators, and depending on size of file may take a while.
That’s it! Once finished, open up VMWare and create a new virtual machine using the existing vmdk you just created. (screenshot courtesy of ax)
References
My Blog, https://ronniediaz.com/2012/07/15/keep-batch-file-open-to-enter-more-commands/
http://www.dedoimedo.com/computers/virtualbox-convert.html
Posted on July 15, 2012, in Programming & Development and tagged convert, hard disk, machine, vboxmanage, vdi, virtual, virtual disk, virtual machine, vm, vmdk, vmware. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0