Yin Olivia-R63875
2013-Mar-21 11:23 UTC
[libvirt-users] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'
Hi, I'm trying remote connection with qemu hypervisor on FSL PPC board. The libvirt server is the PPC board. root at ppc:~# ifconfig eth0 10.193.20.109 root at ppc:~# libvirtd -d root at ppc:~# virsh -c qemu:///system define test.xml root at ppc:~# virsh -c qemu:///system start test root at ppc:~# virsh -c qemu:///system list --all Id Name State ---------------------------------------------------- 2 test running Connect from an X86 PC (Ubuntu 10.04) to the PPC board. user at x86:~$ virsh -c qemu+ssh://root at 10.193.20.109/system list --all The authenticity of host '10.193.20.109 (10.193.20.109)' can't be established. RSA key fingerprint is 2f:56:07:08:da:7d:ac:41:45:57:d2:12:15:19:67:e0. Are you sure you want to continue connecting (yes/no)? yes root at 10.193.20.109's password: error: failed to connect to the hypervisor error: End of file while reading data: Warning: Permanently added '10.193.20.109' (RSA) to the list of known hosts. nc: invalid option -- 'U' BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error I tried to verify the remote connection on localhost. But it also failed as below: root at mpc8572ds:~# virsh -c qemu+ssh:///root at localhost/system list --all root at localhost's password: error: failed to connect to the hypervisor error: End of file while reading data: nc: invalid option -- 'U' BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error Could anyone give suggestion on this issue? Best Regards, Olivia
Javi Legido
2013-Mar-21 14:00 UTC
[libvirt-users] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'
Hi Olivia. Another think that you should check is socat package. In my documented example the hypervisor running KVM is a Debian squeeze, and I had to proceed this way: sudo aptitude update; sudo aptitude install netcat socat -R sudo vim /bin/netcatsocket #!/bin/bash socat - unix-client:$2 sudo chmod +x /bin/netcatsocket You can try it and see if it helps or not. PD: looping in again the list, I replied just to Olivia before Cheers El 21/03/2013 12:47, "Yin Olivia-R63875" <r63875 at freescale.com> escribi?:> Hi Javier, > > Thanks for your help. > From the pages you provided, I guess you suggest is as below: > * Cannot recv data: Host key verification failed. : Connection reset by > peer > > Sucede al lanzar: > > virt-manager -c qemu+ssh://usuario at hipervisor/system > > Solucion: iniciar una sesion SSH para almacenar las claves del hipervisor > en el cliente: > > ssh usuario at hipervisor > > Exactly, I've login with ssh and then connect with virsh. > > user at x86:~$ ssh root at 10.193.20.109 > root at 10.193.20.109's password: > root at ppc:~# exit > logout > Connection to 10.193.20.109 closed. > > user at x86:~$ virsh -c qemu+ssh://root at 10.193.20.109/system list --all > root at 10.193.20.109's password: > error: failed to connect to the hypervisor > error: End of file while reading data: nc: invalid option -- 'U' > BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. > > Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: > Input/output error > > It still failed to connect the hypervisor, instead of ssh issue. > > Best Regards, > Olivia > > > -----Original Message----- > > From: javilegido at gmail.com [mailto:javilegido at gmail.com] On Behalf Of > Javi > > Legido > > Sent: Thursday, March 21, 2013 7:35 PM > > To: Yin Olivia-R63875 > > Subject: Re: [libvirt-users] remote connection issue 'virsh -c > > qemu+ssh:///root at localhost/system list' > > > > Hi Olivia. > > > > It's in spanish, but pretty easy to follow, maybe it helps you: > > > > > http://wiki.legido.com/doku.php?id=informatica:linux:virtualizacion:kvm#adm > > inistrar_kvm_y_vm_desde_una_gui_en_el_cliente > > > > With this guide you should be able to connect from a client machine (for > > instance your laptop) to the hypervisor (KVM) if both have SSH > connectivity. > > > > Cheers. > > > > Javier > > > > 2013/3/21 Yin Olivia-R63875 <r63875 at freescale.com>: > > > Hi, > > > > > > I'm trying remote connection with qemu hypervisor on FSL PPC board. > > > > > > The libvirt server is the PPC board. > > > > > > root at ppc:~# ifconfig eth0 10.193.20.109 root at ppc:~# libvirtd -d > > > root at ppc:~# virsh -c qemu:///system define test.xml root at ppc:~# virsh > > > -c qemu:///system start test root at ppc:~# virsh -c qemu:///system list > > > --all > > > Id Name State > > > ---------------------------------------------------- > > > 2 test running > > > > > > Connect from an X86 PC (Ubuntu 10.04) to the PPC board. > > > > > > user at x86:~$ virsh -c qemu+ssh://root at 10.193.20.109/system list --all > > > The authenticity of host '10.193.20.109 (10.193.20.109)' can't be > > established. > > > RSA key fingerprint is 2f:56:07:08:da:7d:ac:41:45:57:d2:12:15:19:67:e0. > > > Are you sure you want to continue connecting (yes/no)? yes > > > root at 10.193.20.109's password: > > > error: failed to connect to the hypervisor > > > error: End of file while reading data: Warning: Permanently added > > '10.193.20.109' (RSA) to the list of known hosts. > > > nc: invalid option -- 'U' > > > BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. > > > > > > Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: > > > Input/output error > > > > > > > > > > > > I tried to verify the remote connection on localhost. But it also > failed > > as below: > > > > > > root at mpc8572ds:~# virsh -c qemu+ssh:///root at localhost/system list > > > --all root at localhost's password: > > > error: failed to connect to the hypervisor > > > error: End of file while reading data: nc: invalid option -- 'U' > > > BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. > > > > > > Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: > > > Input/output error > > > > > > > > > Could anyone give suggestion on this issue? > > > > > > > > > Best Regards, > > > Olivia > > > > > > > > > _______________________________________________ > > > libvirt-users mailing list > > > libvirt-users at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-users > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130321/01314e2c/attachment.htm>
Doug Goldstein
2013-Mar-21 17:58 UTC
[libvirt-users] [libvirt] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'
On Thu, Mar 21, 2013 at 6:23 AM, Yin Olivia-R63875 <r63875 at freescale.com> wrote:> Hi, > > I'm trying remote connection with qemu hypervisor on FSL PPC board. > > The libvirt server is the PPC board. > > root at ppc:~# ifconfig eth0 10.193.20.109 > root at ppc:~# libvirtd -d > root at ppc:~# virsh -c qemu:///system define test.xml > root at ppc:~# virsh -c qemu:///system start test > root at ppc:~# virsh -c qemu:///system list --all > Id Name State > ---------------------------------------------------- > 2 test running > > Connect from an X86 PC (Ubuntu 10.04) to the PPC board. > > user at x86:~$ virsh -c qemu+ssh://root at 10.193.20.109/system list --all > The authenticity of host '10.193.20.109 (10.193.20.109)' can't be established. > RSA key fingerprint is 2f:56:07:08:da:7d:ac:41:45:57:d2:12:15:19:67:e0. > Are you sure you want to continue connecting (yes/no)? yes > root at 10.193.20.109's password: > error: failed to connect to the hypervisor > error: End of file while reading data: Warning: Permanently added '10.193.20.109' (RSA) to the list of known hosts. > nc: invalid option -- 'U' > BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. > > Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error > > > > I tried to verify the remote connection on localhost. But it also failed as below: > > root at mpc8572ds:~# virsh -c qemu+ssh:///root at localhost/system list --all > root at localhost's password: > error: failed to connect to the hypervisor > error: End of file while reading data: nc: invalid option -- 'U' > BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary. > > Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error > > > Could anyone give suggestion on this issue? > > > Best Regards, > Olivia >You're using busybox's nc (netcat) implementation. It does not support UNIX sockets which is a requirement of libvirt when using the qemu+ssh:// scheme to connect. I'd suggest looking into generating some certificates and using qemu+tls:// (the default when using qemu:// to a remote system). If you don't care about any authentication or encryption for testing purposes you can use qemu+tcp:// -- Doug Goldstein