← Back to team overview

openstack team mailing list archive

Re: Improving Xen support in the libvirt driver

 

On Wed, May 09, 2012 at 11:08:13PM -0600, Jim Fehlig wrote:
> Hi,
> 
> I've been tinkering with improving Xen support in the libvirt driver and
> wanted to discuss a few issues before submitting patches.
> 
> Even the latest upstream release of Xen (4.1.x) contains a rather old
> qemu, version 0.10.2, which rejects qcow2 images with cluster size >
> 64K.  The libvirt driver creates the COW image with cluster size of 2M. 
> Is this for performance reasons?  Any objections to removing that option
> and going with 'qemu-img create' default of 64K?

In general larger cluster size does improve the performance of
qcow2. I'm not sure how much of a delta we get by going from
64k to 2M though. If there's any doubt then I guess it could be
made into a configuration parameter.

> In a setup with both Xen and KVM compute nodes, I've found a few options
> for controlling scheduling of an instance to the correct node.  One
> option uses availability zones, e.g.
> 
> # nova.conf on Xen compute nodes
> node_availability_zone=xen-hosts
> 
> # launching a Xen PV instance
> nova boot --image <xen-pv-image> --availability_zone xen-hosts ...
> 
> The other involves a recent commit adding additional capabilities for
> compute nodes [1] and the vm_mode image property [2] used by the
> XenServer driver to distinguish HVM vs PV images.  E.g.
> 
> # nova.conf on Xen compute nodes
> additional_compute_capabilities="pv,hvm"
> 
> # Set vm_mode property on Xen image
> glance update <image-uuid> vm_mode=pv
> 
> I prefer that latter approach since vm_mode will be needed in the
> libvirt driver anyhow to create proper config for PV vs HVM instances. 
> Currently, the driver creates usable config for PV instances, but needs
> some adjustments for HVM.

Yes, tagging the image with details of its required guest ABI does
seem like something we need to do to be able to properly support
a choice betweeen PV & HVM images. It is not very good the way we
currently just hardcode PV only for Xen usage in the libvirt driver.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


Follow ups

References