Re: [PATCH 2/5] vz: don't query boot devices information for VZ, set boot from disk always

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 09.12.2016 17:36, Maxim Nestratov wrote:
> Before, boot devices information for CTs was always empty and we
> didn't indicate that containers always boot from disk.
> 
> Signed-off-by: Maxim Nestratov <mnestratov@xxxxxxxxxxxxx>
> ---
>  src/vz/vz_sdk.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
> index 9976e4c..a6236d0 100644
> --- a/src/vz/vz_sdk.c
> +++ b/src/vz/vz_sdk.c
> @@ -1634,7 +1634,7 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TYPE sdkType, int sdkIndex,
>  }
>  
>  static int
> -prlsdkConvertBootOrder(PRL_HANDLE sdkdom, virDomainDefPtr def)
> +prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
>  {
>      int ret = -1;
>      PRL_RESULT pret;
> @@ -1792,9 +1792,14 @@ prlsdkLoadDomain(vzDriverPtr driver,
>      if (prlsdkAddDomainHardware(driver, sdkdom, def) < 0)
>          goto error;
>  
> -    /* depends on prlsdkAddDomainHardware */
> -    if (prlsdkConvertBootOrder(sdkdom, def) < 0)
> -        goto error;
> +    if (IS_CT(def)) {
> +        def->os.nBootDevs = 1;
> +        def->os.bootDevs[0] = VIR_DOMAIN_BOOT_DISK;
> +    } else {
> +        /* depends on prlsdkAddDomainHardware */
> +        if (prlsdkConvertBootOrderVm(sdkdom, def) < 0)
> +            goto error;
> +    }
>  
>      pret = PrlVmCfg_GetEnvId(sdkdom, &envId);
>      prlsdkCheckRetGoto(pret, error);
> 

I think we'd better make this code symmetrical to prlsdkSetBootOrderCt,
that is report boot order only if there is no filesystem mounted to root.
Also we need to fix prlsdkCheckUnsupportedParams to allow boot order
if there is no root filesystems but still forbid boot from network etc.

Nikolay

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux