[pve-devel] [PATCH manager] fix #4068: expose fw_cfg through the GUI

2023-03-01 Thread Leo Nunner
Introduces a new UI element to set/edit/delete any number of fw_cfg arguments in a table-like manner. Signed-off-by: Leo Nunner --- www/manager6/Makefile| 1 + www/manager6/qemu/FirmwareCfgEdit.js | 224 +++ www/manager6/qemu/Options.js | 6 +

[pve-devel] [PATCH qemu-server docs manager] Implement support for fw_cfg

2023-03-01 Thread Leo Nunner
This patch introduces an interface for passing values to a guest via the fw_cfg parameter. Settings are in the format opt/$key=$value Where $key should start with a rfqdn (but doesn't need to). Both plain strings and files (only from the snippets directory) can be passed through. An example a

[pve-devel] [PATCH qemu-server 1/2] fix #4068: implement support for fw_cfg

2023-03-01 Thread Leo Nunner
Implements support for passing values to the fw_cfg argument for QEMU. If the value looks like a file, the backend checks for the correct permissions/path and if everything is right, includes it as a file instead of as a string. Setting the argument requires the VM.Config.Options permission on the

[pve-devel] [PATCH docs] fix #4068: document fw_cfg parameter

2023-03-01 Thread Leo Nunner
Signed-off-by: Leo Nunner --- qm.adoc | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qm.adoc b/qm.adoc index bd535a2..0c587ad 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1139,6 +1139,24 @@ http://localhost:9843 in a browser in the guest. It can help to restart the SPICE ses

[pve-devel] [PATCH qemu-server 2/2] test: add cfg2cmd tests for fw_cfg

2023-03-01 Thread Leo Nunner
Signed-off-by: Leo Nunner --- test/cfg2cmd/fw_cfg-files.conf | 15 ++ test/cfg2cmd/fw_cfg-files.conf.cmd | 30 test/cfg2cmd/fw_cfg-strings.conf | 15 ++ test/cfg2cmd/fw_cfg-strings.conf.cmd | 30 4 files

Re: [pve-devel] [PATCH manager 2/2] ui: cert upload: fix private key field sending empty string

2023-03-01 Thread Matthias Heiserer
On 28.02.2023 17:36, Max Carrara wrote: The private key's field is now excluded from the upload form's JSON data if it's considered empty by Ext.js. Prior to this change, the form still sent an empty string if no private key was provided by the user, even though the private key's field is marked

Re: [pve-devel] [PATCH common 1/2] certificate: add subroutine that checks if cert and key match

2023-03-01 Thread Fabian Grünbichler
On February 28, 2023 5:36 pm, Max Carrara wrote: > This is done here in order to allow other packages to make use of > this subroutine. > > Signed-off-by: Max Carrara > --- > src/PVE/Certificate.pm | 26 ++ > 1 file changed, 26 insertions(+) > > diff --git a/src/PVE/Cert

Re: [pve-devel] [PATCH common 2/2] certificate: fix formatting and whitespace

2023-03-01 Thread Fabian Grünbichler
On February 28, 2023 5:36 pm, Max Carrara wrote: > Signed-off-by: Max Carrara > --- > src/PVE/Certificate.pm | 23 --- > 1 file changed, 12 insertions(+), 11 deletions(-) > > diff --git a/src/PVE/Certificate.pm b/src/PVE/Certificate.pm > index 5ec1c6b..31def4c 100644 > --- a/

[pve-devel] [PATCH-SERIES v3 storage/docs] fix #2920: add options parameter to CIFS plugin

2023-03-01 Thread Fiona Ebner
similar to the already existing parameter for NFS. Changes v2 -> v3: * Rebase on current master. * Minor style fixes. Changes v1 -> v2: # pve-storage (1/2) * fixed nitpicks # pve-docs (2/2) * extended options explanation * changed example option to `echo_interval=30` as second parameter storag

[pve-devel] [PATCH v3 docs 1/1] fix #2920: add cifs options parameter

2023-03-01 Thread Fiona Ebner
From: Stefan Hrdlicka Signed-off-by: Stefan Hrdlicka [FE: rebase + style fix] Signed-off-by: Fiona Ebner --- Changes from v2: * use {pve} instead of PVE pve-storage-cifs.adoc | 8 1 file changed, 8 insertions(+) diff --git a/pve-storage-cifs.adoc b/pve-storage-cifs.adoc index e

[pve-devel] [PATCH v3 storage 1/1] fix #2920: cifs: add options parameter

2023-03-01 Thread Fiona Ebner
From: Stefan Hrdlicka This makes it possible to add all mount options offered by mount.cifs. NFS & CIFS now share the options parameter since they use it for the same purpose. Signed-off-by: Stefan Hrdlicka [FE: rebase + style fixes] Signed-off-by: Fiona Ebner --- Changes from v2: * minor

[pve-devel] [PATCH container 2/3] net: Drop unused `firewall` argument to add_bridge_fdb()

2023-03-01 Thread Christoph Heiss
PVE::Network::SDN::Zones::add_bridge_fdb() does not actually have a `firewall` parameter, so drop it. No functional changes. Signed-off-by: Christoph Heiss --- src/PVE/LXC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 54ee0d9..cd0ae

[pve-devel] [PATCH qemu-server 3/3] net: Drop unused `firewall` argument to {add, del}_bridge_fdb()

2023-03-01 Thread Christoph Heiss
PVE::Network::{add,del}_bridge_fdb() do not actually have a `firewall` parameter, so drop it. Same for the SDN equivalents. No functional changes. Signed-off-by: Christoph Heiss --- PVE/QemuServer.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b

[pve-devel] [PATCH network 1/3] zones: Drop unused `firewall` argument to {add, del}_bridge_fdb()

2023-03-01 Thread Christoph Heiss
PVE::Network::{add,del}_bridge_fdb() do not actually have a `firewall` parameter, so drop it. And since it wasn't used anywhere else in these subroutines, drop it completely. No functional changes. Signed-off-by: Christoph Heiss --- PVE/Network/SDN/Zones.pm | 12 ++-- 1 file changed, 6

[pve-devel] [PATCH network/container/qemu-server 0/3] Drop unused `firewall` argument to {add, del}_bridge_fdb()

2023-03-01 Thread Christoph Heiss
While working on this code, I noticed that ACAICS the `firewall` argument is never used (nor even declared!) [0] in both of PVE::Network::{add,del}_bridge_fdb(). Thus drop it everywhere and avoid needlessly passing around things which are never used anyway. Did some quick smoke-testing and everyt

[pve-devel] [PATCH v2 qemu-server] feature #3937: config: store user in meta property

2023-03-01 Thread Leo Nunner
Adds a field to the "meta" config property which stores the user who created the VM. Signed-off-by: Leo Nunner --- PVE/QemuServer.pm | 8 1 file changed, 8 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 40be44d..0a7a6b0 100644 --- a/PVE/QemuServer.pm +++ b/PVE/Q

[pve-devel] [PATCH v2 container 2/2] feature #3937: config: introduce meta property

2023-03-01 Thread Leo Nunner
Introduces a 'meta' property like the one already existing for VMs. Currently, it holds the creation time (ctime), the LXC version at the time of creation, and the user who created the container (cuser). Signed-off-by: Leo Nunner --- src/PVE/API2/LXC.pm | 2 ++ src/PVE/LXC/Config.pm | 42

[pve-devel] [PATCH v2 container 1/2] cleanup: json config: factor out ignored properties into hash

2023-03-01 Thread Leo Nunner
Signed-off-by: Leo Nunner --- src/PVE/LXC/Config.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index af25a96..aca72ae 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -1182,8 +1182,13 @@ sub check_type {

[pve-devel] [PATCH v2 container qemu-server] feature #3937: config: store user in meta property

2023-03-01 Thread Leo Nunner
Changes from v1: - rename property from "cuser" to "creation-user" - introduce the meta property for containers too container: Leo Nunner (2): cleanup: json config: factor out ignored properties into hash feature #3937: config: introduce meta property src/PVE/API2/LXC.pm | 2 ++

[pve-devel] [PATCH manager 1/2] ui: bulk start/stop: align capability checks with backend

2023-03-01 Thread Fiona Ebner
The backend requires VM.PowerMgmt, not Sys.PowerMgmt for bulk start and bulk stop. Signed-off-by: Fiona Ebner --- www/manager6/node/CmdMenu.js | 4 +++- www/manager6/node/Config.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/www/manager6/node/CmdMenu.js b/www/mana

[pve-devel] [PATCH-SERIES manager] improve bulk action permissions

2023-03-01 Thread Fiona Ebner
In the UI, fix the checks to use the same permission as the backend, i.e. VM.PowerMgmt rather than Sys.PowerMgmt. In the backend, also allow the bulk action when the user has the appropriate permission for each guest in the passed-in list. Fiona Ebner (2): ui: bulk start/stop: align capability

[pve-devel] [PATCH manager 2/2] api: node: bulk actions: allow when user has permission for each guest

2023-03-01 Thread Fiona Ebner
Users with permissions for some guests can already start a task for each sequentially. Signed-off-by: Fiona Ebner --- PVE/API2/Nodes.pm | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 47c2d74