Do I need to install a special package to get the VNC support?
I installed:
sudo apt-get install kvm qemu-kvm qemu-kvm-extrasEverything works fine. I only get no VNC server up and running, although it's configured for the VM.
Maybe this is a firewall problem since I can connect locally.
32 Answers
VNC support should be available by default. So as you said there may be a problem in firewall or qemu/libvirt configuration.
Regarding qemu by default it only accepts local vnc connections. To change that edit /etc/libvirt/qemu.conf:
vnc_listen = "0.0.0.0"This will enable connections from all hosts, which depending what you are trying to do can be very dangerous. In that file you can find more info on how to secure things up.
Also, if you use libvirt I think it also only accepts local connections by default. To enable remote access edit /etc/libvirt/libvirtd.conf:
listen_tcp = 1The same security concerns regarding qemu apply here. See how to secure the connection if needed here.
As a last resort check if the ports used by vnc and libvirt are open. In the case you are using ufw:
sudo ufw status verbose 2 KVM (QEMU) has a built-in VNC server, and it works by default. It can be enabled in several ways. If you want a graphical tool, use virt-manager.
HOWEVER, IMO there is a better option, use the SPICE package.
The SPICE server is much faster.
Ubuntu wiki spice -
I use SPICE on Fedora, sorry about that. For Ubuntu see:
Getting SPICE working in Ubuntu 12.04.1-LTS
For a nice demo see:
Yes, it is a bit dated and for Fedora, but I use SPICE with my Ubuntu guests, and it works fine.
1