On Sun, May 10 2015, Guido Günther wrote: > On Fri, May 08, 2015 at 11:55:28AM -0700, Gerald Turner wrote: >> On Fri, May 08 2015, Guido Günther wrote: >> > On Fri, May 01, 2015 at 12:51:37PM -0700, Gerald Turner wrote: >> > [..snip..] >> >> * 1.2.12: Jan 27 2015 >> >> libxl: Add support for parsing/formating Xen XL config (Kiarie >> >> Kahurani) >> >> Introduce support for parsing/formatting Xen xl config format (Jim >> >> Fehlig) >> > >> > We could cherry pick those to our stable release. >> >> Nice! However unless somebody else comes along and has the same >> expectations that I had (i.e. libvirt recognizing Xen guests with >> little or no configuration), I wouldn't put any effort into this. > > Could you attach a configuration to this bug that shows he conversion > errors. I'll try to get this fixed so we ease the migration. That said > there are lots of libxl changes in newer libvirt so running a > backported 1.2.15 might make more sense.
Attached example.cfg in xl.cfg(5) format, and the produced example.xml when running ‘virsh domxml-from-native xen-xm example.cfg >| example.xml’. The only problem seems to be parsing the disks, which is specified in the xl-disk-configuration.txt¹ document, wherein it looks like the <vdev> and <format> positional parameters were swapped from the older xm format. >> >> After correcting the domain XML, and restarting libvirtd once more, >> >> things start progressing: >> >> >> >> # virsh -c xen:/// list --all >> >> Id Name State >> >> ---------------------------------------------------- >> >> - host1 shut off >> >> >> >> … however “shut off” is incorrect. >> > >> > Stupid question but did you start the domain via virsh beforehand? >> > If so, is there anything interesting in the daemon log? AFAIK >> > configurations are now managed entierly via /etc/libvirt/libxl/ . >> >> Not stupid because that's part of the point I've subtly been trying >> to make - I'm sticking with domU's started by /etc/init.d/xendomains >> and /usr/sbin/xl, the "Xen way". For four years during squeeze and >> wheezy, > > I just wanted to make sure we have this documented straight: libxl > managed xen domains aren't picked up by /usr/sbin/xl and vice versa. Not quite. xl managed xen domains aren't picked up by libvirt. As for vice-versa, sorry but I haven't tried whether libvirt managed xen domains are picked up by xl. >> I had dropped in munin-libvirt-plugins and libvirt-bin (0.8.3 and >> 0.9.12) for the sole purpose of monitoring the domU's memory/cpu/io. >> This worked without any configuration other than specifying "uri >> xen:///" in the munin-node plugin configuration. During the >> "heartbleed" panic, after hastily reacting to the output of >> checkrestart, I accidently discovered that "service libvirt-guests >> restart" actually handles restarts of these "unmanaged" domU's. >> Fantastic! Consequently I've been telling sysadmin colleagues that >> libvirt is great because it integrates non-intrusively and can handle >> heterogeneous VM environments. > > It's bad that this isn't true for Jessie anymore but looking at the > uptream list it seems most distros are switching over to libvirt > managed xen domains. Interesting. I wonder if systemd-machined has been integrated with libvirt - yet another compelling reason to change management stacks. ¹ http://xenbits.xen.org/docs/4.4-testing/misc/xl-disk-configuration.txt -- Gerald Turner <gtur...@unzane.com> Encrypted mail preferred! OpenPGP: 4096R / CA89 B27A 30FA 66C5 1B80 3858 EC94 2276 FDB8 716D
name = "example" vcpus = 2 memory = 1024 uuid = "44c17701-0c90-4c65-8ea9-89736b4034ca" disk = [ '/dev/vg1/lv-example,raw,xvda,rw' ] vif = [ 'mac=00:20:91:00:00:01,bridge=br0' ] kernel = "/usr/lib/grub-xen/grub-x86_64-xen.bin"
<domain type='xen'> <name>example</name> <uuid>44c17701-0c90-4c65-8ea9-89736b4034ca</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='xenpv'>linux</type> <kernel>/usr/lib/grub-xen/grub-x86_64-xen.bin</kernel> </os> <clock offset='utc' adjustment='reset'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <disk type='block' device='disk'> <driver name='phy'/> <source dev='/dev/vg1/lv-example'/> <target dev='raw' bus='xen'/> </disk> <interface type='bridge'> <mac address='00:20:91:00:00:01'/> <source bridge='br0'/> </interface> <console type='pty'> <target type='xen' port='0'/> </console> </devices> </domain>
signature.asc
Description: PGP signature