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.

Convert VDI to VMDK with VBoxManage

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

Advertisement

About Ronnie Diaz

Ronnie Diaz is a software engineer and tech consultant. Ronnie started his career in front-end and back-end development for companies in ecommerce, service industries and remote education. This work transitioned from traditional desktop client-server applications through early cloud development. Software included human resource management and service technician workflows, online retail e-commerce and electronic ordering and fulfillment, IVR customer relational systems, and video streaming remote learning SCORM web applications. Hands on server experience and software performance optimization led to creation of a startup business focused on collocated data center services and continued experience with video streaming hardware and software. This led to a career in Amazon Prime Video where Ronnie is currently employed, building software and systems which stream live sports and events for millions of viewers around the world.

Posted on July 15, 2012, in Programming & Development and tagged , , , , , , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: