提交 0b7b76cc 编写于 作者: M Maxim Nestratov 提交者: Dmitry Guryanov

parallels: process '/' mount point correctly for containers

Since we are going to add block devices as root disks we have
to specify root mount point for boot block devices. But we
shouldn't do this if a filesystem disk with such
target mount point already exists.
Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
上级 022ece9b
......@@ -3080,6 +3080,13 @@ static int prlsdkAddDisk(PRL_HANDLE sdkdom,
if (prlsdkAddDeviceToBootList(sdkdom, devIndex, devType, 0) < 0)
goto cleanup;
/* If we add physical device as a boot disk to container
* we have to specify mount point for it */
if (isCt) {
pret = PrlVmDevHd_SetMountPoint(sdkdisk, "/");
prlsdkCheckRetGoto(pret, cleanup);
}
}
return 0;
......@@ -3314,6 +3321,13 @@ prlsdkDoApplyConfig(virConnectPtr conn,
goto error;
}
for (i = 0; i < def->nfss; i++) {
if (STREQ(def->fss[i]->dst, "/"))
needBoot = false;
if (prlsdkAddFS(sdkdom, def->fss[i]) < 0)
goto error;
}
for (i = 0; i < def->ndisks; i++) {
bool bootDisk = false;
......@@ -3327,11 +3341,6 @@ prlsdkDoApplyConfig(virConnectPtr conn,
goto error;
}
for (i = 0; i < def->nfss; i++) {
if (prlsdkAddFS(sdkdom, def->fss[i]) < 0)
goto error;
}
return 0;
error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册