[libvirt] Re: [virt-tools-list] Remote management over SSH fails to connect

On 10/25/2009 10:25 AM, Jon Nordby wrote:
I get the following errors (skipping "system" yields the same): [root@jon-laptop ~]# virsh -c qemu+ssh://10.0.0.2/system list error: server closed connection error: failed to connect to the hypervisor
However, SSH and libvirtd both work on their own: [root@jon-laptop ~]# ssh 10.0.0.2 Last login: Sun Oct 25 14:06:07 2009 from 10.0.0.143 [root@server0 ~]# virsh list Id Name State ---------------------------------- 21 family-server running
The connection is allowed in hosts.allow libvirt 0.7.2 in both ends, kvm backend, Arch Linux
What could be the source of this problem? And how can I find it?
ccing libvirt-list This could be an issue of 'nc' incompatibility. Does the 'nc' command on the remote system support the -U option? If you run the virsh command with LIBVIRT_DEBUG=1 virsh ... you should see the ssh command being run. See if running the command by hand produces an error. - Cole

On Mon, Oct 26, 2009 at 3:04 PM, Cole Robinson <crobinso@redhat.com> wrote:
On 10/25/2009 10:25 AM, Jon Nordby wrote:
I get the following errors (skipping "system" yields the same): [root@jon-laptop ~]# virsh -c qemu+ssh://10.0.0.2/system list error: server closed connection error: failed to connect to the hypervisor
However, SSH and libvirtd both work on their own: [root@jon-laptop ~]# ssh 10.0.0.2 Last login: Sun Oct 25 14:06:07 2009 from 10.0.0.143 [root@server0 ~]# virsh list Id Name State ---------------------------------- 21 family-server running
The connection is allowed in hosts.allow libvirt 0.7.2 in both ends, kvm backend, Arch Linux
What could be the source of this problem? And how can I find it?
ccing libvirt-list
This could be an issue of 'nc' incompatibility. Does the 'nc' command on the remote system support the -U option?
If you run the virsh command with LIBVIRT_DEBUG=1 virsh ... you should see the ssh command being run. See if running the command by hand produces an error.
- Cole
Thanks, that was indeed the issue! For the archives: the openbsd netcat implementation provides the -U option, where as gnu netcat does not. And I had to restart the daemon after installing the correct version for things to start working. -- Regards Jon Nordby - www.jonnor.com

On Mon, Oct 26, 2009 at 06:37:01PM +0100, Jon Nordby wrote:
For the archives: the openbsd netcat implementation provides the -U option, where as gnu netcat does not.
Indeed - there are two separate and incompatible implementations of the netcat program! Only the one we use in Fedora supports the -U option. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
participants (3)
-
Cole Robinson
-
Jon Nordby
-
Richard W.M. Jones