[libvirt-users] virsh migrate results in error: Timed out during operation: cannot acquire state change lock
1010911 at isep.ipp.pt
Fri Feb 10 10:42:54 UTC 2012
Em 09-02-2012 20:59, Eric Blake escreveu:
> On 02/09/2012 07:00 AM, Nuno Sousa wrote:
>> Hi all,
>> Hi have one computer hosting several VM, this particular server is in
>> need of maintenance and has to be shutdown.
>> In order to avoid disrupting the services provided by the VM I intended
>> to migrate the VM to another computer.
>> Computer 1 and 2 do not share any storage. So it is necessary to migrate
>> not only the memory but also any data on the hard-drive.
>> Both computers are running debian squeeze.
>> Virsh is version 0.8.3.
>> I issue this command on server one:
>> sudo LIBVIRT_DEBUG=1 virsh migrate --live --copy-storage-all i00cn1011
>> qemu+ssh://user@computer2/session> debug.log 2>&1
> Based on IRC conversations, I'm assuming you already made sure that
> computer2 already sees all the same disk image files, with the same
> sizes, as are present on computer1 (the contents need not be identical,
> since that is what --copy-storage-all is supposed to fix, but libvirt
> currently does not pre-create the files on the destination and leaves
> the user to do so instead - patches to fix that are welcome).
Well, are you saying I should copy the data from computer1 to computer2
before using virsh migrate?
I only created an identical LVM partition with the same name and path.
I did not copy anything.
>> On virt-manager on computer 1, the VM appears for a few moments as
>> paused, and then disappears.
>> On computer 1 I receive the error: Timed out during operation: cannot
>> acquire state change lock
> You said virsh 0.8.3 on the source, but I'd also like to make sure what
> version of libvirtd is running on the two machines? There are some
> known bugs in older libvirt versions where we had bad locking calls; and
> some of these bugs could be triggered by migration, such as if
> virt-manager is querying domain status at the same time that migration
> shuts down the source because the destination is ready to run.7
I have exactly the same version for all packages on both computers.
> You may want to upgrade to 0.9.9 (stable release) or 0.9.10-rc2 (release
> candidate for next week's release) on both machines, to try and get bugs
> that have been fixed in the meantime out of your way. You can safely
> upgrade libvirt even while your VM continues to run.
Are you sure there is no problem in me upgrading libvirt on the main
If so I'll give it a try.
>> Does anyone know what the problem may be and how to solve it?
> At any rate, when older libvirtd hits the 'cannot acquire state change
> lock' bug, the only solution is to restart libvirtd (again, a safe
> operation; your guest will continue to run in the meantime).
You mean I should restart libvirtd on both computers?
> I personally haven't played with --copy-storage-all, and know that it
> doesn't get tested quite as much as shared storage, so I hope you can
> get things working.
I'll try. And with help I believe I can do it.
Thanks for the help.
More information about the libvirt-users