Feature #162
Updated by walkero 24 days ago
Especially useful with the "None" display, if the user doesn't want to have a display on the system, but from time to time wants to use it. Using vnc argument enables qemu's vnc server, and any vnmc client can connect to it.
| argument | connection|
| -- | -- |
| -vnc :1 | Connects to TCP port 5901 |
| -vnc :2 | Connects to TCP port 5902 |
| -vnc unix:/path/to/socket | Uses a UNIX domain socket for local access |
- Password Authentication: To require a password for VNC clients, use:
`-vnc :1,password=on`
- TLS Encryption: For secure connections, you can set up TLS with x509 certificates:
`-object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on -vnc :1,tls-creds=tls0`
Connecting to it on the same machine the VNC client needs to use i.e. `localhost:5901`. From other systems using the host machine IP should be enough.
Information:
https://www.qemu.org/docs/master/tools/qemu-vnc.html
Two systems cannot run on the same vnc port, so there should be an option of up to 10 different displays (:1 - :10 will mean 5901-5910). There is no need to add port forwarding in the VM for this to work.