Proxmox 5.3 --> spice port ignored!

GUENTER

New Member
Oct 14, 2015
26
3
3
Hallo,

after the upgrade yesterday to the latest packages I do have an big issue

I do have in the <vmid>.conf an additional -args line with the spice port and address set like:
args: -spice port=59105,addr=0.0.0.0,disable-ticketing
But when I start the VM there is the port not used:
netstat -tlnp|grep kvm
tcp 0 127.0.0.1:60000 0.0.0.0:* LISTEN 4397/kvm
But when I check the process which is started:
ps aux | grep 4397
is the -args line on the end of the command:
/usr/bin/kvm -id 106 -name pbk-ws02 -chardev socket,id=qmp,path=/var/run/qemu-server/106.qmp,server,nowait -mon chardev=qmp,mode=control -chardev
socket,id=qmp-event,path=/var/run/qemu-server/106-event.qmp,server,nowait -mon chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/106.pid -daemonize -smbios type=1,uuid=7d66abda-a835-4951-8391-f7fa25c0
aba9 -smp 2,sockets=2,cores=1,maxcpus=2 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg -vga qxl -vnc unix:/var/run/qemu-server/106.vnc,x509,password -cpu kvm
64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 4096 -k de -device pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f -device pci-bridge,id=pci.1,chassis
_nr=1,bus=pci.0,addr=0x1e -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -readconfig /usr/share/qemu-server/pve-usb.cfg -chardev spicevmc,id=usbredirchardev0,name=usbredir -device usb-redir,chardev=usbred
irchardev0,id=usbredirdev0,bus=ehci.0 -chardev spicevmc,id=usbredirchardev1,name=usbredir -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0 -chardev socket,path=/var/run/qemu-server/106.qga,s
erver,nowait,id=qga0 -device virtio-serial,id=qga0,bus=pci.0,addr=0x8 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -spice tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on -
device virtio-serial,id=spice,bus=pci.0,addr=0x9 -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
-iscsi initiator-name=iqn.1993-08.org.debian:01:e9eafd5f9f33 -drive if=none,id=drive-ide2,media=cdrom,aio=threads -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/data/images/
106/vm-106-disk-1.qcow2,if=none,id=drive-virtio0,cache=writeback,format=qcow2,aio=threads,detect-zeroes=on -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -netdev type=tap,
id=net0,ifname=tap106i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=22:2A:60:43:5F:59,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootind
ex=300 -rtc base=localtime -spice port=59105,addr=0.0.0.0,disable-ticketing
When I change the command and move the parameters after the memory like:
/usr/bin/kvm -id 106 -name pbk-ws02 -chardev socket,id=qmp,path=/var/run/qemu-server/106.qmp,server,nowait -mon chardev=qmp,mode=control -chardev
socket,id=qmp-event,path=/var/run/qemu-server/106-event.qmp,server,nowait -mon chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/106.pid -daemonize -smbios type=1,uuid=7d66abda-a835-4951-8391-f7fa25c0
aba9 -smp 2,sockets=2,cores=1,maxcpus=2 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg -vga qxl -vnc unix:/var/run/qemu-server/106.vnc,x509,password -cpu kvm
64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 4096 -k de -spice port=59106,addr=0.0.0.0,disable-ticketing -device pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f -device pci-bridge,id=pci.1,chassis
_nr=1,bus=pci.0,addr=0x1e -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -readconfig /usr/share/qemu-server/pve-usb.cfg -chardev spicevmc,id=usbredirchardev0,name=usbredir -device usb-redir,chardev=usbred
irchardev0,id=usbredirdev0,bus=ehci.0 -chardev spicevmc,id=usbredirchardev1,name=usbredir -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0 -chardev socket,path=/var/run/qemu-server/106.qga,s
erver,nowait,id=qga0 -device virtio-serial,id=qga0,bus=pci.0,addr=0x8 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -spice tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on -
device virtio-serial,id=spice,bus=pci.0,addr=0x9 -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
-iscsi initiator-name=iqn.1993-08.org.debian:01:e9eafd5f9f33 -drive if=none,id=drive-ide2,media=cdrom,aio=threads -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/data/images/
106/vm-106-disk-1.qcow2,if=none,id=drive-virtio0,cache=writeback,format=qcow2,aio=threads,detect-zeroes=on -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -netdev type=tap,
id=net0,ifname=tap106i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=22:2A:60:43:5F:59,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootind
ex=300 -rtc base=localtime
When I run the command manual the Port is available and can be used with the spice client as expected!

The realy curius is that this server is one of three where the both other do not have this issue! [EDIT] after a reboot all of them do have the same issue!

Do have somebody a clue where I can force the service to use the parameters in the config first by default?

Günter
 
Last edited:

GUENTER

New Member
Oct 14, 2015
26
3
3
Now I translate the post above to English and hopefully someone can help me!
 

GUENTER

New Member
Oct 14, 2015
26
3
3
Hello again...

is there nobody which get the same issue?

Today there where some updates but still the same behavior!

170+ views but no reply at all within more than one day...

Is it maybe an issue because I add the args in the <vmid>.conf file manualy (since PVE 3)?

