Bug 1038965

Summary: RFE: Support listening on multiple addresses for VNC server with QEMU >= 2.10.0
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Ján Tomko <jtomko>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: ASSIGNED --- QA Contact: yafu <yafu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: berrange, dyuan, fjin, jsuchane, md, mzhan, rbalakri, xuzhang, zpeng
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1038963 Environment:
Last Closed: Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1038963    
Bug Blocks: 1288337    

Description Ján Tomko 2013-12-06 09:12:30 UTC
+++ This bug was initially created as a clone of Bug #1038963 +++

+++ This bug was initially created as a clone of Bug #1014422 +++

Description of problem:

qemu doesn't listen on IPv6 socket for IPv4 and IPv6 VNC connections.

Version-Release number of selected component (if applicable):
qemu-1.4.2-10.fc19.x86_64

How reproducible:
always

Steps to Reproduce:
1. Use virt-manager to create and start a guest with VNC display
2. Check the listening VNC socket: sudo netstat -nlp | grep :59

Actual results:

>sudo netstat -nlp | grep :59
tcp        0      0 127.0.0.1:5900          0.0.0.0:*               LISTEN      3233/qemu-system-x8 

Expected results:

qemu should listen on an IPv6 socket configured to accept both IPv4 and IPv6 connections.

>sudo netstat -nlp | grep :59
tcp6        0      0 ::1:5900          :::*               LISTEN      3233/qemu-system-x8 

Additional info:

--- Additional comment from Cole Robinson on 2013-10-31 22:06:30 CET ---

Dan, thoughts on if this is intentional or a defect, and if so is it qemu or libvirt?

--- Additional comment from Daniel Berrange on 2013-11-01 09:56:23 CET ---

It is a bug - we should listen on ::1 by default, with v6-only=0 so that it also covers 127.0.0.1. At minimum it is a libvirt bug.

--- Additional comment from Jan Tomko on 2013-11-01 17:21:42 CET ---

::1 with IPV6_V6ONLY=0 does not cover 127.0.0.1, that only works for ::

Since QEMU only supports one listen address, we can't tell it to listen on both.

Even if we specify a hostname ('localhost') QEMU will only listen on the first address that works (usually ::1 on dual-stack systems) instead of listening on all of them.

Comment 2 Ján Tomko 2014-04-15 08:54:26 UTC
*** Bug 895582 has been marked as a duplicate of this bug. ***

Comment 8 Daniel Berrangé 2017-03-14 10:55:30 UTC
FYI, QEMU 2.9 will have ability to listen on multiple addresses. Libvirt XML has ability to specify multiple addresses already, so we should just need to wire up the QEMU command line generator to handle it. The syntax is described in


https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg00590.html