Configure VNC Access in the Configuration File

kentravis

New Member
Feb 23, 2023
10
0
1
Wanted to access a VM with NoVNC independent of the Proxomox console, I followed this post https://pve.proxmox.com/wiki/VNC_Client_Access - added args: -vnc 0.0.0.0:77 to the /etc/pve/local/qemu-server/<VMID>.conf file. It didn't work. When I browse to https://192.168.0.105:5977 it gives

This site can’t be reached​

192.168.0.105 refused to connect.

The VMs firewall is off and I can ping the vm.

Can someone tell me what am I missing?
 
Last edited:
read the wiki carefully! No https - u use a vnc client to connect.
 
I tried using the vm 192.168.0.105:5977 and I tried using the Promox server 192.168.0.100:5977. (Not much details in the post on how it's suppose to work, but I have tried everything I can think of.)
 
you have to use the proxmox server ip.
what ist the output of:
Code:
# telnet 192.168.0.100  5977
 
ken@box:~$ telnet 192.168.0.100 5977
Trying 192.168.0.100...
telnet: Unable to connect to remote host: Connection refused

But I can connect to the Promox server -
ken@box:~$ telnet 192.168.0.100 8006
Trying 192.168.0.100...
Connected to 192.168.0.100.
 
For reference here is 105.conf:

boot: order=scsi0;ide2;net0
cores: 1
ide2: none,media=cdrom
memory: 4096
meta: creation-qemu=7.1.0,ctime=1677876453
name: Desktop
net0: virtio=AA:A6:66:54:D3:5E,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: CTs:vm-105-disk-0,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=b0f613b8-c9f0-4952-b41b-7ec60efa00ae
sockets: 4
vga: qxl
vmgenid: b8867159-2180-4939-896d-d398d9567619
args: -vnc 0.0.0.0:77
 
I hope u tested it with startet vm on the host. whats the output of:
Code:
# ss -ltn | grep 5977
 
nothing -
root@pve:~# ss -ltn | grep 5977
root@pve:~#

I am able to connect via the Proxmox NoVNC console (the vm is running).
 
Last edited:
root@pve:~# ss -ltn
State Recv-Q Send-Q Local Address:port Peer Address:port Process
LISTEN 0 4096 0.0.0.0:111 0.0.0.0:*
LISTEN 0 4096 127.0.0.1:85 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 100 127.0.0.1:25 0.0.0.0:*
LISTEN 0 4096 127.0.0.1:61000 0.0.0.0:*
LISTEN 0 4096 [::]:111 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 4096 *:3128 *:*
LISTEN 0 100 [::1]:25 [::]:*
LISTEN 0 4096 *:8006 *:*
root@pve:~# ^C
root@pve:~#
 
Last edited:
which vnc are you using? I'm using "ultravnc" everthings are work fine

if your VE host IP is 192.168.0.100
and you guest IP is 192.168.0.105
and args: -vnc 0.0.0.0:77

then your VNC is connect to 192.168.0.100:5977
 
Hi, just asking to be sure: Did you shut down and start the VM after adding the args option, for example by running qm shutdown VMID; qm start VMID (replacing the VMID accordingly)?
 
I did reboot the vm to start via the Proxmox GUI, but I just tried with the your command - qm shutdown 105, and it timed out, which could indicate the VM is missing something. The VM is Kubuntu installed from iso, and I had installed qemu-guest-agent on it.
 
Last edited:
It's Working!

I shut down the VM within the VM, then I started it with qm start 105, then attempted log in.

THANK YOU! :)

I wonder if I will have to start always with qm start or whether it now will just work.
 
Good to hear it works now! For some configuration changes to take effect (such as changes to the QEMU arguments to add the vnc option), it is not enough to do an in-guest reboot via qemu-guest-agent, but it is necessary to "fully" restart the VM. This means you need to shutdown/stop the VM, and then start it again. You can also do this via the GUI, though: Shutdown/stop the VM, wait until it is off, and start it again.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!