qxl max_outputs: ostype can be undefined, assume linux

Out code behaves like either l26 or other when the ostype is
undefined, both are not common as our webinterface _always_ sets the
ostype.

If one configured QXL with a VM as output device but does not has an
ostype set, and that works without "max_outputs=4" it really should
work with none too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-11-20 15:10:16 +01:00
parent 6021c7a5ed
commit c5a4c92cd9

View File

@ -2189,7 +2189,7 @@ sub print_vga_device {
if ($qxlnum) {
$type = $id ? 'qxl' : 'qxl-vga';
if ($conf->{ostype} =~ m/^l(?=\d)/) {
if (!$conf->{ostype} || $conf->{ostype} =~ m/^(?:l\d\d)|(?:other)$/) {
# set max outputs so linux can have up to 4 qxl displays with one device
$max_outputs = ",max_outputs=4";
}