
On Mon, Dec 09, 2013 at 01:01:43PM +0100, Ondřej Kunc wrote:
Hi list,
Is there any function in libvirt to determine runlevel of host or any possibility to prevent VM migrations to that host ?
I'm developing simple cluster of 4 servers running KVM VMs. For management I decided to use python-libvirt. It is working in that way, that every VM is diskless and booting via PXE so I can run it on every host server. Every VM has assigned one host as monitor which is responsible to periodically check, that VM is running on one of other hosts. If it don't run, it will be started on first available server assigned for that VM. When one of hosts is shut down, it will migrate all VMs to another hosts, but that monitor which checks VMs will migrate it after reboot. But I have race condition there that monitors can check that host is running before it is shutdown and will migrate VM's back to server which will reboot.
Thank you for any help
That kind of policy decision making is outside the scope of libvirt I'm afraid. The higher level management tools using libvirt would need to figure out that kind of stuff. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|