Libvirt daemon is not listening on tcp ports although configured to
Libvirt daemon is not listening on TCP ports
While libvirtd should listen on TCP ports for connections the connections fail:
# virsh -c qemu+tcp://host/system error: unable to connect to server at 'host:16509': Connection refused error: failed to connect to the hypervisor
Libvirt daemon is not listening on TCP ports even after changing configuration in /etc/libvirt/libvirtd.conf:
# grep listen_ /etc/libvirt/libvirtd.conf listen_tls = 1 listen_tcp = 1 listen_addr = "0.0.0.0"
But the TCP ports for libvirt are not open:
# netstat -lntp | grep libvirtd #
Libvirt daemon was started without the --listen option. You may verify that by running:
# ps aux | grep libvirtd root 27314 0.0 0.0 1000920 18304 ? Sl Feb16 1:19 libvirtd --daemon
The output does not contain the option --listen
Start the daemon with the opiton --listen.
On RHEL/Fedora/CentOS modify the file /etc/sysconfig/libvirtd and uncomment the following line:
On Gentoo modify file /etc/conf.d/libvirtd and uncomment:
Restart the libvirtd service afterwards:
# /etc/init.d/libvirtd restart