提交 3accd7eb 编写于 作者: J Ján Tomko 提交者: Cole Robinson

qemu: fix NBD migration to hosts with IPv6 enabled

Since f03dcc5d 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 commit 23260064)
上级 b4541a2f
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册