Here as example the contend of one machine config:
agent: 1
args: -spice port=59105,addr=0.0.0.0,disable-ticketing
bootdisk: virtio0
cores: 2
ide2: none,media=cdrom
memory: 4096
name: hostname
net1: e1000=3E:54:4B:92:B4:35,bridge=vmbr0
numa: 0
onboot: 1
ostype: win8
scsihw: virtio-scsi-pci
smbios1: uuid=2fefec95-80c2-8145-82eb-114e7e7522e1
sockets: 2
usb0: spice
vga: qxl
virtio0: datastore5:105/vm-105-disk-2.qcow2,size=80G
 
Last edited:

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,789
345
83
31
Vienna
we recently moved the position of the 'args' command to the end of the qemu commandline because of some other issues (not all options were overwritable), seems
qemu uses only the first spice port it is given

what you can currently do is to spice for the guest in our config, and adding all necessary devices (chardevs, etc. ) directly in the args
 

GUENTER

New Member
Oct 14, 2015
26
3
3
Hello dcsapak,

first thank's for your reply!

Is there a posibility to remove / disable the
-spice tls-port=
in the default config of each host?

Best regards
Günter
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,789
345
83
31
Vienna
no, there is only the possibility to entirely disable spice for the vm, then you have to specify the devices yourself (as i wrote)
 

GUENTER

New Member
Oct 14, 2015
26
3
3
After switching the Display back from spice to default, the args with the spice port are working.

But now the dynamic screen resolution switching do not work anymore, so the user have to set the resolution manualy...

Is there no better solution available?
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,789
345
83
31
Vienna
Is there no better solution available?
as i said, recreate all spice relevant options in the args, not only the '-spice' part

the easies is probably when you do
Code:
qm showcmd ID --pretty
once with spice enabled and once with spice disabled, and look at the differences
 

GUENTER

New Member
Oct 14, 2015
26
3
3
Thank's again for the hint but when I compare the output of two KVM machines wit the command you mentioned the different type of Display device is shown:
< -vnc unix:/var/run/qemu-server/130.vnc,x509,password \
---
> -vnc unix:/var/run/qemu-server/108.vnc,x509,password \
17c17
< -m 3072 \
---
> -m 4096 \
19d18
< -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
20a20
> -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
22,23c22,24
< -device 'qxl-vga,id=vga,bus=pci.0,addr=0x2' \
< -chardev 'socket,path=/var/run/qemu-server/130.qga,server,nowait,id=qga0' \
---
> -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
> -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
> -chardev 'socket,path=/var/run/qemu-server/108.qga,server,nowait,id=qga0' \
26,29d26
< -spice 'tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on' \
< -device 'virtio-serial,id=spice,bus=pci.0,addr=0x9' \
< -chardev 'spicevmc,id=vdagent,name=vdagent' \
< -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \
34c31
But when I change the type to default and add the qxl-vga then there are two display adapters set at the same time...

How can I prevent this?

Best regards
Guenter
 

GUENTER

New Member
Oct 14, 2015
26
3
3
Now I try to set the display in gui "vga: none" and start the vm "normaly", the spice port which is set in the args are available but when I connect with remote-viewer there just shown this:
20190225_remote_viewer.png
And it never get more, tried with windows and linux kvm machines.

The output of:
# qm showcmd 107
/usr/bin/kvm -id 107 -name jdownloader -chardev 'socket,id=qmp,path=/var/run/qemu-server/107.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/107.pid -daemonize -smbios 'type=1,uuid=ecef139b-bffb-4b06-9ee4-9d2767534954' -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga none -nographic -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 4096 -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -readconfig /usr/share/qemu-server/pve-usb.cfg -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -chardev 'spicevmc,id=usbredirchardev0,name=usbredir' -device 'usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=ehci.0' -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:9a7cb1e7aaf7' -drive 'if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/var/lib/datastore2/images/107/vm-107-disk-0.qcow2,if=none,id=drive-virtio0,cache=writeback,format=qcow2,aio=threads,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap107i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=EE:19:42:9A:12:99,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -machine 'type=pc' -spice 'port=59107,addr=0.0.0.0,disable-ticketing'
Btw. then also vnc is not shown so no console or other graphical interface possible...

Even no spice USB redirection and other spice relevant settings are there!

This NO solution at all!

Is there no one else which is using the spice feature in PVE this way?
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,789
345
83
31
Vienna
The output of:
you did not add the 'qxl' device to the args, of course you get no picture because then your vm has no vga device

i explicitely mentioned that you need to add everything that is missing (from the vm with enabled spice)to the args incl the qxl-vga device and the spice chardevs
if you want spice usb redirection then you need to add a usb port with 'spice' (see the output of 'qm showcmd' with a usbX: spice in the config with spice enabled)
 

GUENTER

New Member
Oct 14, 2015
26
3
3
Hello,

sorry but this is no solution to dig into so deep and prevent every update in the future!

Hopefully this for me major change fixes more issues somewhere else!

For me this behavior is a real show stopper!

Currently I start the vms with my own commandlines, as long as no one is using the web interface or the ssh qm start command it will work better for me than the proposed work around from Proxmox.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!