mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
qemu: fix NBD migration to hosts with IPv6 enabled
Sincef03dcc5
we use [::] as the listening address both on qemu command line in -incoming and in nbd-server-start QMP command. However the latter requires just :: without the braces. (cherry picked from commit2326006410
)
This commit is contained in:
parent
b4541a2f3d
commit
3accd7eb25
@ -1114,6 +1114,12 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
|
|||||||
unsigned short port = 0;
|
unsigned short port = 0;
|
||||||
char *diskAlias = NULL;
|
char *diskAlias = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
const char *host;
|
||||||
|
|
||||||
|
if (STREQ(listenAddr, "[::]"))
|
||||||
|
host = "::";
|
||||||
|
else
|
||||||
|
host = listenAddr;
|
||||||
|
|
||||||
for (i = 0; i < vm->def->ndisks; i++) {
|
for (i = 0; i < vm->def->ndisks; i++) {
|
||||||
virDomainDiskDefPtr disk = vm->def->disks[i];
|
virDomainDiskDefPtr disk = vm->def->disks[i];
|
||||||
@ -1135,7 +1141,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
if (!port &&
|
if (!port &&
|
||||||
((virPortAllocatorAcquire(driver->remotePorts, &port) < 0) ||
|
((virPortAllocatorAcquire(driver->remotePorts, &port) < 0) ||
|
||||||
(qemuMonitorNBDServerStart(priv->mon, listenAddr, port) < 0))) {
|
(qemuMonitorNBDServerStart(priv->mon, host, port) < 0))) {
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user