virt-install ignoring vnc port/listen?

Solution 1:

You aren't doing anything wrong. The VNC protocol specifies that the "port" isn't actually a port, but an offset from 5900, the default VNC port.

Thus localhost:0 would connect to port 5900, localhost:1 would connect to port 5901, etc.


By default, libvirt only binds VNC listeners to localhost, regardless of what you specify on the command line. To change this, you need to edit the appropriate option in /etc/libvirt/qemu.conf.

# VNC is configured to listen on 127.0.0.1 by default.
# To make it listen on all public interfaces, uncomment
# this next option.
#
# NB, strong recommendation to enable TLS + x509 certificate
# verification when allowing public access
#
#vnc_listen = "0.0.0.0"

Make sure to reload or restart libvirtd after making this change.