提交 4aef1a5e 编写于 作者: M Mikhail Feoktistov 提交者: Maxim Nestratov

vz: fix template ct creation

First we don't need to add disk in this case. Second flag should
be skipped.
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
上级 07761f5d
......@@ -3435,6 +3435,9 @@ prlsdkAddFS(PRL_HANDLE sdkdom, virDomainFSDefPtr fs)
PRL_HANDLE sdkdisk = PRL_INVALID_HANDLE;
int ret = -1;
if (fs->type == VIR_DOMAIN_FS_TYPE_TEMPLATE)
return 0;
if (prlsdkCheckFSUnsupportedParams(fs) < 0)
return -1;
......@@ -3733,6 +3736,7 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
PRL_HANDLE job = PRL_INVALID_HANDLE;
PRL_HANDLE result = PRL_INVALID_HANDLE;
PRL_RESULT pret;
PRL_UINT32 flags;
int ret = -1;
int useTemplate = 0;
size_t i;
......@@ -3777,8 +3781,10 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
if (ret)
goto cleanup;
job = PrlVm_RegEx(sdkdom, "",
PACF_NON_INTERACTIVE_MODE | PRNVM_PRESERVE_DISK);
flags = PACF_NON_INTERACTIVE_MODE;
if (!useTemplate)
flags |= PRNVM_PRESERVE_DISK;
job = PrlVm_RegEx(sdkdom, "", flags);
if (PRL_FAILED(waitJob(job)))
ret = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册