Tuesday, April 22, 2014

virt-convert command line has been reworked

One of the changes we made with virt-manager 1.0 was a large reworking of the virt-convert command line interface.

virt-convert started life as a tool for converting back and forth between different VM configuration formats. Originally it was just between vmx and virt-image(5), but it eventually grew ovf input support. However, for the common usage of trying to convert a vmx/ovf appliance into a libvirt guest, this involved an inconvenient two step process:

* Convert to virt-image(5) with virt-convert
* Convert to a running libvirt guest with virt-image(1)

Well, since virt-image didn't really have any users, it's planned for removal. So we took the opportunity to improve virt-convert in the process. Running virt-convert is now as simple as:

 virt-convert fedora18.ova  


 virt-convert centos6.tar.gz  

And a we convert directly to libvirt XML and launch the guest. Standard libvirt options are allowed, like --connect for specifying the libvirt driver.

The tool hasn't been heavily used and there's definitely still a lot of details we are missing, so if you hit any issues please file a bug report.

(Long term it sounds like gnome-boxes may grow a similar feature as mentioned over here, so maybe virt-convert isn't long for this world since there will likely be a command line interface for it as well)


  1. This kind of sucks. I was following an article here: http://virtuallyhyper.com/2013/06/migrate-from-libvirt-kvm-to-virtualbox/ because, quite frankly, I am having some issues with Windows 7 and libvirt. I was trying to use the old -o vmx option for virt-convert to prepare an image for conversion to ovf and found out that the -o vmx option no longer exists. Well, that sucks. I can't seem to find any other way to convert the XML file to VMX or directly to OVF now. Any suggestions, other than rolling back to an ancient version of libvirt?

    1. Maybe VMware has a tool for it? Dunno. Believe me virt-convert did a crap job of the conversion anyways so it's unlikely it would have been sufficient for you