[pve-devel] [PATCH manager 1/1] ui: qemu: show hint about prerequisites for virgl display

Stoiko Ivanov s.ivanov at proxmox.com
Fri Apr 29 18:50:08 CEST 2022


since there is no hard dependency on the needed libraries (and we
cannot easily check if a fitting GPU is present in the GUI) - notify
the user about the prerequisites - else the error-messages might be a
bit confusing [0]

Suggested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>

[0] https://forum.proxmox.com/threads/.61801/post-466750

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 www/manager6/qemu/DisplayEdit.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js
index 9bb1763e..602729d6 100644
--- a/www/manager6/qemu/DisplayEdit.js
+++ b/www/manager6/qemu/DisplayEdit.js
@@ -49,6 +49,13 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
 		    memoryfield.setEmptyText(Proxmox.Utils.defaultText);
 		}
 		memoryfield.setDisabled(disableMemoryField);
+
+		let hintfield = this.up('panel').down('field[name=virglhint]');
+		if (val === 'virtio-gl') {
+		    hintfield.setHidden(false);
+		} else {
+		    hintfield.setHidden(true);
+		}
 	    },
 	},
     },
@@ -60,6 +67,14 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
 	maxValue: 512,
 	step: 4,
 	name: 'memory',
+    },
+    {
+	xtype: 'displayfield',
+	userCls: 'pmx-hint',
+	hidden: true,
+	name: 'virglhint',
+	value: gettext('Note: You need to have a physical GPU in the host and have the necessary ' +
+	    'driver and library packages (libgl1, libegl1) installed'),
     }],
 });
 
-- 
2.30.2






More information about the pve-devel mailing list