libvirt / virsh can't connect to remote hosts via IPv6 address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Won't Fix
|
Medium
|
Unassigned | ||
Quantal |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Ubuntu 12.04 LTS amd64
libvirt-bin 0.9.8-2ubuntu17.1
Trying to connect to a remote libvirt via qemu+ssh and an IPv6 address fails, because libvirt parses the URL wrong. A fix exists upstream. Please include it in the version shipped in Ubuntu 12.04.
How to reproduce:
root@phil1:~# virsh --connect qemu+ssh:
: Connection reset by peersh: Could not resolve hostname [fd00:c:
error: failed to connect to the hypervisor
Red Hat bug regarding this problem: https:/
Supposedly fixed in this upstream commit:
commit 9f748277bbd17d0
Author: Martin Kletzander <email address hidden>
Date: Fri Feb 24 19:48:55 2012 +0100
Fixed URI parsing
Function xmlParseURI does not remove square brackets around IPv6
address when parsing. One of the solutions is making wrappers around
functions working with xmlURI*. This assures that uri->server will be
always properly assigned and it doesn't have to be changed when used
on some new place in the code.
For this purpose, functions virParseURI and virSaveURI were
added. These function are wrappers around xmlParseURI and xmlSaveUri
respectively.
Also there is one new syntax check function to prohibit these functions
anywhere else.
File changes:
- src/util/viruri.h -- declaration
- src/util/viruri.c -- definition
- src/libvirt_
- src/Makefile.am -- added source and header files
- cfg.mk -- added sc_prohibit_xmlURI
- all others -- ID name and include fixes
Thanks for reporting this bug and pointing to the patch.
I've marked it confirmed for precise (and fix released for quantal, which has 0.9.12) based on the upstream report.