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

Re: [libvirt-users] Wanted: method for qemu hook script to know if called for migration



On 07/25/2011 02:06 PM, Whit Blauvelt wrote:
In writing a simple bash script to prevent a VM on shared storage from being
started on one host if it's already running on another,

Not to distract from your bug report, but have you considered using the new sanlock (0.9.3) or fcntl (0.9.4) lock managers, that do this automatically, without the need for using hook scripts.

http://libvirt.org/locking.html

Any ideas how to do that? Unfortunately what's passed to the script directly
is just "[vmname] start begin -" in both cases. And I don't see that a
separate migrate process shows up in the process tables until after getting
beyond the qemu hook script.

As a feature suggestion, it would be nice if that fourth input variable,
currently "-", was something like "migrate" in this instance.

Yes, that is probably a bug worth fixing.

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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