1

After I abort a live migrate, the Job type has changed to 'Cancelled', which makes me unable to migrate again. So,If some libvirt api (or QMP) can help me to change the Job type from 'Cancelled' to 'None'.

# virsh domjobabort DOMAIN
# virsh domjobinfo DOMAIN
Job type:         Cancelled
Operation:        Outgoing migration
# virsh migrate DOMAIN qemu+tcp://{ip}/system tcp://{ip}  --live --p2p --auto-converge --unsafe --copy-storage-all --xml test.xml
error: Timed out during operation: cannot acquire state change lock (held by monitor=remoteDispatchDomainMigratePerform3Params)

If I destroy DOMAIN and restart it(The Job type becomes 'none'). The migrate run well. I don't want to restart the Doman :)

Version Info: libvirt:6.5.0 qemu:5.0.0 system: CentOS8 with kernel 4.18


2020-12-25

I try again using the virsh command, but to my suprise, the problem did not happen again. It seems work fine(after abort, the domain can migrate!). It really confuse me: Doesn't virsh and go-libvirt use the same api?

[root@ubuntu ~]# virsh migrate GUS447978da-04e8-4e9e-88cf-547309f9bbc5 qemu+tcp://{ip}/system tcp://{ip}  --live --p2p --auto-converge --unsafe --copy-storage-all --xml test.xml --verbose
Migration: [ 27 %]error: operation aborted: migration out: canceled by client

### abort the job in other terminal

[root@ubuntu ~]# virsh domjobinfo GUS447978da-04e8-4e9e-88cf-547309f9bbc5
Job type:         None

[root@ubuntu ~]# virsh migrate GUS447978da-04e8-4e9e-88cf-547309f9bbc5 qemu+tcp://{ip}/system tcp://{ip}  --live --p2p --auto-converge --unsafe --copy-storage-all --xml test.xml --verbose
Migration: [  4 %]error: operation aborted: migration out: canceled by client

### abort the job in other terminal

[root@ubuntu ~]# virsh domjobinfo GUS447978da-04e8-4e9e-88cf-547309f9bbc5
Job type:         None

[root@ubuntu ~]# virsh migrate GUS447978da-04e8-4e9e-88cf-547309f9bbc5 qemu+tcp://{ip}/system tcp://{ip}  --live --p2p --auto-converge --unsafe --copy-storage-all --xml test.xml
error: operation aborted: migration out: canceled by client

[root@ubuntu ~]# virsh domjobinfo GUS447978da-04e8-4e9e-88cf-547309f9bbc5
Job type:         None

[root@ubuntu ~]# virsh migrate GUS447978da-04e8-4e9e-88cf-547309f9bbc5 qemu+tcp://{ip}/system tcp://{ip}  --live --p2p --auto-converge --unsafe --copy-storage-all --xml test.xml
error: operation aborted: migration out: canceled by client

### abort the job in other terminal

[root@ubuntu ~]# virsh domjobinfo GUS447978da-04e8-4e9e-88cf-547309f9bbc5
Job type:         None

1 Answers1

0

restarting libvirtd service might help to clear stuck job status

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://serverfault.com/help/whats-reputation) you will be able to [comment on any post](https://serverfault.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/518072) – djdomi Apr 19 '22 at 18:03