KVM VNC Allow Remote Access

By default VNC Console on a KVM virtual Machine only listens to localhost. So you need to do SSH tunnel to access VNC console.

To make VNC available on all interfaces on Host machine, you need to edit file

vi  /etc/libvirt/qemu.conf

You need to uncomment the line vnc_listen = “0.0.0.0”.

# 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"

Once this is done, you need to shutdown and start the virtual machine. Just reboot won’t work.

root@PAR-199235:~# virsh vncdisplay kali-linux
127.0.0.1:0

root@PAR-199235:~# virsh shutdown kali-linux
Domain kali-linux is being shutdown

root@PAR-199235:~# virsh list --all
 Id   Name         State
-----------------------------
 -    kali-linux   shut off

root@PAR-199235:~# virsh start  kali-linux
Domain kali-linux started

root@PAR-199235:~# virsh vncdisplay kali-linux
:0

root@PAR-199235:~# 

See Linux KVM

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *