qemu: Avoid assigning unavailable migration ports
https://bugzilla.redhat.com/show_bug.cgi?id=
1019053
When we migrate vms concurrently, there's a chance that libvirtd on
destination assigns the same port for different migrations, which will
lead to migration failure during prepare phase on destination. So we use
virPortAllocator here to solve the problem.
Signed-off-by: Wang Yufei <james.wangyufei@huawei.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit
0196845d3abd0d914cf11f7ad6c19df8b47c32ed)
Conflicts:
missing support for WebSockets and listen address
virAsprintf doesn't report OOM
src/qemu/qemu_command.h
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c