On 02/10/2012 03:42 AM, Nuno Sousa wrote:
>> 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.
That's the right approach. All that qemu requires is that on the
destination, it can open a file by the same name as was in use on the
source, and that the file thus opened is big enough to match the source
size, so that qemu then takes care of copying the data.
> 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
computer?
Yes, libvirt is designed to be strictly forward-compatible, so upgrading
to a newer release should always work.
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?
Yes, any time you get the 'state change lock' message, the easiest
recovery is to restart libvirtd on the affected machine; and if it is in
the context of a migration, then doing it on both machines makes the
most sense, even when only one machine actually locked up.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org