Bug 813375 - support ipv6 addresses on CLI
support ipv6 addresses on CLI
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
: Regression
Depends On:
Blocks: 813865
  Show dependency treegraph
 
Reported: 2012-04-17 11:29 EDT by David Jaša
Modified: 2016-04-26 10:10 EDT (History)
9 users (show)

See Also:
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 08:12:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Jaša 2012-04-17 11:29:54 EDT
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 Berrange 2012-04-18 11:45:35 EDT
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 Berrange 2012-04-18 11:47:38 EDT
Upstream virt-viewer patch for VNC side of things:

https://www.redhat.com/archives/virt-tools-list/2012-April/msg00094.html
Comment 3 Daniel Berrange 2012-04-23 13:05:14 EDT
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 Berrange 2012-04-23 13:12:17 EDT
    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 02:31:01 EDT
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 Berrange 2012-04-24 04:14:31 EDT
> <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 04:52:38 EDT
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 03:25:13 EDT
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 08:12:29 EDT
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

Note You need to log in before you can comment on or make changes to this bug.