Can't get remote Qemu VNC to work

I’m trying to run a Qemu VM installation on a headless remote server running openSUSE Leap 42.1. However, I’m never able to connect to the VM with a remote client; I’ve ensured that VNC gets bound to and even disabled the firewall, but the connection always just times out.

Here’s an example command that I’m trying to run (after creating disk.img):

qemu-system-x86_64 -cdrom <path-to-iso> -boot order=d -drive file=disk.img,format=qcow2 -vnc

I’ve tried adding the -nographic option too, but to no avail.

Any tips?

Did you try omit host part (which should cause qemu to accept connection from any host: qemu … -vnc :0)? Did you try another VNC number?

Yeah, I tried it with “-vnc :0” and connecting to port 5900, but no dice. Same with :1 and 5901.

Not sure if it’s relevant, but I’m also getting this output when I kick off the machine:

Warning: default mac address being used, creating potential for address conflict

Thinking about it more, I’m sure this has to be a problem with the server being headless. Installing Qemu brought in some X dependencies, but none of them are being used by the system. Using VNC should make X unnecessary, right?

First, of course you need to verify basic network connectivity.
Then, installing VNC in your VM should be no different than installing on bare metal, the opensuse community docs has a good guide, read it and be sure you understand how vnc server is implemented which may be different than what you may have experienced before

Installing VNC in openSUSE should <always> be done using the YaST Remote Administration module, it will install all the dependencies you need including an xorg x-server. Nowadays, modern Linux architectures will often <not> install an xorg x-server for local use, but these new implementations don’t usually support remote access yet (which is why you need to install).

Otherwise, properly configured the VNC server has little to do with whether your HostOS is a headless install because your VM should be its own isolated and completely self-contained machine, not dependent on what is in the HostOS (unless you do something like pass-through). Or, as I’ve explained even if your VM is “headless.”


You need to fix your networking, I don’t see anything I recognize in your command that invokes your VM specifying how your networking should be configured. If you installed KVM/QEMU completely and follow standard configurations, you should be making use of configured Linux Bridge Devices.

What guide are you following creating and invoking your QEMU VMs?


FYI - some resources to invoke your qemu VM correctly and manage
Note that I’m pointing you to SLES documentation, which is perfectly fine and should work without any alterations (except maybe invoke images other than SLES by default)

The SLES KVM/QEMU documentation

In a hurry? Just use the invocation in the last section as a template to start your VMs

More SLES documentation, perhaps organized best for quick reading, the following is for your networking


Pay close attention to the VNC server configuration file used nowadays, it defines the Guest configurations that are enabled.
In other words, if you’re used to defining options in your VNC connection other than an address and a port, you need to update your knowledge.