Bug 974126

Summary: virt-manager can't connect to VNC listening on IPv6 address [::]
Product: [Community] Virtualization Tools Reporter: Iain Patterson <bugzilla.redhat>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, berrange, crobinso
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-29 16:05:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Iain Patterson 2013-06-13 13:27:41 UTC
Description of problem:
virt-manager fails to connect to a qemu-kvm guest's VNC display if the listen address is set to [::].  virt-viewer does connect.  virt-manager does connect successfully if the address is 0.0.0.0. 

Version-Release number of selected component (if applicable):
0.9.5

How reproducible:
Always

Steps to Reproduce:
1. Start libvirtd with vnc_listen="::" in /etc/libvirt/qemu.conf.
2. Connect virt-manager to qemu+tcp://hostname/system and create a guest with a VNC display.
3. Try to open the guest's display from virt-manager.

Actual results:
virt-manager fails to show the guest's display, instead producing the error message "viewer connection to hypervisor host got refused or disconnected"

Expected results:
virt-manager should show the guest's VNC display.

Additional info:
/usr/share/virt-manager/virtManager/console.py defines the function get_conn_host().  Within that function is a condition:

  if self.gaddr != "0.0.0.0":

Changing the line to the following allows virt-manager to connect properly:

  if self.gaddr != "0.0.0.0" and self.gaddr != "::":

The same python script contains the hardcoded 127.0.0.1 address in various places.  I have not tested but they may also cause trouble with the IPv6 loopback address [::1].  I have also not tested configuring the VNC server to bind to a specific IPv6 address.

Comment 1 Cole Robinson 2014-01-29 16:03:59 UTC
Thanks for the report, fixed upstream now