[pve-devel] applied: [PATCH manager 2/2] api: fill in nodeconfig schema

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 11:26, Wolfgang Bumiller wrote: > Signed-off-by: Wolfgang Bumiller > --- > PVE/API2/NodeConfig.pm | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > applied, thanks! ___ pve-devel mailing list pve-devel@

[pve-devel] applied: [PATCH manager 1/2] nodeconfig: use common config parser

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 11:26, Wolfgang Bumiller wrote: > Signed-off-by: Wolfgang Bumiller > --- > PVE/NodeConfig.pm | 75 +++ > 1 file changed, 10 insertions(+), 65 deletions(-) > > applied, thanks! ___ pve-devel mai

Re: [pve-devel] [PATCH v2 access-control++ 00/12] SuperUser privilege

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > v1->v2: > * added some basic docs still missing even though I requested this a few times already: - list of API paths that are root-only still and why/plans on how to proceed there - list of other things which are root-only still and why/plans on

[pve-devel] [PATCH qemu-server v2] fix #3784: Parameter for guest vIOMMU

2022-03-17 Thread Markus Frank
added a Parameter for vIOMMU so nobody has to use a github-script or change the kvm command on every vm boot. The args parameter doesn't work because the -device parameter(kvm) with intel-iommu has to be placed before the other arguments. vIOMMU enables the option to pass through pci devices to gu

Re: [pve-devel] [PATCH v13 qemu-server 7/8] api: support VM disk import

2022-03-17 Thread Gilberto Ferreira via pve-devel
--- Begin Message --- That's awesome! This is a feature much welcome. A lot of people, including me, await for that. Much appreciated. Thanks --- Gilberto Nunes Ferreira Em qui., 17 de mar. de 2022 às 09:35, Thomas Lamprecht < t.lampre...@proxmox.com> escreveu: > Hi, > > On 17.03.22 13:23

Re: [pve-devel] [PATCH v13 qemu-server 7/8] api: support VM disk import

2022-03-17 Thread Thomas Lamprecht
Hi, On 17.03.22 13:23, Gilberto Ferreira wrote: > Sorry to make noise in this thread but this is intended to be a GUI to qm > importdisk CLI command? yes, this series is a preparation for exactly that. ___ pve-devel mailing list pve-devel@lists.proxm

Re: [pve-devel] [PATCH v2 container] fix #3927: Containers that are already stopped now return 0, like VMs

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 13:16, Daniel Tschlatscher wrote: > Signed-off-by: Daniel Tschlatscher > --- > Fixed indentation and trailing whitespace > src/PVE/API2/LXC/Status.pm | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm

Re: [pve-devel] [PATCH v2 manager 06/12] api: update comment about login prompt for non-root users

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > we have a SU privilege now, but we still drop to a login prompt for such > users. > > Signed-off-by: Oguz Bektas > --- > PVE/API2/Nodes.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes

Re: [pve-devel] [PATCH v2 manager 07/12] ui: adapt sensible 'root@pam' checks to SU privilege

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > so that SUs can perform some root-only actions over the GUI > > also silence eslint's warning about the access notation for these lines > only. > > Signed-off-by: Oguz Bektas > --- > v1->v2: > * silence eslint warnings > * correct the conditional

Re: [pve-devel] [PATCH v13 qemu-server 7/8] api: support VM disk import

2022-03-17 Thread Gilberto Ferreira via pve-devel
--- Begin Message --- Hi Sorry to make noise in this thread but this is intended to be a GUI to qm importdisk CLI command? --- Gilberto Nunes Ferreira Em qui., 17 de mar. de 2022 às 08:32, Fabian Ebner escreveu: > From: Dominic Jäger > > Extend qm importdisk functionality to the API. > > C

Re: [pve-devel] [PATCH v2 manager 04/12] api: backup: allow SUs to use 'tmpdir', 'dumpdir' and 'script' options

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > previously limited to root@pam; we can allow SUs to use these options if > they have the privilege on the whole API path. > > Signed-off-by: Oguz Bektas > --- > PVE/API2/Backup.pm | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-)

[pve-devel] [PATCH v2 container] fix #3927: Containers that are already stopped now return 0, like VMs

