[pve-devel] [PATCH docs] firmware: adapt to proxmox packaged fwupd

2024-04-19 Thread Stoiko Ivanov
We ship our own fwupd package, since it needs to handle the differently named efi_os_dir (proxmox vs debian). Due to our experience with `udisks2` causing issues on hypervisors, our package downgraded the Recommends udisks2, to a Suggests. The downside is, that users need to explicitly set their

[pve-devel] applied-series: [PATCH proxmox-firewall 1/2] firewall: wait for nft process

2024-04-19 Thread Thomas Lamprecht
Am 19/04/2024 um 15:00 schrieb Stefan Hanreich: > NftClient never waits for the child process to terminate leading to > defunct leftover processes. > > Signed-off-by: Stefan Hanreich > --- > proxmox-nftables/src/client.rs | 38 -- > 1 file changed, 9

[pve-devel] applied: [PATCH manager] pveversion: fix whitespaces

2024-04-19 Thread Thomas Lamprecht
Am 19/04/2024 um 18:33 schrieb Alexander Zeidler: > Signed-off-by: Alexander Zeidler > --- > bin/pveversion | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > applied, thanks! ___ pve-devel mailing list pve-devel@lists.proxmox.com

[pve-devel] [PATCH manager] pveversion: fix whitespaces

2024-04-19 Thread Alexander Zeidler
Signed-off-by: Alexander Zeidler --- bin/pveversion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pveversion b/bin/pveversion index a98d2c66..d32a6a0c 100755 --- a/bin/pveversion +++ b/bin/pveversion @@ -60,7 +60,7 @@ my $opt_verbose; if (!GetOptions ('verbose' =>

[pve-devel] [PATCH v2 manager] pve7to8: reword and fix typos in description

2024-04-19 Thread Alexander Zeidler
Signed-off-by: Alexander Zeidler --- v2: * incorporate all feedback from v1 v1: https://lists.proxmox.com/pipermail/pve-devel/2024-April/063252.html bin/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/Makefile b/bin/Makefile index 180a91b5..6c5f9b14

[pve-devel] [PATCH v3 manager 2/2] report: add recent boot timestamps which may show fencing/crash events

2024-04-19 Thread Alexander Zeidler
Successful boots which crashed somehow and sometime afterwards, will show the same "until" value ("still running" or timestamp) as the next following boot(s). The most recent boot from such a sequence of duplicated "until" lines, has not been crashed or not yet. Example output where only the boot

[pve-devel] [PATCH v3 manager 1/2] report: overhaul `dmidecode` related output

2024-04-19 Thread Alexander Zeidler
While using keywords (-t bios,...) would be possible, depending on the server it also bloats the report with uninteresting information, hiding the relevant. Therefore the non-grouped, specific number types are used. Where we only need specific information, not serial numbers etc., we print the

[pve-devel] partially-applied: [PATCH-SERIES v3] fix #4136: implement backup fleecing

2024-04-19 Thread Fiona Ebner
As discussed off-list with Thomas, applied the remaining non-RFC patches and bumped the packages with the necessary dependency bumps. For the RFC ones we'll have more time to decide upon the improved cleanup mechanism (should it even go to the config or rather some file in /var) and minus sign in

[pve-devel] [PATCH proxmox v2 01/20] notify: switch to file-based templating system

2024-04-19 Thread Lukas Wagner
Instead of passing the template strings for subject and body when constructing a notification, we pass only the name of a template. When rendering the template, the name of the template is used to find corresponding template files. For PVE, they are located at

[pve-devel] [PATCH proxmox v2 02/20] notify: make api methods take config struct ownership

2024-04-19 Thread Lukas Wagner
This saves us from some of the awkward cloning steps when updating. Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- proxmox-notify/src/api/gotify.rs | 46 +- proxmox-notify/src/api/matcher.rs | 38

[pve-devel] [PATCH proxmox v2 03/20] notify: convert Option> -> Vec in config structs

2024-04-19 Thread Lukas Wagner
Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- proxmox-notify/src/api/matcher.rs | 27 +++ proxmox-notify/src/api/mod.rs | 22 +--- proxmox-notify/src/api/sendmail.rs | 22

[pve-devel] [PATCH proxmox-perl-rs v2 14/20] notify: don't pass config structs by reference

2024-04-19 Thread Lukas Wagner
proxmox_notify's api functions have been changed so that they take ownership of config structs. Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- common/src/notify.rs | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

[pve-devel] [PATCH proxmox v2 09/20] notify: derive `api` for Deleteable*Property

2024-04-19 Thread Lukas Wagner
The API endpoints in Proxmox Backup Server require ApiType to be implemented for any deserialized parameter. Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/src/endpoints/gotify.rs | 3 +++ proxmox-notify/src/endpoints/sendmail.rs | 7 +++

[pve-devel] [PATCH proxmox-perl-rs v2 13/20] notify: use file based notification templates

2024-04-19 Thread Lukas Wagner
Instead of passing literal template strings to the notification system, we now only pass an identifier. This identifier will be used load the template files from a product-specific directory. Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner ---

[pve-devel] [PATCH proxmox-perl-rs v2 15/20] notify: adapt to Option> to Vec changes in proxmox_notify

2024-04-19 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- common/src/notify.rs | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 00a6056..e1b006b 100644 --- a/common/src/notify.rs +++

[pve-devel] [PATCH proxmox v2 10/20] notify: derive Deserialize/Serialize for Notification struct

2024-04-19 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/src/lib.rs | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 91c0b61..292396b 100644 --- a/proxmox-notify/src/lib.rs +++

[pve-devel] [PATCH proxmox v2 11/20] notify: pbs context: include nodename in default sendmail author

2024-04-19 Thread Lukas Wagner
The old notification stack in proxmox-backup includes the nodename, so we include it here as well. Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/src/context/pbs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox-notify/src/context/pbs.rs

[pve-devel] [PATCH proxmox v2 08/20] notify: api: add get_targets

2024-04-19 Thread Lukas Wagner
This method allows us to get a list of all notification targets. Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/src/api/mod.rs | 77 +++ 1 file changed, 77 insertions(+) diff --git a/proxmox-notify/src/api/mod.rs

[pve-devel] [PATCH proxmox v2 07/20] notify: give each notification a unique ID

2024-04-19 Thread Lukas Wagner
We need this for queuing notifications on PBS from the unprivileged proxy process. Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/Cargo.toml | 1 + proxmox-notify/src/lib.rs | 11 +++ 2 files changed, 12 insertions(+) diff --git a/proxmox-notify/Cargo.toml

[pve-devel] [PATCH manager v2 20/20] notifications: use named templates instead of in-code templates

2024-04-19 Thread Lukas Wagner
This commit adapts notification sending for - package update - replication - backups to use named templates (installed in /usr/share/pve-manager/templates) instead of passing template strings defined in code to the notification stack. Signed-off-by: Lukas Wagner Tested-by: Folke

[pve-devel] [PATCH pve-ha-manager v2 17/20] env: notify: use named templates instead of passing template strings

2024-04-19 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- debian/pve-ha-manager.install | 3 +++ src/Makefile | 1 + src/PVE/HA/Env/PVE2.pm| 4 ++-- src/PVE/HA/NodeStatus.pm

[pve-devel] [PATCH manager v2 19/20] tests: remove vzdump_notification test

2024-04-19 Thread Lukas Wagner
With the upcoming changes in how we send notifications, this one really becomes pretty annoying to keep working. The location where templates are looked up are defined in the proxmox_notify crate, so there is no easy way to mock this for testing. The test itself seemed not super valuable, mainly

[pve-devel] [PATCH cluster v2 16/20] notify: use named template instead of passing template strings

2024-04-19 Thread Lukas Wagner
The notification system will now load template files from a defined location. The template to use is now passed to proxmox_notify, instead of separate template strings for subject/body. Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- src/PVE/Notify.pm | 29

[pve-devel] [PATCH proxmox v2 04/20] notify: don't make tests require pve-context

2024-04-19 Thread Lukas Wagner
Tests now have their own context, so requiring pve-context is not necessary any more. Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- proxmox-notify/src/api/gotify.rs | 2 +- proxmox-notify/src/api/matcher.rs | 2 +- proxmox-notify/src/api/sendmail.rs |

[pve-devel] [PATCH manager v2 18/20] gitignore: ignore any test artifacts

2024-04-19 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e8d1eb27..481ae1e0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ dest/ /www/mobile/pvemanager-mobile.js /www/touch/touch-[0-9]*/

[pve-devel] [PATCH proxmox v2 12/20] notify: renderer: add relative-percentage helper from PBS

2024-04-19 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/src/renderer/mod.rs | 29 + 1 file changed, 29 insertions(+) diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs index a51ece6..ddb241d 100644 ---

[pve-devel] [PATCH proxmox v2 06/20] notify: cargo.toml: add spaces before curly braces

2024-04-19 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Fiona Ebner --- proxmox-notify/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/Cargo.toml b/proxmox-notify/Cargo.toml index 3e8d253..185b50a 100644 --- a/proxmox-notify/Cargo.toml +++

[pve-devel] [PATCH proxmox v2 05/20] notify: make the `mail-forwarder` feature depend on proxmox-sys

2024-04-19 Thread Lukas Wagner
It uses proxmox_sys::nodename - the dep is needed, otherwise the code does not compile in some feature flag permutations. Signed-off-by: Lukas Wagner Tested-by: Folke Gleumes Reviewed-by: Fiona Ebner --- proxmox-notify/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[pve-devel] [PATCH many v2 00/20] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Lukas Wagner
The notification system uses handlebar templates to render the subject and the body of notifications. Previously, the template strings were defined inline at the call site. This patch series extracts the templates into template files and installs them at /usr/share/pve-manager/templates/default

Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Fiona Ebner
Am 19.04.24 um 12:09 schrieb Fiona Ebner: >> > > Versioned breaks required: > - new pve-cluster will break old pve-manager and old pve-ha-manager > - new libproxmox-rs-perl/libpve-rs-perl will break old pve-cluster > Since I got myself confused for a moment when re-installing and it never hurts

Re: [pve-devel] [PATCH manager v5 08/16] api: notification: add API for getting known metadata fields/values

2024-04-19 Thread Lukas Wagner
On 2024-04-19 15:45, Fiona Ebner wrote: > Am 15.04.24 um 10:26 schrieb Lukas Wagner: >> + >> +__PACKAGE__->register_method ({ >> +name => 'get_field_values', >> +path => 'values', >> +method => 'GET', >> +description => 'Returns known notification metadata fields and their >>

Re: [pve-devel] [PATCH manager v5 08/16] api: notification: add API for getting known metadata fields/values

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:26 schrieb Lukas Wagner: > + > +__PACKAGE__->register_method ({ > +name => 'get_field_values', > +path => 'values', > +method => 'GET', > +description => 'Returns known notification metadata fields and their > known values', > +permissions => { > + check

Re: [pve-devel] [PATCH manager v5 05/16] api: replication: add 'replication-job' to notification metadata

2024-04-19 Thread Lukas Wagner
On 2024-04-19 15:11, Fiona Ebner wrote: > Am 19.04.24 um 14:22 schrieb Lukas Wagner: >> >> >> On 2024-04-19 14:02, Fiona Ebner wrote: >>> Am 15.04.24 um 10:26 schrieb Lukas Wagner: This allows users to create notification match rules for specific replication jobs, if they so desire.

Re: [pve-devel] [PATCH manager v5 05/16] api: replication: add 'replication-job' to notification metadata

2024-04-19 Thread Fiona Ebner
Am 19.04.24 um 14:22 schrieb Lukas Wagner: > > > On 2024-04-19 14:02, Fiona Ebner wrote: >> Am 15.04.24 um 10:26 schrieb Lukas Wagner: >>> This allows users to create notification match rules for specific >>> replication jobs, if they so desire. >>> >>> Signed-off-by: Lukas Wagner >>> --- >>>

[pve-devel] [PATCH proxmox-firewall 2/2] firewall: improve systemd unit file

2024-04-19 Thread Stefan Hanreich
Explicitly mark the service as simple and remove the PIDFile attribute, which doesn't do anything with simple services. Signed-off-by: Stefan Hanreich --- debian/proxmox-firewall.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/proxmox-firewall.service

[pve-devel] [PATCH proxmox-firewall 1/2] firewall: wait for nft process

2024-04-19 Thread Stefan Hanreich
NftClient never waits for the child process to terminate leading to defunct leftover processes. Signed-off-by: Stefan Hanreich --- proxmox-nftables/src/client.rs | 38 -- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git

Re: [pve-devel] [PATCH manager v5 08/16] api: notification: add API for getting known metadata fields/values

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:26 schrieb Lukas Wagner: > This new API route returns known notification metadata fields and > a list of known possible values. This will be used by the UI to > provide suggestions when adding/modifying match rules. > > Signed-off-by: Lukas Wagner > --- >

[pve-devel] [PATCH docs v3 2/2] qm: resource mapping: document `live-migration-capable` setting

2024-04-19 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- qm.adoc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/qm.adoc b/qm.adoc index 3f4e59a..3ab5270 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1814,6 +1814,12 @@ Currently there are the following options: the mapping, the mediated device will be create on

Re: [pve-devel] [PATCH proxmox 07/19] notify: api: add get_targets

2024-04-19 Thread Lukas Wagner
On 2024-04-19 10:34, Fiona Ebner wrote: > Am 09.04.24 um 15:25 schrieb Lukas Wagner: >> +/// Get a list of all notification targets. >> +pub fn get_targets(config: ) -> Result, HttpError> { >> +let mut targets = Vec::new(); >> + >> +#[cfg(feature = "gotify")] >> +for endpoint in

[pve-devel] [PATCH qemu-server v3 10/10] api: include not mapped resources for running vms in migrate preconditions

2024-04-19 Thread Dominik Csapak
so that we can show a proper warning in the migrate dialog and check it in the bulk migrate precondition check the unavailable_storages and should be the same as before, but we now always return allowed_nodes too. also add a note that we want to redesign the return values here, to make * the api

[pve-devel] [PATCH manager v3 1/5] mapping: pci: include mdev in config checks

2024-04-19 Thread Dominik Csapak
by also providing the global config in assert_valid, and by also adding the mdev config in the 'toCheck' object in the gui For the gui, we extract the mdev property from the global entry, and add it to the individual mapping entries, that way we can reuse the checking logic of the other

[pve-devel] [PATCH qemu-server v3 05/10] vm_stop_cleanup: add noerr parameter

2024-04-19 Thread Dominik Csapak
and set it on all current users Signed-off-by: Dominik Csapak --- PVE/CLI/qm.pm | 2 +- PVE/QemuServer.pm | 13 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index b105830f..fbc590f5 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI/qm.pm

[pve-devel] [PATCH manager v3 3/5] bulk migrate: include checks for live-migratable local resources

2024-04-19 Thread Dominik Csapak
those should be able to migrate even for online vms. If the mapping does not exist on the target node, that will be caught further down anyway. Signed-off-by: Dominik Csapak --- PVE/API2/Nodes.pm | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git

Re: [pve-devel] [PATCH proxmox 09/19] notify: derive Deserialize/Serialize for Notification struct

2024-04-19 Thread Lukas Wagner
On 2024-04-19 10:45, Fiona Ebner wrote: > Nit: I always like a quick sentence for who needs it for such changes. > > Am 09.04.24 um 15:25 schrieb Lukas Wagner: >> Signed-off-by: Lukas Wagner >> --- >> proxmox-notify/src/lib.rs | 10 +++--- >> 1 file changed, 7 insertions(+), 3

[pve-devel] [PATCH qemu-server v3 04/10] stop cleanup: remove unnecessary tpmstate cleanup

2024-04-19 Thread Dominik Csapak
tpmstate0 is already included in `get_vm_volumes`, and our only storage plugin that has unmap_volume implemented is the RBDPlugin, where we call unmap in `deactivate_volume`. So it's already ummapped by the `deactivate_volumes` calls above. Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm |

[pve-devel] [PATCH qemu-server v3 03/10] pci: mapping: check mdev config against hardware

2024-04-19 Thread Dominik Csapak
by giving the mapping config to assert_valid, not only the specific mapping Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm index 7ff9cad7..6ba43ee8 100644 ---

[pve-devel] [PATCH guest-common v3 4/4] mapping: remove find_on_current_node

2024-04-19 Thread Dominik Csapak
they only have one user each (where we can inline the implementation). It's easy enough to recreate should we need to. Signed-off-by: Dominik Csapak --- src/PVE/Mapping/PCI.pm | 10 -- src/PVE/Mapping/USB.pm | 9 - 2 files changed, 19 deletions(-) diff --git

[pve-devel] [PATCH guest-common v3 2/4] mapping: pci: check the mdev configuration on the device too

2024-04-19 Thread Dominik Csapak
but that lives int he 'global' part of the mapping config, not in a specific mapping. To check that, add it to the $configured_props from there. this requires all call sites to be adapted otherwise the check will always fail for devices that are capable of mediated devices Signed-off-by: Dominik

[pve-devel] [PATCH manager v3 5/5] fix #5175: ui: allow configuring and live migration of mapped pci resources

2024-04-19 Thread Dominik Csapak
if the hardware/driver is capable, the admin can now mark a pci device as 'live-migration-capable', which then tries enabling live migration for such devices. mark it as experimental when configuring and in the migrate window Signed-off-by: Dominik Csapak --- www/manager6/window/Migrate.js

[pve-devel] [PATCH guest-common v3 3/4] mapping: pci: add 'live-migration-capable' flag to mappings

2024-04-19 Thread Dominik Csapak
so that we can decide in qemu-server to allow live-migration. The driver and QEMU must be capable of that, and it's the admin's responsibility to know and configure that Mark the option as experimental in the description. Signed-off-by: Dominik Csapak --- src/PVE/Mapping/PCI.pm | 8 1

[pve-devel] [PATCH qemu-server v3 09/10] api: enable live migration for marked mapped pci devices

2024-04-19 Thread Dominik Csapak
They have to be marked as 'live-migration-capable' in the mapping config, and the driver and qemu must support it. For the gui checks, we now return the whole object of the mapped resources, which includes info like the name and if it's marked as live-migration capable. (while deprecating the old

[pve-devel] [PATCH manager v3 4/5] ui: adapt migration window to precondition api change

2024-04-19 Thread Dominik Csapak
we now return the 'allowed_nodes'/'not_allowed_nodes' also if the vm is running, when it has mapped resources. So do that checks independently so that the user has instant feedback where those resources exist. Signed-off-by: Dominik Csapak --- www/manager6/window/Migrate.js | 26

[pve-devel] [PATCH manager v3 2/5] bulk migrate: improve precondition checks

2024-04-19 Thread Dominik Csapak
this now takes into account the 'not_allowed_nodes' hash we get from the api call. With that, we can now limit the 'local_resources' check for online vms only, as for offline guests, the 'unavailable-resources' hash already includes mapped devices that don't exist on the target node. This now

[pve-devel] [PATCH qemu-server v3 08/10] check_local_resources: add more info per mapped device and return as hash

2024-04-19 Thread Dominik Csapak
such as the mapping name and if it's marked for live-migration (pci only) Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 2 +- PVE/QemuMigrate.pm | 7 --- PVE/QemuServer.pm | 17 ++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/PVE/API2/Qemu.pm

[pve-devel] [PATCH docs v3 1/2] qm: resource mapping: add description for `mdev` option

2024-04-19 Thread Dominik Csapak
in a new section about additional options Signed-off-by: Dominik Csapak --- qm.adoc | 13 + 1 file changed, 13 insertions(+) diff --git a/qm.adoc b/qm.adoc index 42c26db..3f4e59a 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1802,6 +1802,19 @@ To create mappings `Mapping.Modify` on

[pve-devel] [PATCH qemu-server v3 06/10] migrate: call vm_stop_cleanup after stopping in phase3_cleanup

2024-04-19 Thread Dominik Csapak
we currently only call deactivate_volumes, but we actually want to call the whole vm_stop_cleanup, since that is not invoked by the vm_stop above (we cannot parse the config anymore) and might do other cleanups we also want to do (like mdev cleanup). For this to work properly we have to clone the

[pve-devel] [PATCH qemu-server v3 07/10] pci: set 'enable-migration' to on for live-migration marked mapped devices

2024-04-19 Thread Dominik Csapak
the default is 'auto', but for those which are marked as capable for live migration, we want to explicitly enable that, so we get an early error on start if the driver does not support that. Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 9 - 1 file changed, 8 insertions(+),

[pve-devel] [PATCH qemu-server v3 01/10] usb: mapping: move implementation of find_on_current_node here

2024-04-19 Thread Dominik Csapak
this was the only user, and it's easy enough Signed-off-by: Dominik Csapak --- PVE/QemuServer/USB.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm index 49957444..ecd0361d 100644 --- a/PVE/QemuServer/USB.pm +++

[pve-devel] [PATCH guest-common/qemu-server/manager/docs v3 0/4] implement experimental vgpu live migration

2024-04-19 Thread Dominik Csapak
and some useful cleanups Resending even there was not much feedback, because i worked in some minor fixes/changes in the meantime. A user tested the previous patch series and only found one issue with the ui, see the comments on bug #5175 https://bugzilla.proxmox.com/show_bug.cgi?id=5175 This

[pve-devel] [PATCH qemu-server v3 02/10] pci: mapping: move implementation of find_on_current_node here

2024-04-19 Thread Dominik Csapak
this was the only user, and it's easy enough Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm index 1673041b..7ff9cad7 100644 --- a/PVE/QemuServer/PCI.pm +++

[pve-devel] [PATCH guest-common v3 1/4] mapping: pci: rework properties check

2024-04-19 Thread Dominik Csapak
rename '$cfg' to '$mapping', 'correct' to 'expected' reword the error messages also check keys from the configured props not only the expected ones previously we only checked the keys from the 'correct_props' hash but that was unintended. We now check the keys from both, but extract the relevant

Re: [pve-devel] [PATCH manager v5 04/16] ui: dc: backup: allow to set custom job id in advanced settings

2024-04-19 Thread Lukas Wagner
On 2024-04-19 12:31, Fiona Ebner wrote: > Am 15.04.24 um 10:26 schrieb Lukas Wagner: >> This might be useful if somebody wants to match on the new >> 'backup-job' field in a notification match rule. >> >> Signed-off-by: Lukas Wagner >> --- >> www/manager6/Utils.js | 4 >>

Re: [pve-devel] [PATCH manager v5 05/16] api: replication: add 'replication-job' to notification metadata

2024-04-19 Thread Lukas Wagner
On 2024-04-19 14:02, Fiona Ebner wrote: > Am 15.04.24 um 10:26 schrieb Lukas Wagner: >> This allows users to create notification match rules for specific >> replication jobs, if they so desire. >> >> Signed-off-by: Lukas Wagner >> --- >> PVE/API2/Replication.pm | 2 +- >> 1 file changed, 1

Re: [pve-devel] [PATCH manager v5 05/16] api: replication: add 'replication-job' to notification metadata

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:26 schrieb Lukas Wagner: > This allows users to create notification match rules for specific > replication jobs, if they so desire. > > Signed-off-by: Lukas Wagner > --- > PVE/API2/Replication.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [pve-devel] [PATCH manager v5 02/16] api: jobs: vzdump: pass job 'id' parameter

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:26 schrieb Lukas Wagner: > This allows us to access us the backup job id in the send_notification > function, where we can set it as metadata for the notification. > > Signed-off-by: Lukas Wagner > --- > PVE/API2/VZDump.pm | 8 > PVE/Jobs/VZDump.pm | 4 +++- >

Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Lukas Wagner
On 2024-04-19 13:22, Fabian Grünbichler wrote: > On April 19, 2024 12:09 pm, Fiona Ebner wrote: >> Am 09.04.24 um 15:25 schrieb Lukas Wagner: >>> Bumps/dependencies: >>> - proxmox_notify >>> - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_notify) >>> -

Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Fabian Grünbichler
On April 19, 2024 12:09 pm, Fiona Ebner wrote: > Am 09.04.24 um 15:25 schrieb Lukas Wagner: >> Bumps/dependencies: >> - proxmox_notify >> - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_notify) >> - libpve-notify-perl (needs bumped >>

Re: [pve-devel] [RFC PATCH docs-common 01/13] installation-media: move page from pve-docs here

2024-04-19 Thread Christoph Heiss
Thanks for the review! On Fri, Apr 19, 2024 at 12:51:07PM +0200, Aaron Lauterer wrote: > > > On 2024-04-19 11:05, Christoph Heiss wrote: > > Small adaptions were necessary; mostly a s/{pve}/{product}/g and > > replacing the ISO URL with the {iso-url} variable. > > except there are still plenty

[pve-devel] [PATCH qemu-server v6 1/3] add C program to get AMD SEV hardware parameters from CPUID

2024-04-19 Thread Markus Frank
Implement a systemd service that runs a C program that extracts AMD SEV hardware parameters such as reduced-phys-bios and cbitpos from CPUID at boot time, looks if SEV, SEV-ES & SEV-SNP are enabled, and outputs these details as JSON to /run/amd-sev-params. Signed-off-by: Markus Frank ---

[pve-devel] [PATCH qemu-server v6 2/3] config: QEMU AMD SEV enable

2024-04-19 Thread Markus Frank
This patch is for enabling AMD SEV (Secure Encrypted Virtualization) support in QEMU VM-Config-Examples: amd_sev: type=std,nodbg=1,noks=1 amd_sev: es,nodbg=1,kernel-hashes=1 Node-Config-Example (gets generated automatically): amd_sev: cbitpos=47,reduced-phys-bios=1 kernel-hashes,

[pve-devel] [PATCH docs v6 3/3] add AMD SEV documentation

2024-04-19 Thread Markus Frank
add documentation for the "[PATCH qemu-server] config: QEMU AMD SEV enable" patch. Signed-off-by: Markus Frank --- v5: * removed NodeConfig part v4: * added text that SEV-ES is experimental qm.adoc | 103 1 file changed, 103

Re: [pve-devel] [RFC PATCH docs-common 01/13] installation-media: move page from pve-docs here

2024-04-19 Thread Aaron Lauterer
On 2024-04-19 11:05, Christoph Heiss wrote: Small adaptions were necessary; mostly a s/{pve}/{product}/g and replacing the ISO URL with the {iso-url} variable. except there are still plenty of `{pve}`s in there? another thing looking at this patch, how do we handle product specifics?

[pve-devel] applied: [PATCH manager v5 01/16] api: notifications: add 'smtp' to target index

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:25 schrieb Lukas Wagner: > Signed-off-by: Lukas Wagner > --- > PVE/API2/Cluster/Notifications.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/PVE/API2/Cluster/Notifications.pm > b/PVE/API2/Cluster/Notifications.pm > index 7047f0b1..68fdda2a

Re: [pve-devel] [PATCH manager 19/19] notifications: use named templates instead of in-code templates

2024-04-19 Thread Lukas Wagner
On 2024-04-19 11:59, Fiona Ebner wrote: > Am 09.04.24 um 15:25 schrieb Lukas Wagner: >> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm >> index 152eb3e5..2ea626f0 100644 >> --- a/PVE/VZDump.pm >> +++ b/PVE/VZDump.pm > > The existing $subject_template and $body_template could be removed now > like

Re: [pve-devel] [PATCH manager v5 04/16] ui: dc: backup: allow to set custom job id in advanced settings

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:26 schrieb Lukas Wagner: > This might be useful if somebody wants to match on the new > 'backup-job' field in a notification match rule. > > Signed-off-by: Lukas Wagner > --- > www/manager6/Utils.js | 4 > www/manager6/dc/Backup.js | 11 +++ > 2 files

Re: [pve-devel] [PATCH manager v5 04/16] ui: dc: backup: allow to set custom job id in advanced settings

2024-04-19 Thread Fiona Ebner
Am 15.04.24 um 10:26 schrieb Lukas Wagner: > This might be useful if somebody wants to match on the new > 'backup-job' field in a notification match rule. > > Signed-off-by: Lukas Wagner Needs a rebase, because the advanced settings were moved to a new "Advanced" tab.

Re: [pve-devel] [PATCH manager v3 5/5] fix #4474: ui: guest stop: offer to overrule active shutdown tasks

2024-04-19 Thread Dominik Csapak
some minor nits inline, aside from those Reviewed-by: Dominik Csapak On 4/12/24 16:15, Friedrich Weber wrote: Implement a new "guest stop" confirmation message box which first checks if there is an active shutdown task for the same guest that is visible to the logged-in user. If there is at

[pve-devel] [PATCH docs v5 3/3] add AMD SEV documentation

2024-04-19 Thread Markus Frank
add documentation for the "[PATCH qemu-server] config: QEMU AMD SEV enable" patch. Signed-off-by: Markus Frank --- v5: * removed NodeConfig part v4: * added text that SEV-ES is experimental qm.adoc | 103 1 file changed, 103

[pve-devel] [PATCH qemu-server v5 1/3] add C program to get AMD SEV hardware parameters from CPUID

2024-04-19 Thread Markus Frank
Implement a systemd service that runs a C program that extracts AMD SEV hardware parameters such as reduced-phys-bios and cbitpos from CPUID at boot time, verifies that SEV, SEV-ES & SEV-SNP are enabled, and outputs these details as JSON to /run/amd-sev-params. Signed-off-by: Markus Frank ---

[pve-devel] [PATCH qemu-server v5 2/3] config: QEMU AMD SEV enable

2024-04-19 Thread Markus Frank
This patch is for enabling AMD SEV (Secure Encrypted Virtualization) support in QEMU VM-Config-Examples: amd_sev: type=std,nodbg=1,noks=1 amd_sev: es,nodbg=1,kernel-hashes=1 Node-Config-Example (gets generated automatically): amd_sev: cbitpos=47,reduced-phys-bios=1 kernel-hashes,

Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner: > The notification system uses handlebar templates to render the subject > and the body of notifications. Previously, the template strings were > defined inline at the call site. This patch series extracts the templates > into template files and installs

Re: [pve-devel] [PATCH manager 19/19] notifications: use named templates instead of in-code templates

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner: > diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm > index 152eb3e5..2ea626f0 100644 > --- a/PVE/VZDump.pm > +++ b/PVE/VZDump.pm The existing $subject_template and $body_template could be removed now like for the others > diff --git a/templates/Makefile

[pve-devel] [PATCH manager v2 5/6] ui: guest import: add storage selector for ova extraction storage

2024-04-19 Thread Dominik Csapak
but only when we detect the 'ova-needs-extraction' warning. This can be used to select the storage where the disks contained in an OVA will be extracted to temporarily. Signed-off-by: Dominik Csapak --- new in v2 www/manager6/window/GuestImport.js | 23 +++ 1 file changed,

[pve-devel] [PATCH qemu-server v2 4/4] api: create: add 'import-extraction-storage' parameter

2024-04-19 Thread Dominik Csapak
this is to override the target extraction storage for the option disk extraction for 'import-from'. This way if the storage does not supports the content type 'images', one can give an alternative one. Signed-off-by: Dominik Csapak --- new in v2 PVE/API2/Qemu.pm | 56

[pve-devel] [PATCH storage v2 08/10] api: allow ova upload/download

2024-04-19 Thread Dominik Csapak
introducing a separate regex that only contains ova, since upload/downloading ovfs does not make sense (since the disks are then missing). Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner --- changes from v1: * typo fixes * added OVA mention to description src/PVE/API2/Storage/Status.pm

[pve-devel] [PATCH manager v2 3/6] ui: enable import content type for relevant storages

2024-04-19 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- changes from v1: * added import to glusterfs www/manager6/Utils.js| 1 + www/manager6/form/ContentTypeSelector.js | 2 +- www/manager6/storage/CephFSEdit.js | 2 +- www/manager6/storage/GlusterFsEdit.js| 2 +- 4 files changed, 4

[pve-devel] [PATCH storage v2 04/10] ovf: implement parsing the ostype

2024-04-19 Thread Dominik Csapak
use the standards info about the ostypes to map to our own (see comment for link to the relevant part of the dmtf schema) every type that is not listed we map to 'other', so no need to have it in a list. Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner --- changes from v1: * added

[pve-devel] [PATCH manager v2 4/6] ui: enable upload/download/remove buttons for 'import' type storages

2024-04-19 Thread Dominik Csapak
but only for non esxi ones, since that does not allow uploading/downloading there Signed-off-by: Dominik Csapak --- changes from v1: * show remove button for non-esxi * order extensions alphabetically * add missing '.' for ova extension www/manager6/storage/Browser.js| 9 +++--

[pve-devel] [PATCH storage v2 07/10] ovf: implement parsing nics

2024-04-19 Thread Dominik Csapak
by iterating over the relevant parts and trying to parse out the 'ResourceSubType'. The content of that is not standardized, but I only ever found examples that are compatible with vmware, meaning it's either 'e1000', 'e1000e' or 'vmxnet3' (in various capitalizations; thus the `lc()`) As a

[pve-devel] [PATCH storage v2 05/10] ovf: implement parsing out firmware type

2024-04-19 Thread Dominik Csapak
it seems there is no part of the ovf standard that handles which type of bios there is (at least i could not find it). Every ovf/ova i tested either has no info about it, or has it in a vmware specific property which we parse here. Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner ---

[pve-devel] [PATCH storage v2 06/10] ovf: implement rudimentary boot order

2024-04-19 Thread Dominik Csapak
simply add all parsed disks to the boot order in the order we encounter them (similar to the esxi plugin). Signed-off-by: Dominik Csapak --- changes from v1: * renamed variable to boot_order * fixed bracket issue (was a rebase problem) * only add bootorder if list is not empty

[pve-devel] [PATCH storage v2 10/10] add 'import' content type to 'check_volume_access'

2024-04-19 Thread Dominik Csapak
in the same branch as 'vztmpl' and 'iso' Signed-off-by: Dominik Csapak --- new in v2 src/PVE/Storage.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index c628ebd..7e70df2 100755 --- a/src/PVE/Storage.pm +++ b/src/PVE/Storage.pm @@

[pve-devel] [PATCH qemu-server v2 2/4] use OVF from Storage

2024-04-19 Thread Dominik Csapak
and delete it here (incl tests; they live in pve-storage now). Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner --- changes from v1: * use new module location (that makes the list now ordered as well :P ) PVE/CLI/qm.pm | 4 +- PVE/QemuServer/Makefile

[pve-devel] [PATCH storage v2 01/10] copy OVF.pm from qemu-server

2024-04-19 Thread Dominik Csapak
copies the OVF.pm and relevant ovf tests from qemu-server. We need it here, and it uses PVE::Storage already, and since there is no intermediary package/repository we could put it, it seems fitting in here. Put it in a new GuestImport module Signed-off-by: Dominik Csapak Reviewed-by: Fiona

[pve-devel] [PATCH qemu-server v2 3/4] api: create: implement extracting disks when needed for import-from

2024-04-19 Thread Dominik Csapak
when 'import-from' contains a disk image that needs extraction (currently only from an 'ova' archive), do that in 'create_disks' and overwrite the '$source' volid. Collect the names into a 'delete_sources' list, that we use later to clean it up again (either when we're finished with importing or

[pve-devel] [PATCH manager v2 6/6] ui: guest import: change icon/text for non-esxi import storage

2024-04-19 Thread Dominik Csapak
since 'virtual guests' only make sense for a hypervisor, not e.g. a directory for OVAs also change the icon from 'desktop' to 'cloud-download' in the non-esxi case Signed-off-by: Dominik Csapak --- new in v2 www/manager6/storage/Browser.js | 6 -- 1 file changed, 4 insertions(+), 2

[pve-devel] [PATCH qemu-server v2 1/4] api: delete unused OVF.pm

2024-04-19 Thread Dominik Csapak
the api part was never in use by anything Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner --- no changes in v2 PVE/API2/Qemu/Makefile | 2 +- PVE/API2/Qemu/OVF.pm | 53 -- 2 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644

[pve-devel] [PATCH storage v2 09/10] plugin: enable import for nfs/btrfs/cifs/cephfs/glusterfs

2024-04-19 Thread Dominik Csapak
and reuse the DirPlugin implementation Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner --- changes from v1: * added glusterfs too * fixed typo in commit subject src/PVE/Storage/BTRFSPlugin.pm | 5 + src/PVE/Storage/CIFSPlugin.pm | 6 +- src/PVE/Storage/CephFSPlugin.pm

[pve-devel] [PATCH manager v2 2/6] ui: guest import: add ova-needs-extracting warning text

2024-04-19 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- changes from v1: * adapted text for new 'extract-stroage' www/manager6/window/GuestImport.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/window/GuestImport.js b/www/manager6/window/GuestImport.js index 944d275b..2c8bc189 100644 ---

[pve-devel] [PATCH storage v2 03/10] plugin: dir: handle ova files for import

2024-04-19 Thread Dominik Csapak
since we want to handle ova files (which are only ovf+images bundled in a tar file) for import, add code that handles that. we introduce a valid volname for files contained in ovas like this: storage:import/archive.ova/disk-1.vmdk by basically treating the last part of the path as the name for

  1   2   >