I can't use libvirt with listen TCP
I have found the solution, actually you also need to supply -l option to libvirt-bin init script.
Enable TCP in the libvirt service on the host OS.
Edit /etc/libvirt/libvirtd.conf to set:
listen_tls = 0
listen_tcp = 1
auth_tcp="none"
tcp_port = "16509"
Configure the libvirt service to listen on TCP
Edit /etc/init/libvirt-bin.conf to add the "-l" argument:
exec /usr/sbin/libvirtd -d -l
Restart libvirt service
Invoke: service libvirt-bin restart
**Test libvirt is started with “-l” parameter **
Invoke: ps -ef | grep libvirt
Verify that the output contains the "-l" argument:
.... /usr/sbin/libvirtd -d -l
The source: http://pineapplesoftware.blogspot.com.tr/2012/11/configuring-unsecure-remote-access-to.html
Since there are small inconsistencies in @Mustafa answer, I am rewriting some of the 'steps'. The following was tested on Ubuntu 12.04
-
Update the libvirt configurations. Modify /etc/libvirt/libvirtd.conf
before : #listen_tls = 0
after : listen_tls = 0before : #listen_tcp = 1
after : listen_tcp = 1add: auth_tcp = "none"
-
Modify /etc/init/libvirt-bin.conf. (-l is short for –listen)
before : env libvirtd_opts="-d"
after : env libvirtd_opts="-d -l" -
Modify /etc/default/libvirt-bin.
before :libvirtd_opts=" -d"
after :libvirtd_opts=" -d -l" -
Restart libvirt. After executing the command, ensure that libvirt is successfully restarted.
# stop libvirt-bin && start libvirt-bin
$ ps -ef | grep libvirt
The output of the last one should be something like:
root XXXXX 1 22 07:55 ? 00:00:01 /usr/sbin/libvirtd -d -l