pv-qemu 9/10: XenD device model re-factoring
authorKeir Fraser <keir@xensource.com>
Thu, 25 Oct 2007 13:45:07 +0000 (14:45 +0100)
committerKeir Fraser <keir@xensource.com>
Thu, 25 Oct 2007 13:45:07 +0000 (14:45 +0100)
commitf8ffd3b21f42c524ab836080a64b9147c4faf6df
tree2c4f6ac8991b392528cb309ff610d038c2dec3e9
parent36a48e9d8706a6b6e60f3965edc75a99bf4fcc7d
pv-qemu 9/10: XenD device model re-factoring

This patches adapts XenD so that it is capable of starting a qemu-dm
device model for both paravirt and fullyvirt guests. A paravirt guest
will only be given a device model if it has a VFB configured, or the
user explicitly include the device_model option in the config
config. This avoids unnecessary overhead for those wanting a minimal
paravirt guest.

The bulk of this patch involves moving code from the HVMImageHandler
into the base ImageHandler class. The HVMImageHandler and
LinuxImageHandler subclasses now merely containing a couple of
overrides to set some specific command line flags. The most important
is -M xenpv, vs -M xenfv.

The XenConfig class has a minor refactoring to add a has_rfb() method
to avoid duplicating code in a couple of places. Instead of hardcoding
DEFAULT_DM it now uses the xen.util.auxbin APIs to locate it - this
works on platforms where qemu-dm is in /usr/lib64 instead of
/usr/lib. As before paravirt only gets a default qemu-dm if using a
VFB.

The vfbif.py class is trimmed out since it no longer needs to spawn a
daemon. A few other misc fixes deal with qemu-dm interactions when
saving/restoring, and in particular recovering from save failures (or
checkpointing).

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/python/xen/xend/XendCheckpoint.py
tools/python/xen/xend/XendConfig.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/image.py
tools/python/xen/xend/server/vfbif.py