Re: [libvirt PATCH 1/2] ch: drop the check to have a single console/serial

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

 



On Fri, Jul 29, 2022 at 20:36:56 +0000, Praveen K Paladugu wrote:
> Starting with version 18.0, cloud-hypervisor supports a console
> and a serial device in parallel.
> https://github.com/cloud-hypervisor/cloud-hypervisor/issues/3012
> 
> Signed-off-by: Praveen K Paladugu <prapal@xxxxxxxxxxxxxxxxxxx>
> ---
>  src/ch/ch_domain.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
> index ae53c6fe05..bf687a6c32 100644
> --- a/src/ch/ch_domain.c
> +++ b/src/ch/ch_domain.c
> @@ -281,14 +281,7 @@ chValidateDomainDeviceDef(const virDomainDeviceDef *dev,
>          return -1;
>      }
>  
> -    if ((def->nconsoles &&
> -         def->consoles[0]->source->type == VIR_DOMAIN_CHR_TYPE_PTY)
> -        && (def->nserials &&
> -            def->serials[0]->source->type == VIR_DOMAIN_CHR_TYPE_PTY)) {
> -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                       _("Only a single console or serial can be configured for this domain"));
> -        return -1;
> -    } else if (def->nconsoles > 1) {
> +    if (def->nconsoles > 1) {
>          virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>                         _("Only a single console can be configured for this domain"));
>          return -1;

So, what happens now when newer libvirt is used with an older cloud
hypervisor version and the configuration which was previously rejected
would be used?

In case of the qemu driver we have a concept of hypervisor capabilities,
which are detected based on the installed hypervisor version, and in
case some feature was added later, the capabilities are consulted to
provide a proper error in case an older version is used.




[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