mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 05:55:19 +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;
|
||||
char *diskAlias = NULL;
|
||||
size_t i;
|
||||
const char *host;
|
||||
|
||||
if (STREQ(listenAddr, "[::]"))
|
||||
host = "::";
|
||||
else
|
||||
host = listenAddr;
|
||||
|
||||
for (i = 0; i < vm->def->ndisks; i++) {
|
||||
virDomainDiskDefPtr disk = vm->def->disks[i];
|
||||
@ -1135,7 +1141,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
|
||||
|
||||
if (!port &&
|
||||
((virPortAllocatorAcquire(driver->remotePorts, &port) < 0) ||
|
||||
(qemuMonitorNBDServerStart(priv->mon, listenAddr, port) < 0))) {
|
||||
(qemuMonitorNBDServerStart(priv->mon, host, port) < 0))) {
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user