I have added a new provisioning module to support KVM using the
libvirt virtualization API (Jira issue VCL-545).  It is based on the
code submitted by Xinquin Yu (Jira issue VCL-339).  I split up the
libvirt code and the KVM-specific code so that the base libvirt code
can be used to support the other hypervisors that libvirt supports
(Xen, Linux containers...).  This should allow support to be added for
other hypervisors rather easily without having to change the main
libvirt.pm file.

I have created a documentation page at
https://cwiki.apache.org/confluence/display/VCL/Libvirt+Provisioning+Module.
 This page is not complete but currently contains a basic description
of the architecture.  I also copied the POD documentation from the
modules to this page describing the subroutines.

I have successfully been able to load existing VMware-based images
under KVM using this new module.  The KVM.pm module automatically
converts VMware images to KVM's qcow2 format.  This works for VMware
images saved in the flat or 2GB sparse formats.  It also runs
virt-win-reg to modify the registry of the converted image allowing it
to load using an IDE disk/driver.  Thanks to Young Oh for providing
this information.

There are some details which still need to be completed:
-Image capture
-Image retrieval from another management node

Image capture should be pretty straight-forward but there are some
VMware compatibility issues that will need to be addressed.  VMware ->
KVM conversion isn't an issue, but we'll need to figure out how to
handle images saved under KVM.  Ideally they will compatible to also
run under VMware.  They could be converted to the vmdk or raw format
and then copied to the image repository.  However, I believe these
will be saved thick instead of sparse.  It will take some
experimenting to figure out the best way to handle this.

I'd also like to add some features to utilize virt-win-reg to analyze
which drivers are configured in the image when it is loaded.  This
information could be used to add the correct/best devices to the VM's
XML definition.

Regards,
Andy

Reply via email to