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

  1. Update the libvirt configurations. Modify /etc/libvirt/libvirtd.conf

    before : #listen_tls = 0
    after : listen_tls = 0

    before : #listen_tcp = 1
    after : listen_tcp = 1

    add: auth_tcp = "none"

  2. Modify /etc/init/libvirt-bin.conf. (-l is short for –listen)

    before : env libvirtd_opts="-d"
    after : env libvirtd_opts="-d -l"

  3. Modify /etc/default/libvirt-bin.

    before :libvirtd_opts=" -d"
    after :libvirtd_opts=" -d -l"

  4. 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