2022-03-17 Thread Daniel Tschlatscher
Signed-off-by: Daniel Tschlatscher --- Fixed indentation and trailing whitespace src/PVE/API2/LXC/Status.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index f7e3128..d4e0b66 100644 --- a/src/PVE/API2/LXC/Status.

Re: [pve-devel] [PATCH v2 container 08/12] fix #2582: api: add checks for 'SuperUser' privilege for root-only options

2022-03-17 Thread Fabian Grünbichler
some more stuff: - PVE::API2::LXC mentions root-only code paths in line 261 - message in PVE::LXC::Create mentions root in line 334 On March 11, 2022 12:25 pm, Oguz Bektas wrote: > this way we can allow regular users to act as superuser on specific > paths by giving them the (new) builtin 'SuperAd

[pve-devel] [PATCH cluster v3 2/2] Cluster: add get_guest_config_properties

2022-03-17 Thread Dominik Csapak
akin to get_guest_config_property, but with a list of properties. uses the new CFS_IPC_GET_GUEST_CONFIG_PROPERTIES also adds the same NOTEs regarding parsing/permissions to the comment of get_guest_config_property Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 27 ++

[pve-devel] [PATCH cluster v3 1/2] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-03-17 Thread Dominik Csapak
for getting multiple properties from the in memory config of the guests. I added a new CSF_IPC_ call to maintain backwards compatibility. It basically behaves the same as CFS_IPC_GET_GUEST_CONFIG_PROPERTY, but takes a list of properties instead. The old way of getting a single property is now als

[pve-devel] [PATCH v13 qemu-server 7/8] api: support VM disk import

2022-03-17 Thread Fabian Ebner
From: Dominic Jäger Extend qm importdisk functionality to the API. Co-authored-by: Fabian Grünbichler Co-authored-by: Dominic Jäger Signed-off-by: Fabian Ebner --- Changes from v12: * Switch to raise_param_exc rather than die in API helper. * Simplify check for PVE-managed volume.

[pve-devel] [PATCH v13 manager 1/1] api: nodes: add readovf endpoint

