Having newly compiled a Libvirt on a Windows Vista machine (many thanks to Matthias Bolte) I have attempted to connect to a remote Ubuntu machine using virsh.exe. However, the connection fails as follows: $ virsh -c qemu+tcp:///system error: unable to connect to libvirtd at 'localhost': errno=10061 error: failed to connect to the hypervisor 1. I have modified /etc/libvirt/libvirt.conf to set listen_tcp=1. 2. I cannot find /etc/sysconfig/libvirtd so I am unable to set LIBVIRTD_ARGS="--listen". As stated on a previous post, my background is Windows rather than Linux, so I am at a loss as to know where to look next. I would very much appreciate some guidance. Many thanks in anticipation... Tim McLeod -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100428/3d89f359/attachment.htm>
On 04/28/2010 03:38 PM, Tim McLeod wrote:> Having newly compiled a Libvirt on a Windows Vista machine (many thanks > to Matthias Bolte) I have attempted to connect to a remote Ubuntu > machine using virsh.exe. However, the connection fails as follows: > > > > $ virsh -c qemu+tcp:///systemWell, you have two problems. The first is that this URI is trying to connect to the localhost; you need to specify which host you want to connect to: $ virsh -c qemu+tcp://ubuntu-host.example.com/system The second problem...> 1. I have modified /etc/libvirt/libvirt.conf to set listen_tcp=1. > > 2. I cannot find /etc/sysconfig/libvirtd so I am unable to set > LIBVIRTD_ARGS="--listen"....is that this setup is not enough. When using TCP, by default, we require authentication/encryption to be done via SASL (kerberos). Your best bet for production use is going to be to setup TLS (meaning you have to setup certificates on the destination machine) or setup SASL (meaning you have to setup sasl on the destination machine). Instructions for generating certificates are here: http://libvirt.org/remote.html#Remote_certificates (unfortunately setting up SASL is a bit baroque, and I don't remember all of the ins and outs of it at the moment) If you just want to *test* using plain TCP, then you'll have to change auth_tcp = "sasl" to auth_tcp = "none" (and uncomment it) in /etc/libvirt/libvirtd.conf on the destination machine (though we don't recommend this setup). -- Chris Lalancette
2010/4/28 Tim McLeod <tim.mcleod at simulamen.eu>:> Having newly compiled a Libvirt on a Windows Vista machine (many thanks to > Matthias Bolte)Nine :)> I have attempted to connect to a remote Ubuntu machine using > virsh.exe.? However, the connection fails as follows: > > > > $ virsh -c qemu+tcp:///systemYou need to specify the server in this URI using a hostname or IP address: qemu+tcp://ubuntu-server.com/system> error: unable to connect to libvirtd at 'localhost': errno=10061 > > error: failed to connect to the hypervisor > > > > 1.? I have modified /etc/libvirt/libvirt.conf to set listen_tcp=1.You also need to change this #auth_tcp = "sasl" to auth_tcp = "none" to disable SASL authentication/encryption for TCP connections, because your libvirt on Windows is compiled without SASL support. If you need the libvirt connections to be encrypted you can switch from TCP to TLS connections using: qemu+tls://ubuntu-server.com/system> 2.? I cannot find /etc/sysconfig/libvirtd so I am unable to set > LIBVIRTD_ARGS="--listen". >For Ubuntu packaged libvirt see /etc/default/libvirt-bin and change libvirtd_opts="-d" to libvirtd_opts="-d -l" as the comment suggest and restart libvirtd using /etc/init.d/libvirt-bin restart Now you should be able to connect to the libvirtd on your Ubuntu server. Matthias
Maybe Matching Threads
- Windows Vista Client Fails to Connect to Ubuntu libvirtd
- Remote and local connections at the same time (Centos 7)
- Libvirt Compilation on MS Vista
- libvirtd + vir-manager + kerberos
- P2P live migration with non-shared storage: fails to connect to remote libvirt URI qemu+ssh