On 10/12/20 4:46 AM, Vjaceslavs Klimovs wrote:
> On libvirt 6.8.0 and qemu 5.1.0, when trying to live migrate "error:
> internal error: Failed to reserve port" error is received and
> migration does not succeed:
>
> virsh # migrate cartridge qemu+tls://ratchet.lan/system --live
> --persistent --undefinesource --copy-storage-all --verbose
> error: internal error: Failed to reserve port 49153
>
> virsh #
>
Sorry for not replying earlier. But this is a clear libvirt bug and I
think it's a regression introduced by the following commit:
https://gitlab.com/libvirt/libvirt/-/commit/e74d627bb3b
The problem is, if you have two or more disks that need to be copied
over to the destination, the @server_started variable is not set after
the first iteration of the "for (i = 0; i < vm->def->ndisks; i++)"
loop.
I think this should be the fix:
Actually, you will need a second patch too. Here's the series: