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:///system
Well, 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