[libvirt] Connecting with a remote libvirt

Hello i'm trying to connect with a remote libvirt. The option I selected was tcp because it's a development environment and a secure and isolated network, I've configured listen_tcp = 1 tcp_port = "16509" in libvirtd.conf at the destition. I've tried to connect to host "santacruz" from a remote host "aoniken" and locally but pn both cases I've got: REMOTE marcela@aoniken:~$ virsh -c qemu+tcp://santacruz:16509 list error: unable to connect to libvirtd at 'santacruz': Connection refused error: failed to connect to the hypervisor LOCALLY radic@santacruz:/etc/libvirt$ virsh -c qemu+tcp://santacruz:16509 list error: unable to connect to libvirtd at 'santacruz': Connection refused error: failed to connect to the hypervisor I've try to use ssh but i've got an error two on both cases. REMOTE (SSH) marcela@aoniken:~$ virsh -c qemu+ssh://radic@santacruz list radic@santacruz's password: error: internal error no QEMU URI path given, try qemu:///system error: failed to connect to the hypervisor marcela@aoniken:~$ radic@santacruz:/etc/libvirt$ virsh -c qemu+ssh://radic@santacruz list radic@santacruz's password: error: internal error no QEMU URI path given, try qemu:///system error: failed to connect to the hypervisor Can you help me? Thank you

?Hi, donc forget to start libvirtd with the "-l" (listen) argument. Generally, it's in your /etc/init.d/libvirtd script. Regards, Arnaud From: Marcela Castro León Sent: Tuesday, February 01, 2011 11:14 AM To: libvir-list@redhat.com Subject: [libvirt] Connecting with a remote libvirt Hello i'm trying to connect with a remote libvirt. The option I selected was tcp because it's a development environment and a secure and isolated network, I've configured listen_tcp = 1 tcp_port = "16509" in libvirtd.conf at the destition. I've tried to connect to host "santacruz" from a remote host "aoniken" and locally but pn both cases I've got: REMOTE marcela@aoniken:~$ virsh -c qemu+tcp://santacruz:16509 list error: unable to connect to libvirtd at 'santacruz': Connection refused error: failed to connect to the hypervisor LOCALLY radic@santacruz:/etc/libvirt$ virsh -c qemu+tcp://santacruz:16509 list error: unable to connect to libvirtd at 'santacruz': Connection refused error: failed to connect to the hypervisor I've try to use ssh but i've got an error two on both cases. REMOTE (SSH) marcela@aoniken:~$ virsh -c qemu+ssh://radic@santacruz list radic@santacruz's password: error: internal error no QEMU URI path given, try qemu:///system error: failed to connect to the hypervisor marcela@aoniken:~$ radic@santacruz:/etc/libvirt$ virsh -c qemu+ssh://radic@santacruz list radic@santacruz's password: error: internal error no QEMU URI path given, try qemu:///system error: failed to connect to the hypervisor Can you help me? Thank you -------------------------------------------------------------------------------- -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 02/02/2011, at 12:59 AM, <arnaud.champion@devatom.fr> <arnaud.champion@devatom.fr> wrote:
Hi,
donc forget to start libvirtd with the "-l" (listen) argument. Generally, it's in your /etc/init.d/libvirtd script.
Hey Marcela, You didn't mention which Linux distro you're using? That'll help us know which config files you'd have and so forth. :) Some thoughts: + Guessing you have root access on the "santacruz" box, so try this first with ssh just to see if it works: $ virsh -c qemu+ssh://root@santacruz/system list + If that works, and you're ok with using ssh, then you can set up your "radic" user for access to libvirt: http://wiki.libvirt.org/page/SSHSetup (the libvirt.org server seems to be offline atm :( ) When that's set up, you should then be able to connect with: $ virsh -c qemu+ssh://radic@santacruz/system list + If you really want to enable the tcp connection type, rather than ssh, then you might want to turn off all authentication for it. On a RHELRHEL/Fedora/CentOS type of system this is done by setting: auth_tcp = "none" In your /etc/libvirt/libvirtd.conf file, then restarting the libvirt daemon. Still, that will only help once you get the tcp connection listening anyway. :) Um, that's the best I can think of for the moment. Hopefully it helps? :) Regards and best wishes, Justin Clift

Thank you very much. It's working noow. Regard. Marcela 2011/2/1 Justin Clift <jclift@redhat.com>
On 02/02/2011, at 12:59 AM, <arnaud.champion@devatom.fr> < arnaud.champion@devatom.fr> wrote:
Hi,
donc forget to start libvirtd with the "-l" (listen) argument. Generally, it's in your /etc/init.d/libvirtd script.
Hey Marcela,
You didn't mention which Linux distro you're using? That'll help us know which config files you'd have and so forth. :)
Some thoughts:
+ Guessing you have root access on the "santacruz" box, so try this first with ssh just to see if it works:
$ virsh -c qemu+ssh://root@santacruz/system list
+ If that works, and you're ok with using ssh, then you can set up your "radic" user for access to libvirt:
http://wiki.libvirt.org/page/SSHSetup (the libvirt.org server seems to be offline atm :( )
When that's set up, you should then be able to connect with:
$ virsh -c qemu+ssh://radic@santacruz/system list
+ If you really want to enable the tcp connection type, rather than ssh, then you might want to turn off all authentication for it. On a RHELRHEL/Fedora/CentOS type of system this is done by setting:
auth_tcp = "none"
In your /etc/libvirt/libvirtd.conf file, then restarting the libvirt daemon. Still, that will only help once you get the tcp connection listening anyway. :)
Um, that's the best I can think of for the moment. Hopefully it helps? :)
Regards and best wishes,
Justin Clift

Hello Marcela, On 02/01/2011 11:14 AM, Marcela Castro León wrote: [...]
I've configured listen_tcp = 1 tcp_port = "16509"
[...] series of usual "stupid" questions: 1] have you restarted libvirt at santacruz? 2] is libvirt listening at 16509 at santacruz? # netstat -nlp | grep 16509 ; 3] isn't there firewall in your path? 4] please, try: % virsh -c qemu+ssh://santacruz/system list ; If you need to specify SSH port, then: % virsh -c qemu+ssh://santacruz:1234/system list ; I don't use TCP, so I can't help you with this one. May be it's the very same problem for TCP and SSH, because your commands didn't work for me either. Regards, Z. -- Zdenek Styblik Net/Linux admin OS TurnovFree.net email: stybla@turnovfree.net jabber: stybla@jabber.turnovfree.net
participants (4)
-
arnaud.champion@devatom.fr
-
Justin Clift
-
Marcela Castro León
-
Zdenek Styblik