On 04/26/2012 09:13 AM, Raoul Scarazzini wrote:
Hi everybody,
like in the subject: is there a way for telling libvirt to auto define
an xml under /etc/libvirt/qemu? I mean, sometimes it happens to have the
/etc/libvirt/qemu shared between nodes,
*Don't do that. Ever.*
Each host _must_ have their own independent /etc/libvirt/qemu directory,
in order to allow proper migration between hosts. There are only a few
directories specifically designed to be shared between hosts:
/var/lib/libvirt/images
/var/lib/libvirt/sanlock
and maybe a few others that are safe to share (because libvirt only
reads from, and never writes into them):
/etc/libvirt/hooks
Improperly sharing any other directories means that two libvirtd daemons
will stomp over each other, with potentially disastrous results on both
affected hosts involved in the conflicting usage. For the same reason,
we recommend that you never directly edit files in /etc/libvirt, but
only use defined libvirt APIs to manage changes to your domains.
say with a NFS share, since I
can set a new xml on a node and I want o see the virtual machine on all
the others, is there a way to automate this or am I obligated to launch
virsh define <xml> on EACH node?
Yes, 'virsh define <xml>' on each node is the documented and supported
way to maintain a persistent definition of the same domain across
multiple hosts. Or you may want to look into VDSM (part of oVirt, and
available in Red Hat's RHEV product), which manages definitions of
domains across multiple hosts by using a common store managed by VDSM
and only using transient guests when using libvirt on any one host in
the managed cluster.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org