and exit early if they are not met.
The necessary libraries were taken from Thomas' post in our community
forum:
https://forum.proxmox.com/threads/.61801/post-466767 (ff)
The /dev/dri/renderD.* check is based on util/drm.c in the current
qemu source code.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
$pciaddr = print_pci_addr($vgaid, $bridges, $arch, $machine);
}
+ if ($vga->{type} eq 'virtio-gl') {
+ if ( ! -e '/usr/lib/x86_64-linux-gnu/libEGL.so.1' ||
+ ! -e '/usr/lib/x86_64-linux-gnu/libGL.so.1') {
+ die "missing libraries for '$vga->{type}' detected (install libgl1 and libegl1)\n";
+ }
+
+ if ( ! PVE::Tools::dir_glob_regex('/dev/dri/', "renderD.*")) {
+ die "no drm render node detected (/dev/dri/renderD*) - needed for '$vga->{type}' display\n";
+ }
+ }
+
return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}${edidoff}";
}