diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 48791b2d..eb1c77d9 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 = ''; 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 627c0777..d10ba9ab 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' \