Hi everyone,

when I use the API virDomainMigrate to do migration operation in KVM 
environment(libvirt1.1.0 qemu1.5.1), I encountered with some problems.
I found that If the connection to source side is disconnected in the BEGIN 
phase of a migration, the migration job would fail.
Further more, the following-up migration of the same VM would not be successful 
until restart libvirtd.

The error log:
libvirtd : 8406: error : virQEMUCloseCallbacksSet:781 : internal error Close 
callback for domain myvm1 already registered with another connection 
0x7f023801a900
libvirt: Domain Config error : Requested operation is not valid: domain is 
already active as 'myvm1'

I got the above error by following steps:
step 1 :  migrate VM.
step 2 :  disconnect the client connection to source libvirtd at once ,such as 
ctrl+c.
step 3 :  the migrate API returns fail.
step 4 :  migrate this VM again , fails and reports above error.

The reason causing this problem may be:

In the BEGIN phase of a migraion, it registers a close callback through 
virQEMUCloseCallbacksSet function.
In the normal flow of migration, the registered callback is cleanup in the 
PERFORM and CONFIRM phase. 
But if the connection to source side is disconnected before PERFORM phase or 
between PERFORM phase and CONFIRM phase, 
the close callback will not be cleanup, and the problem mentioned above occurs.

I have test it on libvirt1.2.2, it also happens. 

I tried, but could not find a good way to solve this problem. Does anyone have 
any good ideas? Thanks!

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to