HOWTO: Convert a VirtualBox image to a VMware Disk Image

Friday, January 6th, 2012 at 3:44 am | 4,341 views | trackback url

VirtualBox Oracle logoWhile playing with the recent FreeDOS 1.1 release (only 17 years in the making), I found a need to convert a VirtualBox appliance image to a VMware disk image, but the steps weren’t clear or straightforward.

Here’s what I did, in a nutshell:

  1. First, install VirtualBox. You can grab the install from the main VirtualBox downloads page. I run Linux, so I grabbed those. If you run Windows or Mac, you’ll want to pick one of those installers specific to your platform
  2. Once installed, you’ll find that VirtualBox comes with a tool called “vboxmanage”. We’re going to use this to convert the image from a VirtualBox .vdi image to a “raw” image file.
    $ vboxmanage internalcommands converttoraw FreeDOS-1.1+networking.vdi FreeDOS-1.1+networking.raw
  3. Next, we want to take that image and convert it to a proper VMware disk image. To do that, we need to install QEMU and use one of the tools provided with that package to do the conversion for us. Since I run Debian, this was as simple as an apt-get to fetch what I needed.
    $ sudo apt-get install qemu-kvm
    Unpacking replacement qemu-kvm ...
    Processing triggers for man-db ...
    Processing triggers for ureadahead ...
    ureadahead will be reprofiled on next reboot
    Setting up qemu-kvm (0.12.3+noroms) ...
    start: Job is already running: qemu-kvm
  4. Then we want to convert the “raw” image we created with vboxmanage to an image that VMware knows how to use:
    $ qemu-img convert -O vmdk FreeDOS-1.1+networking.raw FreeDOS-1.1+networking.vmdk

That’s basically it. Once that was converted, I created a basic VMware virtual machine (.vmx file) to refer to that .vmdk file, and then did my post-conversion tweaks and hacks to minimize the size of the VM, disable some unnecessary BIOS options inside the VM, and archived it away.

Update: If you want to do this all in one step, here’s a quicker way:

$ vboxmanage clonehd FreeDOS-1.1+networking.vdi FreeDOS-1.1+networking.vmdk –format VMDK \
–variant standard –type normal –remember

Simple, right?

Last Modified: Sunday, March 6th, 2016 @ 05:50

Leave a Reply

You must be logged in to post a comment.

Bad Behavior has blocked 905 access attempts in the last 7 days.