Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 813375

Summary: support ipv6 addresses on CLI
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: virt-viewerAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: dblechte, desktop-qa-list, dyasny, gkong, jwu, mzhan, rwu, yupzhang, zpeng
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-viewer-0.5.2-6.el6 Doc Type: Bug Fix
Doc Text:
Cause: The URI parsing code did not expect URIs containing '[', ']' around the host component Consquence: It was not possible to connect to remote libvirt servers whose URI address contained raw IPv6 addresses (eg qemu+ssh://root@[2001::xxxx:1]/system ). Fix: The URI parsing was fixed to take account of the IPv6 address syntax Result: It is now possible to connect to remote libvirtd servers using raw IPv6 addresses
Story Points: ---
Clone Of:
: 813865 (view as bug list) Environment:
Last Closed: 2012-06-20 12:12:29 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:
Bug Depends On:    
Bug Blocks: 813865    

Description David Jaša 2012-04-17 15:29:54 UTC
Description of problem:
support ipv6 addresses on CLI. IPv6 passed via controller works.

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-4

How reproducible:
always

Steps to Reproduce:
try to connect to qemu over ipv6:
1. remote-viewer spice://ipv6_addr/?port=PORT
2. remote-viewer spice://[ipv6_addr]/?port=PORT
3.
  
Actual results:
none of above works

Expected results:
some of above works

Additional info:
when address is passed via controller, remote-viewer works

Comment 1 Daniel Berrangé 2012-04-18 15:45:35 UTC
The RFC compliant syntax would be the second example you give

>  remote-viewer spice://[ipv6_addr]/?port=PORT

I have confirmed that this is indeed broken for both SPICE and VNC. The VNC support can be fixed in virt-viewer itself. The SPICE fix needs to be done in SPICE-GTK

Comment 2 Daniel Berrangé 2012-04-18 15:47:38 UTC
Upstream virt-viewer patch for VNC side of things:

https://www.redhat.com/archives/virt-tools-list/2012-April/msg00094.html

Comment 3 Daniel Berrangé 2012-04-23 17:05:14 UTC
Fixes for libvirt URIs and VNC URIs in virt-viewer-0.5.2-6.el6

Fix for SPICE URIs is to be handled by bug 813865 against spice-gtk

Comment 4 Daniel Berrangé 2012-04-23 17:12:17 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
The URI parsing code did not expect URIs containing '[', ']' around the host component

Consquence:
It was not possible to connect to remote libvirt servers whose URI address contained raw IPv6 addresses (eg qemu+ssh://root@[2001::xxxx:1]/system ).

Fix:
The URI parsing was fixed to take account of the IPv6 address syntax

Result:
It is now possible to connect to remote libvirtd servers using raw IPv6 addresses

Comment 5 zhe peng 2012-04-24 06:31:01 UTC
test pkgs:
virt-viewer-0.5.2-6.el6.x86_64
libvirt-0.9.10-13.el6.x86_64

step:
1:configure ipv6 global addr
#ifconfig eth0 inet6 add 3ffe::102/64
2:make sure ipv6 worked for libvirt
#virsh -c qemu+ssh://[3ffe::102]/system
root@3ffe::102's password: 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # 
3:prepare a guest with vnc
.......
<graphics type='vnc' port='5901' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
.......
4:use remote-viewer to connect the guest
#remote-viewer vnc://[3ffe::102]:5901 --debug
** (remote-viewer:26689): DEBUG: fullscreen display 0: 0
** (remote-viewer:26689): DEBUG: fullscreen display 0: 0
** (remote-viewer:26689): DEBUG: Opening display to vnc://[3ffe::102]:5901
** (remote-viewer:26689): DEBUG: Guest vnc://[3ffe::102]:5901 has a vnc display

** (remote-viewer:26689): DEBUG: After open connection callback fd=-1
** (remote-viewer:26689): DEBUG: Opening connection to display at vnc://[3ffe::102]:5901

** (remote-viewer:26689): DEBUG: notebook show status 0x10ef090
** (remote-viewer:26689): DEBUG: Disconnected
** (remote-viewer:26689): DEBUG: close vnc=0x1130f60
** (remote-viewer:26689): DEBUG: notebook show status 0x10ef090
** (remote-viewer:26689): DEBUG: Guest vnc://[3ffe::102]:5901 display has disconnected, shutting down
** (remote-viewer:26689): DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0

can't connect to guest,the bug not fixed.

Comment 6 Daniel Berrangé 2012-04-24 08:14:31 UTC
> <graphics type='vnc' port='5901' autoport='yes' listen='0.0.0.0'>

You have told the guest to listen on a IPv4 address, so of course you can't connect to it using IPv6.

Comment 7 zhe peng 2012-04-24 08:52:38 UTC
thanks daniel,
I change listener to 
 <graphics type='vnc' port='5902' autoport='yes' listen='::'>
      <listen type='address' address='::'/>
    </graphics>
remote-viewer can connect the guest
vnc verification passed.
waiting for spice-gtk latest build to try spice guest connection.

Comment 8 zhe peng 2012-05-23 07:25:13 UTC
vnc support ipv6 now, spice-gtk not support this on rhel6.3,bug 813865 will fix on
rhel6.4, so move this bug to verified, when 813865 fixed,will add comments on this.

Comment 10 errata-xmlrpc 2012-06-20 12:12:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0772.html