]> git.proxmox.com Git - qemu-server.git/commitdiff
print_vga_device: fix qxl displays on Linux guests
authorAaron Lauterer <a.lauterer@proxmox.com>
Tue, 19 Nov 2019 15:18:19 +0000 (16:18 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Nov 2019 14:05:43 +0000 (15:05 +0100)
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.lauterer@proxmox.com>
PVE/QemuServer.pm
test/cfg2cmd/spice-usb3.conf.cmd

index 48791b2dc873421cd89195b363a0a2ed22e11c50..eb1c77d95366ff972085716d98630098143b05e1 100644 (file)
@@ -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 {
index 627c0777ef7d6b6ca610b4ac3487230e14c87e21..d10ba9abf500943313af7696aa4b57c889509368 100644 (file)
@@ -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' \