[libvirt] [PATCH 0/3] Basic libxenlight driver
Jim Fehlig
jfehlig at novell.com
Thu Feb 10 21:53:11 UTC 2011
Markus Groß wrote:
> Hi,
>
> I started working on a libxenlight driver for libvirt a few weeks ago.
> By that time I didn't knew Jim Fehlig was also working on a driver for that api:
> http://article.gmane.org/gmane.comp.emulators.libvirt/33024
>
> Because I already did some work and there is no driver from Jim yet,
> I am posting my current version of the driver here.
>
I was hoping to get an initial submission this week but have been quite ill.
> It is a driver for the libxl (libxenlight) interface from the upcoming xen 4.1.
>
> This driver is divided into 3 patches, the first adds the driver without
> changing anything in libvirt, the second one integrates it into the
> build system of libvirt. The last one is self explanatory.
>
> However there are a few caveats.
>
> 1. The driver offers only basic functionality like: suspend, resume, pinvcpu, etc.
> create, restore, definexml and others are not yet implemented.
>
I took the approach of getting define, create, reboot, capabilities,
getinfo, and dumpxml implemented.
> 2. The driver supports libvirtxml <-> xen-xm conversion, thanks to the unified xen
> driver which already offered this functionality. But since this driver is
> not part of xen unified, I had to copy this functionality, rather than reusing it.
>
Yep, same with some of the capabilities code. But I haven't done much
in the way of libvirtXML <-> xen-xm conversion since I'm not convinced
the libvirt libxenlight driver should even manage vms it has not created
(similar to qemu driver). If a vm is started with xl tool, it has a
daemon spawned to listen for domain death, CD eject, etc. events. I'm
not sure of libvirt libxenlight driver should get involved with that.
Hmm, I should just post my current driver so you can take a look.
Thanks.
Jim
> 3. To compile libvirt with this driver, there is a new flag --with-xenlight.
> To fix some linker errors, libvirt has to link against several
> additional libraries now which are used in xen's libxenlight.
> These libraries are not directly used within libvirt,
> but I believe that some of them are GPL licensed, so that could be an issue.
>
> 4. To compile the driver you may need to copy the libxl_utils.h
> from tools/libxl of your xen-source directory to an include dir in your PATH.
> Right now this file is not copied when installing xen,
> but I will talk with the xen developers about that.
>
> Please let me know what you think about it.
>
> Thanks,
> Markus
>
>
> Markus Groß (3):
> Add basic libxenlight driver
> Integrate libxenlight driver into libvirt
> Add myself to AUTHORS
>
> AUTHORS | 1 +
> configure.ac | 35 +-
> include/libvirt/virterror.h | 1 +
> po/POTFILES.in | 2 +
> src/Makefile.am | 25 +
> src/driver.h | 3 +-
> src/libvirt.c | 13 +
> src/util/virterror.c | 3 +
> src/xenlight/xl_driver.c | 948 ++++++++++++++++++
> src/xenlight/xl_driver.h | 46 +
> src/xenlight/xl_driver_private.h | 52 +
> src/xenlight/xl_utils.c | 1969 ++++++++++++++++++++++++++++++++++++++
> src/xenlight/xl_utils.h | 90 ++
> tools/virsh.c | 3 +
> 14 files changed, 3188 insertions(+), 3 deletions(-)
> create mode 100644 src/xenlight/xl_driver.c
> create mode 100644 src/xenlight/xl_driver.h
> create mode 100644 src/xenlight/xl_driver_private.h
> create mode 100644 src/xenlight/xl_utils.c
> create mode 100644 src/xenlight/xl_utils.h
>
>
> ------------------------------------------------------------------------
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
More information about the libvir-list
mailing list