[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 03:25 PM, Whit Blauvelt wrote:
In trying to understand whether sanlock will work in this instance, I see at

   sanlock will ... protect against 2 vms on the same host using the same
   disk (or the same VM being started twice due to error by libvirt).

By implication if I have the sanlock directory on a shared filesystem, it
will also prevent a VM from being started on the second host while running
on the first. Will it still allow the VM to do a live migration? Or will
live migration run up against the lock?

Yes, both useful lock managers (sanlock and fcntl) work best with the use of a shared lock directory, at which point they correctly handle live migration between hosts. That is, the lock manager knows how to differentiate between read-only and read-write disk access, and the migration pattern is such that while the VM temporarily lives on two hosts at once, the migration API coordinates those two instances so that only one ever needs read-write access of a shared disk at a time. The lock manager hooks are correctly called in the right sequence to account for migration, while still preventing you from starting up the same VM twice on multiple hosts via any means other than migration.

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]