Free Software

Software Engineering with FOSS and Linux

Migrating from VirtualBox to VMWare in Linux

Ok this is not really a post about free software, in fact it is quite the opposite, but after spending a long time trying to figure a way to convert a VirtualBox image to a VMWare one I figured someone may benefit from it. The reason I had to switch was that I couldn’t get DirectX and 3D Acceleration to work in VirtualBox, but it works fine in VMWare (if you have any suggestions to help me with DirectX and 3D Acceleration in VirtualBox please post here, since VirtualBox seems to be running smoother on my laptop). All the info is scattered around the web, but searching for it is tricky since many links refer to old VirtualBox versions and most of them refer to the opposite operation, i.e. migrating from VMWare to VirtualBox. So here we go:

– Locate your VirtualBox virtual drive, in my case this was /var/local/virtual/windows.vdi. For the rest of the post I assume we are in the virtual drive’s directory (i.e. /var/local/virtual)
– Convert it to raw format. In later versions of VirtualBox (I am using 3.1.2) this is done through the VBoxManage tool:

VBoxManage internalcommands converttoraw windows.dvi windows.raw

– Install qemu
– Convert the raw file to a VMWare compatible image format:

qemu-img convert -f raw -O vmdk windows.raw windows.vmdk

You can now delete the raw file to save some space.

– Launch vmware. I am using VMware Workstation 7.0.1.
– Create a new Virtual Machine. At the wizard, use the following steps (the important options are in blue):

Virtual Machine Configuration: Custom
Virtual Machine Hardware Compatibility: Workstation 6.5 – 7.0
Install operating system from: I will install the operating system later
Guest Operating System: Whatever you’re running (I’m using the vm for Windows XP Professional)
Virtual Machine Name: Whatever you want, or leave the defaults
Processors: Whatever you want, or leave the defaults. I’m using 1
Memory: As much as you like. I’m using 1GB
Network Connection: Use network address translation (NAT)
I/O Adapter Types: SCSI adapter: BusLogic.
Disk: Use an existing virtual disk. Then browse for the .vmdk file

When you start the VM, you will be asked to convert it to new format. Do so, since qemu-img may generate formats compatible with older VMWare versions. Also don’t forget to install VMWare Tools (from the VMWare menu select VM, then Install VMWare Tools…), 3D Acceleration didn’t work until I did.

February 21, 2010 - Posted by | linux | , , ,

7 Comments »

  1. Thank you so much for this very helpful guide.
    In case you didn’t already notice, the first command asks for “windows.dvi” which of course doesn’t exist. I just changed it to “windows.vdi” and it worked like a champ.
    thanks!

    Comment by Joeqaz | August 8, 2010 | Reply

  2. Thanks for the info – good to learn something new

    Thank you

    Comment by Virtual Desktops | October 22, 2010 | Reply

  3. […] disk. The disk is dynamic which makes it a lot more trickier. If I follow the instructions at https://xpapad.wordpress.com/2010/02/21/migrating-from-virtualbox-to-vmware-in-linux, the vdi-to-raw conversion will result in a 2 TB file. I don’t even have that much disk […]

    Pingback by virtualbox 2 vmware disk Drija | November 12, 2010 | Reply

  4. Great job!

    This saved my day :)

    Thank you very much. Everything worked perfectly

    Comment by David | July 27, 2011 | Reply

  5. Adding another big “thank you” to this article !

    Works for VMWare Player 4 too it seems. The difference is that at first you can’t select an existing disk. Just select the defaults for a new disk. Right before creating the VM you can still remove it and then add an existing disk. Don’t forget to move the existing disk to IDE 0:0.

    Comment by Jan Goyvaerts | October 8, 2011 | Reply

  6. You actually ensure it is show up quite simple together with your powerpoint presentation, nonetheless am finding
    the following issue to generally be really a very important factor we come to feel I would hardly
    ever understand. It appears to be also difficult and
    also intensive personally. I’m writing
    about forward on your own following site, We’ll attempt to find the suspend than it!

    Comment by Ajax wiki | October 20, 2012 | Reply

  7. Hey there, I’m a new blogger coming from Bochum, Germany who found you on https://xpapad.wordpress.com/2010/02/21/migrating-from-virtualbox-to-vmware-in-linux/. Do you have any suggestions for up-and-coming writers? I’m
    working on beginning my own blog soon but I don’t really know where to get started. Would you suggest starting off with a free platform like Micro Blogs or go for a paid alternative? I’m confronted with quite a few
    options and it’s all so overwhelming… Any tips?

    Comment by todosonido.blogspot.com | July 23, 2013 | Reply


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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: