[SOLVED] Apply qm.conf VNC setting

DLZ-TVotR

New Member
Sep 2, 2020
10
1
3
32
I have just added args: -vnc 0.0.0.0:50 to a VMs qm.conf, but it seems to have no effect. Is there a command I need to run to apply it?

Code:
root@pve:/etc/pve/local/qemu-server# qm config 114 --current
args: -vnc 0.0.0.0:50

it is showing in the config, but the server is not listening on port 5950 as expected:

Code:
root@pve:/etc/pve/local/qemu-server# ss -pln | grep 5950
root@pve:/etc/pve/local/qemu-server#

and connections are refused.

Do I need to also run change vnc 0.0.0.0:50 in the vms monitor? The whole reason I am looking to do it this way in qm.conf is for persistence. The changes I send through monitor don't seem to stick even if the VMs are not rebooted, they timeout at some point.
 
  • Add in the VM´s configuration file /etc/pve/local/qemu-server/<KVM ID>.conf a line which specifies the VNC display number as follows ("77" in the example below):
args: -vnc 0.0.0.0:77


The display number can be freely chosen, but each number must occur only once. VNC service listens then at port 5900+display_number. Note that connections via noVNC start using display number 0 consecutively therefore it´s recommended to use higher numbers in order to avoid conflicts.


  • Connect from VNC client to Proxmox host ip address and port as specified (5977 in the above example)

Note: Using this method it not possible to set a VNC password.


Yeah, I am following the above section.

I have added the line to <vm>.conf file

Code:
root@pve:/etc/pve/local/qemu-server# cat 114.conf
bootdisk: scsi0
cores: 2
ide2: ISOs:iso/debian.iso,media=cdrom
memory: 2048
name: debian
net0: virtio=B2:67:12:95:28:0F,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: LocalHDD:114/vm-114-disk-0.qcow2,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=61f8e25d-3bb3-4df1-8e8f-5abb7d843009
sockets: 1
vmgenid: 2aa980c2-06e8-417b-952f-374c6ea0c31a
args: -vnc 0.0.0.0:50


It is showing in the vms current config:


Code:
root@pve:/etc/pve/local/qemu-server# qm config 114 --current
args: -vnc 0.0.0.0:50
bootdisk: scsi0
cores: 2
ide2: ISOs:iso/debian.iso,media=cdrom
memory: 2048
name: debian
net0: virtio=B2:67:12:95:28:0F,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: LocalHDD:114/vm-114-disk-0.qcow2,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=61f8e25d-3bb3-4df1-8e8f-5abb7d843009
sockets: 1
vmgenid: 2aa980c2-06e8-417b-952f-374c6ea0c31a
root@pve:/etc/pve/local/qemu-server#


yet connections are refused and the server is not listening on port 5950

Code:
root@pve:/etc/pve/local/qemu-server# ss -pln | grep 5950
root@pve:/etc/pve/local/qemu-server#
 
I had to power off the VM entirely and then power it on for the change to have an effect:

Code:
root@pve:/etc/pve/local/qemu-server# ss -pln | grep 5950
tcp                LISTEN              0                    1                                                                                           0.0.0.0:5950                                           0.0.0.0:*                         users:(("kvm",pid=17383,fd=27))


Could be worth adding that as a step in the "Configure VNC Access via Configuration File" section of the wiki.
 

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!