[libvirt] My beefs with the libvirt XML configuration format
Richard W.M. Jones
rjones at redhat.com
Thu Dec 10 17:49:39 UTC 2009
On Thu, Dec 10, 2009 at 05:44:43PM +0100, Daniel Veillard wrote:
> Your viewpoint is that users should edit the XML. My viewpoint is that
> software should do this, basically in normal use of libvirt nobody
> should have to look at the XML, the virt-viewer/virt-install etc...
> tools should generate and handle those for you. It happens that one may
> have to tweak something like a pathname in a definition or something but
> whatever the level of schemas available it won't help for that kind of
> tweaks. Things like changing the ethernet type adapter should be a
> pull down list in a gui like virt-manager, not loading the saved xml in
> emacs, finding the associated relax-ng, finding the place where it's
> defined and hoping emacs will get a list to pick from,
I edit libvirt XML all the time. The 'virsh edit' command is most
I'd like to add my own rant about this though:
If an element isn't understood by libvirt, then libvirt just discards
it (without any indication or error, and without just remembering the
element in the XML).
This caused me a great deal of pain yesterday when I was adding a
<watchdog/> element to a domain on an F12 machine, but the watchdog
didn't appear in the VM. Later I discovered that libvirt on F12
predates the watchdog feature, and so it was just tossing away the
<watchdog/> element completely from the XML ...
> which even if you did it right might just not work because the
> domain is running and your change would be discarded on
> restart... oops.
Which is also a bug.
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
More information about the libvir-list