Re: xl and libvirt.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/26/2014 08:18 PM, Alvin Starr wrote:
> I have been trying do some simulations of an openstack environment on my
> workstation that is running xen and libvirt.
> I managed to create nested HVM environments under lx but found a number
> of shortfalls in libxl code.
> 

I'm not a libxl user myself, but can at least answer some things:

> I have added a nestedhvm as a domain feature and was looking at
> inspecting the domain configuration when I realized that the persistant
> data is keept in config files in /var/lib/xen/userdata.....
> 
> Libvirt and lx have incompatible file names and are using different
> config formats.
> Libvirt keeps the data as XML and xl keeps them as xm config files.
> 
> This means that libvirt domains cannot be manged with xl or xl domains
> managed by libvirt.
> Part of me thinks that sticking with the XL file format would be nice
> from the point of view of being able to use xenlight tools once the
> domain is configured.
> At the very least it may make sense to keep an XL copy of the config
> file in a format that xenlight can use.

Libvirt is a higher layer than xl.  The design decision is that if you
use libvirt to manage domains, you should use libvirt syntax (and not xl
syntax), because it makes it easier to translate between libxl or qemu
as your hypervisor all while being used to the common libvirt framework
(in fact, the reason libvirt exists at all is because of xen vs. qemu
issues 7 years ago needing a common wrapper).  So libxl should NOT learn
libvirt XML config; but rather, libvirt should have a translation both
into and out of lower-layer config formats.

Such a command already exists, in the form of 'virsh domxml-from-native'
and 'domxml-to-native'; and according to the source code, the libvirt
driver for libxl domains has already supported conversions for the
"xen-xm" and "xen-sxpr" formats since libvirt 0.9.0.  If the xl config
format you are talking about is different than xen-xm or xen-sxpr, then
it's merely a matter of patching
src/libxl/libxl_driver:libxlConnectDomainXML{To,From}Native to
understand a third format.  Patches welcome :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]