From 9c10c03093e9b0fb4978d69a19237b1730f7add8 Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Thu, 29 Dec 2016 12:58:34 +0300 Subject: [PATCH] vz: don't show bootorder for containers Because this is invalid xml for containers. This patch almost reverts 7eda8369, but still skips converting vz sdk bootorder for containers to libvirt bootorder because we use boot order in containers for quite different purpurse. --- src/vz/vz_sdk.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index ced58e5e9a..43a6340576 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -1695,21 +1695,6 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TYPE sdkType, int sdkIndex, return ret; } -static void -prlsdkConvertBootOrderCt(virDomainDefPtr def) -{ - size_t i; - for (i = 0; i < def->nfss; i++) { - - if (STREQ(def->fss[i]->dst, "/")) { - def->os.nBootDevs = 0; - return; - } - } - def->os.nBootDevs = 1; - def->os.bootDevs[0] = VIR_DOMAIN_BOOT_DISK; -} - static int prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def) { @@ -1870,12 +1855,8 @@ prlsdkLoadDomain(vzDriverPtr driver, goto error; /* depends on prlsdkAddDomainHardware */ - if (IS_CT(def)) { - prlsdkConvertBootOrderCt(def); - } else { - if (prlsdkConvertBootOrderVm(sdkdom, def) < 0) - goto error; - } + if (!IS_CT(def) && prlsdkConvertBootOrderVm(sdkdom, def) < 0) + goto error; pret = PrlVmCfg_GetEnvId(sdkdom, &envId); prlsdkCheckRetGoto(pret, error); -- GitLab