<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.30.2">
</HEAD>
<BODY>
<PRE>
Package: libvirt0
Version: 0.8.2-1
Severity: normal

--- Please enter the report below this line. ---
Hello,

I had a problem on my machine, trying to connect to a remote server.
Using virt-manager, I had a new remove ssh server, given a <A HREF="mailto:user@host">user@host</A> address.
But then it failed. In debug, I saw the following message:

** begin message **
Uncaught Error: Unable to open a connection to the libvirt management daemon.

Libvirt URI is: qemu+ssh://<A HREF="mailto:mbraure@devqual2.beepntrack.com">user@host</A>/system

Verify that:
 - The 'libvirtd' daemon has been started
 : Unable to open connection to hypervisor URI 'qemu+ssh://<A HREF="mailto:mbraure@devqual2.beepntrack.com">mbraure@devqual2.beepntrack.com</A>/system':
server closed connection: nc: invalid option -- q
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
        &nbsp; [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
        &nbsp; [-x proxy_address[:port]] [hostname] [port[s]]

Traceback (most recent call last):
&nbsp; File &quot;/usr/share/virt-manager/virtManager/connection.py&quot;, line 971, in _try_open
&nbsp;&nbsp;&nbsp; None], flags)
&nbsp; File &quot;/usr/lib/python2.6/dist-packages/libvirt.py&quot;, line 111, in openAuth
&nbsp;&nbsp;&nbsp; if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: server closed connection: nc: invalid option -- q
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
        &nbsp; [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
        &nbsp; [-x proxy_address[:port]] [hostname] [port[s]]


Maybe you need to install ssh-askpass in order to authenticate.
** end message **


Of course, ssh-askpass was installed. Seeing the error, I check the nc command on the
remote machine, and there is no &quot;-q&quot; option. Suppress the &quot;q&quot; option in the source code 
src/remote/remote_driver.c and it work like a charm.
I think the same problem can occured in local as there's also a &quot;nc&quot; call in the qemu_driver.

One simple test (but I do not have any virtual machine on this computer) should be to
update-alternative --config nc and choose the BSD version rather than the nc.traditional,
as this one does not have (I think) any -q option.

Perhaps I've done something wrong, but I'm sure that removing the -q option from the &quot;remote_driver.c&quot;
makes virt-manager working perfectly.


Cheers,

Martin Braure de Calignon

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.32-5-686

Debian Release: squeeze/sid
  995 testing         www.debian-multimedia.org 
  995 testing         security.debian.org 
  995 testing         ftp2.fr.debian.org 
  500 stable          ftp2.fr.debian.org 
   50 unstable        ftp2.fr.debian.org 
    1 experimental    ftp2.fr.debian.org 

--- Package information. ---
Depends                (Version) | Installed
================================-+-==============
libc6                   (&gt;= 2.8) | 2.11.2-2
libcap-ng0                       | 0.6.4-1
libgcrypt11           (&gt;= 1.4.2) | 1.4.5-2
libgnutls26        (&gt;= 2.7.14-0) | 2.8.6-1
libsasl2-2                       | 2.1.23.dfsg1-5
libxenstore3.0        (&gt;= 3.2.0) | 4.0.1~rc3-1
libxml2               (&gt;= 2.7.4) | 2.7.7.dfsg-4


Recommends      (Version) | Installed
=========================-+-===========
lvm2                      | 2.02.66-2


Package's Suggests field is empty.



</PRE>
<BR>
<BR>
</BODY>
</HTML>