提交 b6c162d3 编写于 作者: O Osier Yang 提交者: John Ferlan

qemu: Translate the volume type disk source before cgroup setting

The translation must be done before both of cgroup and security
setting, otherwise since the disk source is not translated yet,
it might be skipped on cgroup and security setting.
上级 98584358
......@@ -3663,6 +3663,14 @@ int qemuProcessStart(virConnectPtr conn,
}
hookData.nodemask = nodemask;
/* "volume" type disk's source must be translated before
* cgroup and security setting.
*/
for (i = 0; i < vm->def->ndisks; i++) {
if (qemuTranslateDiskSourcePool(conn, vm->def->disks[i]) < 0)
goto cleanup;
}
VIR_DEBUG("Setting up domain cgroup (if required)");
if (qemuSetupCgroup(driver, vm, nodemask) < 0)
goto cleanup;
......@@ -3707,11 +3715,6 @@ int qemuProcessStart(virConnectPtr conn,
goto cleanup;
}
for (i = 0; i < vm->def->ndisks; i++) {
if (qemuTranslateDiskSourcePool(conn, vm->def->disks[i]) < 0)
goto cleanup;
}
VIR_DEBUG("Building emulator command line");
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
priv->monJSON, priv->qemuCaps,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册