[virt-tools-list] [virt-manager PATCH] graphics: skip authentication only for VNC with listen type none

Cole Robinson crobinso at redhat.com
Thu Mar 23 14:34:04 UTC 2017


On 03/23/2017 10:28 AM, Pavel Hrdina wrote:
> This is in fact a bug in QEMU so we have to workaround this issue
> to allow to connect to guest with VNC and listen type none.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1434551
> 
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>

ACK

Just curious, is there a bug report for the qemu issue?

- Cole

> ---
>  virtManager/domain.py | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/virtManager/domain.py b/virtManager/domain.py
> index 3478cc58..fc5f54a6 100644
> --- a/virtManager/domain.py
> +++ b/virtManager/domain.py
> @@ -1190,8 +1190,17 @@ class vmmDomain(vmmLibvirtObject):
>          return self._backend.openConsole(devname, stream, flags)
>  
>      def open_graphics_fd(self):
> -        return self._backend.openGraphicsFD(0,
> -                libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH)
> +        flags = 0
> +
> +        # Ugly workaround for VNC bug where the display cannot be opened
> +        # if the listen type is "none".  When this gets fixed in QEMU
> +        # we should skip auth only for broken QEMUs.
> +        graphics = self.get_graphics_devices()[0]
> +        if (graphics.type == "vnc" and
> +            graphics.get_first_listen_type() == "none"):
> +            flags = libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH
> +
> +        return self._backend.openGraphicsFD(0, flags)
>  
>      def refresh_snapshots(self):
>          self._snapshot_list = None
> 




More information about the virt-tools-list mailing list