mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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.
This commit is contained in:
parent
985843586f
commit
b6c162d3bb
@ -3663,6 +3663,14 @@ int qemuProcessStart(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
hookData.nodemask = nodemask;
|
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)");
|
VIR_DEBUG("Setting up domain cgroup (if required)");
|
||||||
if (qemuSetupCgroup(driver, vm, nodemask) < 0)
|
if (qemuSetupCgroup(driver, vm, nodemask) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -3707,11 +3715,6 @@ int qemuProcessStart(virConnectPtr conn,
|
|||||||
goto cleanup;
|
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");
|
VIR_DEBUG("Building emulator command line");
|
||||||
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
|
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
|
||||||
priv->monJSON, priv->qemuCaps,
|
priv->monJSON, priv->qemuCaps,
|
||||||
|
Loading…
Reference in New Issue
Block a user