[pve-devel] [PATCH 5/5] fix #3593: Added vm core pinning pve-manager
Daniel Bowder
daniel at bowdernet.com
Wed Jun 8 13:54:28 CEST 2022
Signed-off-by: Daniel Bowder <daniel at bowdernet.com>
---
The fifth patch adds the cpuset value to the GUI under the VM.Config.Options panel. The cpuset is set as a vtype of CPUSet so that it can be checked by the regex match in the fouth patch. This was modeled after the existing 'name' option, where the labels and textfield type have been changed.
www/manager6/qemu/Options.js | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index a1def4bb..ce356130 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -341,6 +341,36 @@ Ext.define('PVE.qemu.Options', {
hookscript: {
header: gettext('Hookscript'),
},
+ cpuset: {
+ required: false,
+ header: gettext('CPU Set'),
+ defaultValue: "",
+ editor: caps.vms['VM.Config.Options'] ? {
+ xtype: 'proxmoxWindowEdit',
+ subject: gettext('CPU Set'),
+ items: {
+ xtype: 'inputpanel',
+ items: {
+ xtype: 'textfield',
+ name: 'cpuset',
+ vtype: 'CPUSet',
+ value: '',
+ fieldLabel: gettext('cpuset'),
+ allowBlank: true,
+ emptyText: gettext("Pin to cores (e.g. 0,2-6,8)"),
+ },
+ onGetValues: function(values) {
+ var params = values;
+ if (values.cpuset === undefined ||
+ values.cpuset === null ||
+ values.cpuset === '') {
+ params = { 'delete': 'cpuset' };
+ }
+ return params;
+ },
+ },
+ } : undefined,
+ },
};
var baseurl = 'nodes/' + nodename + '/qemu/' + vmid + '/config';
--
2.30.2
More information about the pve-devel
mailing list