with pve-qemu-4.0.1-3 or higher it was not possible in a spice remote session to enable more displays on the fly in linux guests.
Adding the `max_outputs` parameter to the qxl device manually restores the functionality. Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com> --- PVE/QemuServer.pm | 10 +++++++++- test/cfg2cmd/spice-usb3.conf.cmd | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 11e7169..d05707d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2184,9 +2184,17 @@ sub print_vga_device { $type = 'virtio-gpu'; } my $vgamem_mb = $vga->{memory}; + + my $max_outputs = undef; if ($qxlnum) { $type = $id ? 'qxl' : 'qxl-vga'; + + if ($conf->{ostype} =~ m/^l(?=\d)/) { + # set max outputs so linux can have up to 4 qxl displays with one device + $max_outputs = ",max_outputs=4"; + } } + die "no devicetype for $vga->{type}\n" if !$type; my $memory = ""; @@ -2218,7 +2226,7 @@ sub print_vga_device { $pciaddr = print_pci_addr($vgaid, $bridges, $arch, $machine); } - return "$type,id=${vgaid}${memory}${pciaddr}"; + return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}"; } sub drive_is_cloudinit { diff --git a/test/cfg2cmd/spice-usb3.conf.cmd b/test/cfg2cmd/spice-usb3.conf.cmd index 627c077..d10ba9a 100644 --- a/test/cfg2cmd/spice-usb3.conf.cmd +++ b/test/cfg2cmd/spice-usb3.conf.cmd @@ -21,7 +21,7 @@ -device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b' \ -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' \ -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=xhci.0' \ - -device 'qxl-vga,id=vga,bus=pci.0,addr=0x2' \ + -device 'qxl-vga,id=vga,max_outputs=4,bus=pci.0,addr=0x2' \ -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' \ -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel