Running VMware Images in QEMU

[linkstandalone]

In order to keep true to the FLOSS philosophy, I prefer to virtualize things using QEMU KVM. This also allows me to practice with the tools used in a lot of Linux environments for virtualization. Although it is a great tool for deploying your own virtual machines, it gets in the way when I want to open up a VM image for a security lab or some pre-made tool such as SIFT Workstation since they usually come in either virtual box or VMware images. While I could just download those tools, I prefer not to add more programs to my computer unless it is absolutely necessary. Of course, I also just like to find new ways of doing things. I hate seeing people online responding with "just download XYZ program and be done with it". Yes I can download VMware workstation if I needed it at work for something really quick and it will most likely work, but when it comes doing things at home, that mindset is soooo boring.

Normally, VMware images come in a *.ova file. The first thing to realize is that if you run file on the ova, you will notice that it is simply seen as a tar archive. The ova holds multiple files inside including the actual image, normally in a. The ova holds multiple files inside including the actual image, normally in a *.vmdk file, and a *.ovf file which is an XML file with information pertaining to the VM, comparable to the QEMU XML used to configure your VM settings. You may also find other files in there such as an ISO or a file with hashes. The only file we care about though is the *.vmdk file as that is the one with the actual image. If there are more than one, the file which has the name most comparable to the original *.ova filename should be the correct one. If it turns out this one does not work after the following process, you can always try the other one.

We will be converting the vmdk to qcow2. I chose this format simply because its the one I use with my other images and it works well with this conversion process. To convert it, you need to use the qemu-img and its convert function. After this point, we will be able to load the qcow2 image as a regular disk image in QEMU. You can do this through virt-manager, virt-install or copy another VM's XML and change the source for the disk as well as other options like the name, the UUID, and the MAC address. Something else you can try for a quick test is qemu-system-x86_64 but this can sometimes be very slow unless you set a ton of argument options.

Here are the actual steps:

  1. tar -xvf original.ova
  2. qemu-img convert -O qcow2 original.vmdk original.qcow2
  3. Run the qcow2 image in QEMU
  4. If it does not boot, try the other vmdk file if there is one

As you can see, it is pretty simple to do this and so far have used it on 3 different VMware images flawlessly. However, you have to realize it may take some experimentation. Do not give up on it right away and you will be able to avoid downloading extra software and avoid looking for the correct free trial version or getting an expensive license.