Converting VMware Images to VirtualBox – A Simple Method

Jun 20, 2009 by

When I need to run a Windows based application on my trusty Ubuntu Hardy box, I don’t use Wine. Don’t get me wrong, it’s just that I don’t want to have to manage the Wine environment and prefer to have Windows and it’s associated applications tucked away in it’s own virtual system. This way if I need to run a Windows application… I simply boot up the Windows system and run whatever application I want.

More importantly, I run several distributions of Linux in virtual environments. This way I don’t have to worry about multiboot configurations, bootloaders, etc. and I can simply delete or backup up a copy of images I don’t immediately need. To do this I use VirtualBox.

To get it: sudo aptitude install virtualbox or apt:virtualbox

From time to time I come accross an image I’d like to be able to boot in my virtual environment (VirtualBox), only to find that the site only hosts the VMware version for download. Fortunately, there’s an easy way for me to convert the files from the original .vmdk to VirtualBox’s .vdi. Actually, it’s a two-set method.

  1. Convert the .vmdk to a .bin file
  2. Convert the .bin file to .vdi

In order to convert the image to .bin, were going to need qemu:

sudo aptitude install qemu or apt:qemu

To convert the .bin to a.vdi, we’ll need the VBoxManage package, which is included when you install VirtualBox.

Here’s how the conversion process plays out:

Convert the downloaded VMware image like this:

qemu-img convert xxxxxx.vmdk xxxxxx.bin (where xxxxxx is the name of the file).

Then convert the .bin like this:

VBoxManage convertdd xxxxxx.bin xxxxxx.vdi (where xxxxxx is the name of the file).

I should note that I originally started using VMware as my virtualization platform, then switched to VirtualBox. Converting the images, saved me a fair bit of time reinstalling all the different linux systems!

Update June 20, 2009: As an after thought, I should try the command this way:

qemu-img convert xxxxxx.vmdk xxxxxx.bin && VBoxManage convertdd xxxxxx.bin xxxxxx.vdi (again, where xxxxxx is the name of the file).

Have a comment, suggestion or better way? Please comment below. A GUI application that can do this? – Again, please comment and let me know. Hope this post helps some of you!

4 Comments

  1. Vadim P.

    Thanks, I’ll give this a try. Been needing it for the near future.

  2. Alexei

    Doesn’t current version of VirtualBox support VMWare images out of the box?

    • @Alexei – That would be great! Thanks for commenting that!

      I took a look, I could not find anything definite, but I think the newer release of VirtualBox (May, 2009 – 2.2.4) supports .vmdk images? (But, I use an older version of VirtualBox).

  3. netcarver

    Hello,

    thank you for the post, didn’t know about this. As Virtual Box is now my preferred solution, I’ve been wondering about running VMWare images myself but never got around to trying it.

    A little reading of the official change log (http://www.virtualbox.org/manual/UserManual.html#ChangeLog) seems to indicate that native vmdk image support was added in Version 2.1.0 though bug fixes for this feature are mentioned in later versions including 2.1.2, 2.2.0, 2.2.4, 3.0.0 and 3.0.4

Trackbacks/Pingbacks

  1. moriancumer's status on Tuesday... - [...] I'm Converting vmware to virtualbox #linux http://ubuntulinuxhelp.com/converting-vmware-images-to-virtualbox-a-simple-method/ [...]
  2. HowtoMatrix - [...] Converting VMware Images to VirtualBox – A Simple Method Posted by suvi under Virtualization ...

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>