[pve-devel] [PATCH 5/5] fix #3593: Added vm core pinning pve-manager
Matthias Heiserer
m.heiserer at proxmox.com
Wed Jun 8 16:39:29 CEST 2022
On 08.06.2022 13:54, Daniel Bowder wrote:
> 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,
typo: fouth -> fourth
Don't think you should be referencing other patches by number in the
commit message though, so the comment is a fitting location for this remark.
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';
Is a string the best way of entering the CPUs in the GUI? Maybe a
dropdown where you can (un)select the cores?
More information about the pve-devel
mailing list