Bug 813375 - support ipv6 addresses on CLI
Summary: support ipv6 addresses on CLI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 813865
TreeView+ depends on / blocked
 
Reported: 2012-04-17 15:29 UTC by David Jaša
Modified: 2016-04-26 14:10 UTC (History)
9 users (show)

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
Clone Of:
: 813865 (view as bug list)
Environment:
Last Closed: 2012-06-20 12:12:29 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0772 0 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2012-06-19 20:35:11 UTC

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


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