2022-03-17 Thread Fabian Ebner
Because the paths under /nodes/{node}/qemu/ are already occupied by a {vmid} regex, it's not possible to use /nodes/{node}/qemu/readovf for the new call. As the call does not depend upon a particular vmid, it's placed under /nodes/{node} instead. Signed-off-by: Dominic Jäger [split into its own p

[pve-devel] [PATCH v13 qemu-server 4/8] clone disk: also clone EFI disk from snapshot

2022-03-17 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- New in v13. Dependency bump for QEMU 6.2 needed for qemu-img dd's -l option. PVE/QemuServer.pm | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 907cfc09..a24309d2 100644 --- a/PVE/QemuServ

[pve-devel] [PATCH v13 qemu-server 6/8] schema: drive: use separate schema when disk allocation is possible

2022-03-17 Thread Fabian Ebner
via the special syntax :. Not worth it by itself, but this is anticipating a new 'import-from' parameter which is only used upon import/allocation, but shouldn't be part of the schema for the config or other API enpoints. Signed-off-by: Fabian Ebner --- Changes from v12: * Include adaptatio

[pve-devel] [PATCH v13 qemu-server 5/8] api: add endpoint for parsing .ovf files

2022-03-17 Thread Fabian Ebner
Co-developed-by: Fabian Grünbichler Signed-off-by: Dominic Jäger [split into its own patch + minor improvements/style fixes] Signed-off-by: Fabian Ebner --- Changes from v12: * Add protected => 1, so it's not limited to files accessible by www-data. * Get rid of duplicate 'return'

[pve-devel] [PATCH v13 qemu-server 8/8] api: update vm: print drive string for newly allocated/imported drives

2022-03-17 Thread Fabian Ebner
In the spirit of c75bf16 ("qm importdisk: tell user to what VM disk we actually imported"), and so that the information is not lost once qm importdisk switches to re-using the API call. Added for cloudinit too, because a new disk is allocated. Signed-off-by: Fabian Ebner --- No changes from v12

[pve-devel] [PATCH-SERIES v13 qemu-server/manager] API for disk import and OVF

2022-03-17 Thread Fabian Ebner
Extend qm importdisk/importovf functionality to the API. Changes from v12: * Drop already applied patches. * Add some follow-up improvements related to clone: * Aborting early for TPM state restriction. * Check against a corner case with drive-mirror with different driv

[pve-devel] [PATCH v13 qemu-server 1/8] clone disk: assert that drive name is the same for drive-mirror on single VM

2022-03-17 Thread Fabian Ebner
because when the VM ID of target and source are the same, qemu_drive_mirror_monitor() switches the QEMU device node over to the new backing image. The planned import-from functionality makes it possible to run into this, although for an a bit unusual use case. Signed-off-by: Fabian Ebner --- New

[pve-devel] [PATCH v13 qemu-server 2/8] clone disk: move check against cloning TPM state of running VM to beginning

2022-03-17 Thread Fabian Ebner
where other similar checks are. Signed-off-by: Fabian Ebner --- New in v13. PVE/QemuServer.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index dd6f48f3..907cfc09 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -7598,

[pve-devel] [PATCH v13 qemu-server 3/8] api: clone vm: check against cloning running TPM state early

2022-03-17 Thread Fabian Ebner
Drive keys are sorted when cloning and 'tpmstate0' comes late, so it was likely that potentially large disks were already copied just to be removed again, because of the TPM state restriction at the end. Signed-off-by: Fabian Ebner --- New in v13. PVE/API2/Qemu.pm | 3 +++ 1 file changed, 3 in

[pve-devel] applied: [PATCH common] schema: parse_config: optionally collect comments

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 11:26, Wolfgang Bumiller wrote: > Signed-off-by: Wolfgang Bumiller > --- > src/PVE/JSONSchema.pm | 24 +--- > 1 file changed, 21 insertions(+), 3 deletions(-) > > applied, thanks! ___ pve-devel mailing list pve-devel@

Re: [pve-devel] [PATCH container] fix #3927: Stopped containers now return 0, like VMs do

2022-03-17 Thread Matthias Heiserer
On 17.03.2022 11:15, Daniel Tschlatscher wrote: Signed-off-by: Daniel Tschlatscher --- src/PVE/API2/LXC/Status.pm | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index f7e3128..f414f7a 100644 --- a/src/PVE/API

Re: [pve-devel] [PATCH v12 qemu-server 07/16] clone disk: allow cloning from an unused or unreferenced disk

2022-03-17 Thread Fabian Ebner
Am 14.03.22 um 16:55 schrieb Fabian Grünbichler: > On March 9, 2022 11:09 am, Fabian Ebner wrote: > corresponding to this else branch here - mirroring but changing > drivename is not something we currently ever want to do, so we might > want to guard against it? > Actually, it does happen when

[pve-devel] [PATCH container] fix #3927: Stopped containers now return 0, like VMs do

2022-03-17 Thread Daniel Tschlatscher
Signed-off-by: Daniel Tschlatscher --- src/PVE/API2/LXC/Status.pm | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index f7e3128..f414f7a 100644 --- a/src/PVE/API2/LXC/Status.pm +++ b/src/PVE/API2/LXC/Status.pm @@

[pve-devel] [PATCH manager 2/2] api: fill in nodeconfig schema

2022-03-17 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- PVE/API2/NodeConfig.pm | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PVE/API2/NodeConfig.pm b/PVE/API2/NodeConfig.pm index 9c48bcdb..961cd345 100644 --- a/PVE/API2/NodeConfig.pm +++ b/PVE/API2/NodeConfig.pm @@ -11

[pve-devel] [PATCH manager 1/2] nodeconfig: use common config parser

2022-03-17 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- PVE/NodeConfig.pm | 75 +++ 1 file changed, 10 insertions(+), 65 deletions(-) diff --git a/PVE/NodeConfig.pm b/PVE/NodeConfig.pm index df44410f..941e6009 100644 --- a/PVE/NodeConfig.pm +++ b/PVE/NodeConfig.pm @@ -48

[pve-devel] [PATCH manager+common 0/2] drop custom node config parser

2022-03-17 Thread Wolfgang Bumiller
This extends PVE::JSONSchema::parse_config to have an optional "comment key" to collect comments into and drops the node config parser and its custom check_type helper to instead use the common parser. And while I'm at it, I also add the return schema for get_config, since I see no obvious reason

[pve-devel] [PATCH common] schema: parse_config: optionally collect comments

2022-03-17 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- src/PVE/JSONSchema.pm | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 65055e0..2caf109 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -1823,8 +

Re: [pve-devel] [PATCH v2 qemu-server 03/12] api: allow 'skiplock' option to be used by SU privileged users

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > Signed-off-by: Oguz Bektas > --- > PVE/API2/Qemu.pm | 59 > 1 file changed, 40 insertions(+), 19 deletions(-) > > diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm > index 21fc82b..95cc46d 100644 > -

Re: [pve-devel] [PATCH v2 qemu-server 02/12] api: allow SU privileged users to edit root-only options for VM configs

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > we now allow users with SU privilege to edit real device configurations > for VMs. > > they still need the required privilege to edit the corresponding > configuration options (such as `VM.Config.HWType`), as well as the SU > privilege. > > Signed-

[pve-devel] [PATCH cluster v2 1/2] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-03-17 Thread Dominik Csapak
for getting multiple properties from the in memory config of the guests. I added a new CSF_IPC_ call to maintain backwards compatibility. It basically behaves the same as CFS_IPC_GET_GUEST_CONFIG_PROPERTY, but takes a list of properties instead. The old way of getting a single property is now als

[pve-devel] [PATCH cluster v2 2/2] Cluster: add get_guest_config_properties

2022-03-17 Thread Dominik Csapak
akin to get_guest_config_property, but with a list of properties. uses the new CFS_IPC_GET_GUEST_CONFIG_PROPERTIES also adds the same NOTEs regarding parsing/permissions to the comment of get_guest_config_property Signed-off-by: Dominik Csapak --- changes from v1: * change from 'C/Z*' to 'Z*' *

Re: [pve-devel] [PATCH v2 docs 01/12] pveum: add SU privilege and SA role

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:24 pm, Oguz Bektas wrote: > Signed-off-by: Oguz Bektas > --- > pveum.adoc | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/pveum.adoc b/pveum.adoc > index a5c8906..5ad111a 100644 > --- a/pveum.adoc > +++ b/pveum.adoc > @@ -684,7 +684,8 @@ Roles >

Re: [pve-devel] [PATCH v2 access-control 11/12] api: allow superusers to edit tfa and password settings

2022-03-17 Thread Fabian Grünbichler
On March 11, 2022 12:25 pm, Oguz Bektas wrote: > Signed-off-by: Oguz Bektas > --- > v1->v2: > * also adapt change_password > * didn't remove the comments in TFA.pm since it was still confusing without > them > > src/PVE/API2/AccessControl.pm | 6 ++ > src/PVE/API2/TFA.pm | 7 +

[pve-devel] [PATCH manager 1/2] ui: disk storage selector: never send format when hideFormat is true

2022-03-17 Thread Fabian Ebner
The backend will pick an appropriate format when nothing is specified. The comment made it sound like 'raw' would be sent, but that didn't actually happen on file-based storages, and now no format is sent, so adapt the comment too. Signed-off-by: Fabian Ebner --- www/manager6/form/DiskStorageSel

[pve-devel] [PATCH manager 2/2] ui: disk storage selector: support storage with multiple formats without qcow2

2022-03-17 Thread Fabian Ebner
For future or external storages where the assumption "multiple formats implies qcow2 is supported" doesn't hold. Signed-off-by: Fabian Ebner --- www/manager6/form/DiskStorageSelector.js | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/www/manager6/form/Dis

Re: [pve-devel] [PATCH V2 qemu-server 1/2] enable balloon free-page-reporting

2022-03-17 Thread Thomas Lamprecht
On 16.03.22 20:32, DERUMIER, Alexandre wrote: > From my tests: > a already booted vm without the balloon freepage option enabled ---> > migrating to new vm with balloon freepage option enabled : works > > Then failback it to previous node : works > > > But starting a new vm with the option enabl

Re: [pve-devel] [PATCH guest-common 1/1] vzdump: schema: add 'notes' and 'protected' properties

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 09:18, Fabian Ebner wrote: >> Agree. So, to summarize, vzdump does the interpreting for a plain, new >> `--notes` >> CLI which it also prints (with variables already resolved) in the task log >> and >> sets that also as note for the (created) backup. >> >> The job config would get a n

Re: [pve-devel] [PATCH guest-common 1/1] vzdump: schema: add 'notes' and 'protected' properties

2022-03-17 Thread Fabian Ebner
Am 17.03.22 um 09:07 schrieb Thomas Lamprecht: > On 17.03.22 08:57, Fabian Ebner wrote: >> Am 16.03.22 um 19:25 schrieb Thomas Lamprecht: >>> >>> While extending one has a slight chance of changing an existing setup I find >>> this very unlikely in this specific case, as we had no such feature >>>

[pve-devel] [PATCH common] SysFSTools: factor out the domain fixup and domain regex

2022-03-17 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- src/PVE/SysFSTools.pm | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm index aabe833..4038eed 100644 --- a/src/PVE/SysFSTools.pm +++ b/src/PVE/SysFSTools.pm @@ -8,7 +8,8

Re: [pve-devel] [PATCH storage 2/2] plugins: allow limiting the number of protected backups per guest

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 09:03, Fabian Ebner wrote: > Am 16.03.22 um 17:42 schrieb Thomas Lamprecht: >> On 16.12.21 13:12, Fabian Ebner wrote: >>> diff --git a/PVE/Storage.pm b/PVE/Storage.pm >>> index d64019f..0643fad 100755 >>> --- a/PVE/Storage.pm >>> +++ b/PVE/Storage.pm >>> @@ -232,6 +232,30 @@ sub update_

Re: [pve-devel] [PATCH guest-common 1/1] vzdump: schema: add 'notes' and 'protected' properties

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 08:57, Fabian Ebner wrote: > Am 16.03.22 um 19:25 schrieb Thomas Lamprecht: >> On 16.03.22 12:04, Fabian Ebner wrote: >>> Am 16.12.21 um 13:12 schrieb Fabian Ebner: >>> >>> Fabian G.: >>> we could offer something like a simple template system that allows >>> substitution of certain vari

Re: [pve-devel] [PATCH storage 2/2] plugins: allow limiting the number of protected backups per guest

2022-03-17 Thread Fabian Ebner
Am 16.03.22 um 17:42 schrieb Thomas Lamprecht: > On 16.12.21 13:12, Fabian Ebner wrote: >> diff --git a/PVE/Storage.pm b/PVE/Storage.pm >> index d64019f..0643fad 100755 >> --- a/PVE/Storage.pm >> +++ b/PVE/Storage.pm >> @@ -232,6 +232,30 @@ sub update_volume_attribute { >> my $scfg = storage_c

Re: [pve-devel] applied: [PATCH-SERIES v3 storage/manager] factoring out RE for backup extension

2022-03-17 Thread Thomas Lamprecht
On 17.03.22 08:51, Dominik Csapak wrote: > On 3/16/22 17:16, Thomas Lamprecht wrote: >> On 04.11.21 15:40, Dominik Csapak wrote: >>> Series LGTM, looked closely at the regexes, >>> and they match (semantically), tested around a bit >>> and all seemed to work. >>> >>> one super small nit (not a bloc

Re: [pve-devel] [PATCH guest-common 1/1] vzdump: schema: add 'notes' and 'protected' properties

2022-03-17 Thread Fabian Ebner
Am 16.03.22 um 19:25 schrieb Thomas Lamprecht: > On 16.03.22 12:04, Fabian Ebner wrote: >> Am 16.12.21 um 13:12 schrieb Fabian Ebner: >> >> Fabian G.: >> we could offer something like a simple template system that allows >> substitution of certain variables (like name, or source node >> hostname/cl

Re: [pve-devel] applied: [PATCH-SERIES v3 storage/manager] factoring out RE for backup extension

2022-03-17 Thread Dominik Csapak
On 3/16/22 17:16, Thomas Lamprecht wrote: On 04.11.21 15:40, Dominik Csapak wrote: Series LGTM, looked closely at the regexes, and they match (semantically), tested around a bit and all seemed to work. one super small nit (not a blocker IMHO) the format/extension/compression handling in 2/2 co