Re: [pve-devel] [PATCH qemu-server] fix #5657: allow configuring RNG device as non-root user

2025-01-29 Thread Filip Schauer
Superseded by: https://lore.proxmox.com/pve-devel/20250129155339.164696-1-f.scha...@proxmox.com/ On 24/10/2024 13:16, Fabian Grünbichler wrote: we could also define some sort of mapping-like thing for the hardware RNG to allow semi-privileged users to pass it through, after a highly privileged u

[pve-devel] [PATCH manager v2 6/9] ui: allow use of mapped hardware RNGs as entropy sources for VMs

2025-01-29 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/Makefile | 1 + www/manager6/form/HWRNGMapSelector.js | 99 +++ www/manager6/qemu/HardwareView.js | 9 ++- www/manager6/qemu/RNGEdit.js | 79 ++--- 4 files changed, 159 insertions

[pve-devel] [PATCH manager v2 5/9] ui: add hardware RNG resource mapping

2025-01-29 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/Makefile | 2 + www/manager6/data/PermPathStore.js | 1 + www/manager6/dc/Config.js | 10 ++ www/manager6/dc/HWRNGMapView.js | 76 ++ www/manager6/window/HWRNGMapEdit.js | 149

[pve-devel] [PATCH qemu-server v2 8/9] allow non-root users to set /dev/u?random as an RNG source

2025-01-29 Thread Filip Schauer
Allow non-root users with the VM.Config.HWType privilege to configure /dev/urandom & /dev/random as an entropy source for a VirtIO RNG device. /dev/hwrng remains restricted to the root user. Signed-off-by: Filip Schauer --- PVE/API2/Qemu.pm | 42 ++

[pve-devel] [PATCH qemu-server v2 9/9] let VirtIO RNG devices source entropy from mapped HWRNGs

2025-01-29 Thread Filip Schauer
This allows a user with the Mapping.Modify privilege on /mapping/hwrng to configure a hardware RNG mapping. A less privileged user with the Mapping.Use privilege can then pass the mapped hardware RNG device as an entropy source to a VirtIO RNG device. Signed-off-by: Filip Schauer --- PVE/API2

[pve-devel] [PATCH manager v2 3/9] introduce hardware rng mapping api

2025-01-29 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/API2/Cluster/Mapping.pm | 7 + PVE/API2/Cluster/Mapping/HWRNG.pm | 286 ++ PVE/API2/Cluster/Mapping/Makefile | 5 +- 3 files changed, 296 insertions(+), 2 deletions(-) create mode 100644 PVE/API2/Cluster/Mapping/HWRNG.pm

[pve-devel] [PATCH manager v2 4/9] introduce hardware rng scanning api

2025-01-29 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/API2/Hardware.pm | 7 ++ PVE/API2/Hardware/HWRNG.pm | 47 ++ PVE/API2/Hardware/Makefile | 1 + 3 files changed, 55 insertions(+) create mode 100644 PVE/API2/Hardware/HWRNG.pm diff --git a/PVE/API2/Hardware.pm

[pve-devel] [PATCH cluster/guest-common/manager/qemu-server v2 0/9] fix #5657: allow configuring RNG device as non-root user

2025-01-29 Thread Filip Schauer
RNG devices as entropy sources. Changes since v1: * Restrict use of /dev/hwrng to the root user * introduce hardware RNG mapping pve-guest-common: Filip Schauer (1): mapping: add a hardware RNG mapping config src/Makefile | 1 + src/PVE/Mapping/HWRNG.pm | 147

[pve-devel] [PATCH qemu-server v2 7/9] refactor: move rng related code into its own module

2025-01-29 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 83 +++- PVE/QemuServer/Makefile | 1 + PVE/QemuServer/RNG.pm | 135 3 files changed, 145 insertions(+), 74 deletions(-) create mode 100644 PVE/QemuServer/RNG.pm diff

[pve-devel] [PATCH cluster v2 2/9] cfs: add 'mapping/hwrng.cfg' to observed files

2025-01-29 Thread Filip Schauer
Observe the configuration file for hardware RNG mappings. Signed-off-by: Filip Schauer --- src/PVE/Cluster.pm | 1 + src/pmxcfs/status.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm index e0e3ee9..684b481 100644 --- a/src/PVE/Cluster.pm +++ b

[pve-devel] [PATCH guest-common v2 1/9] mapping: add a hardware RNG mapping config

2025-01-29 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/Makefile | 1 + src/PVE/Mapping/HWRNG.pm | 147 +++ 2 files changed, 148 insertions(+) create mode 100644 src/PVE/Mapping/HWRNG.pm diff --git a/src/Makefile b/src/Makefile index cbc40c1..ae62b7d 100644 --- a

Re: [pve-devel] [PATCH storage v5 0/7] support moving volumes between storages

2025-01-20 Thread Filip Schauer
Merge conflicts to current master (e5f4af47d083) have been resolved in v6. Superseded by: https://lore.proxmox.com/pve-devel/20250120112842.36450-1-f.scha...@proxmox.com/ On 26/11/2024 16:23, Filip Schauer wrote: Add the ability to move a backup, ISO, container template, snippet, or OVA/OVF

[pve-devel] [PATCH storage v6 3/7] api: content: support moving backups between path based storages

2025-01-20 Thread Filip Schauer
This commit adds the "backup+size" export format. When this format is used, the data stream starts with metadata of the backup (protected flag & notes) followed by the contents of the backup archive. Signed-off-by: Filip Schauer --- src/PVE/API2/Storage/Content.pm | 15 +++

[pve-devel] [PATCH storage v6 7/7] storage migrate: avoid ssh when moving a volume locally

2025-01-20 Thread Filip Schauer
Avoid the overhead of SSH when moving a volume between storages on the same node. Signed-off-by: Filip Schauer --- src/PVE/Storage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index 761f612..a2bef55 100755 --- a/src/PVE

[pve-devel] [PATCH storage v6 6/7] pvesm: add a move-volume command

2025-01-20 Thread Filip Schauer
container template to another node and delete the source: ``` pvesm move-volume \ local:vztmpl/devuan-4.0-standard_4.0_amd64.tar.gz local \ --target-node pvenode2 --delete ``` Signed-off-by: Filip Schauer --- src/PVE/CLI/pvesm.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE

[pve-devel] [PATCH storage v6 4/7] storage: introduce decompress_archive_into_pipe helper

2025-01-20 Thread Filip Schauer
Extract the file decompression code into its own reusable subroutine. Signed-off-by: Filip Schauer --- src/PVE/Storage.pm | 64 +- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index 8e94979

[pve-devel] [PATCH storage v6 2/7] api: content: implement moving a volume between storages

2025-01-20 Thread Filip Schauer
Add the ability to move an iso, snippet or vztmpl between storages and nodes. Use either curl to call the API method: ``` curl https://$APINODE:8006/api2/json/nodes/$SOURCENODE/storage/$SOURCESTORAGE/content/$SOURCEVOLUME \ --insecure --cookie "$( --- src/PVE/API2/Storage/Content.pm | 111

[pve-devel] [PATCH storage v6 5/7] support moving VMA backups to PBS

2025-01-20 Thread Filip Schauer
Extend the move API to support moving VMA backups to a Proxmox Backup Server. Signed-off-by: Filip Schauer --- debian/control | 1 + src/PVE/API2/Storage/Content.pm | 53 +++ src/PVE/Storage/PBSPlugin.pm| 65 + 3

[pve-devel] [PATCH storage v6 1/7] plugin: allow volume import of iso, snippets, vztmpl and import

2025-01-20 Thread Filip Schauer
templates between nodes. Existing behavior for importing VM disks and container volumes remains unchanged. Signed-off-by: Filip Schauer --- src/PVE/Storage/Plugin.pm | 72 ++- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage/Plugin.

[pve-devel] [PATCH storage v6 0/7] support moving volumes between storages

2025-01-20 Thread Filip Schauer
Add the ability to move a backup, ISO, container template, snippet, or OVA/OVF between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and

Re: [pve-devel] [PATCH v2 storage 07/10] iscsi direct plugin: support volume export

2024-12-18 Thread Filip Schauer
, 1.2 GB/s successfully imported 'local:117/vm-117-disk-0.raw' ``` Assigned the disk to a VM and it also booted up just fine. Trying to import into a user mode iSCSI storage fails as expected: ``` $ pvesm import tgtdirectstorage raw+size output cannot import into volume 'tgtdirectstora

Re: [pve-devel] [PATCH v2 storage 06/10] iscsi plugin: support volume export

2024-12-18 Thread Filip Schauer
fails as expected: ``` $ pvesm import tgtstorage raw+size output cannot import into volume 'tgtstorage' ``` Tested-by: Filip Schauer On 17/12/2024 16:48, Fiona Ebner wrote: Signed-off-by: Fiona Ebner --- New in v2. src/PVE/Storage/ISCSIPlug

[pve-devel] [PATCH container 3/3] implement device hotplug

2024-12-16 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/LXC.pm| 93 ++- src/PVE/LXC/Config.pm | 19 + 2 files changed, 111 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 12a4378..06902a1 100644 --- a/src/PVE/LXC.pm +++ b

[pve-devel] [PATCH container 0/3] implement device hotplug

2024-12-16 Thread Filip Schauer
Filip Schauer (3): extract apparmor profile & namespace switch to its own helper config: support printing a device implement device hotplug src/PVE/LXC.pm| 164 ++ src/PVE/LXC/Config.pm | 35 +++-- 2 files changed, 163 insertions(+)

[pve-devel] [PATCH container 2/3] config: support printing a device

2024-12-16 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/LXC/Config.pm | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 5cc37f7..b44bcce 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -1333,6 +1333,14

[pve-devel] [PATCH container 1/3] extract apparmor profile & namespace switch to its own helper

2024-12-16 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/LXC.pm | 71 +- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index e78e365..12a4378 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1982,15 +1982,42

[pve-devel] [PATCH common] tools: explain reason for the explicit PerlIO load

2024-12-02 Thread Filip Schauer
Explain the reason for the explicit `use PerlIO::scalar;` statement introduced in c4945bf ("tools: load PerlIO explicitly to avoid odd failures") Signed-off-by: Filip Schauer --- src/PVE/Tools.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/

Re: [pve-devel] [PATCH v4 storage 0/6] support moving volumes between storages

2024-11-26 Thread Filip Schauer
Superseded by: https://lists.proxmox.com/pipermail/pve-devel/2024-November/066993.html On 18/09/2024 16:49, Filip Schauer wrote: Add the ability to move a backup, ISO, container template or snippet between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server

Re: [pve-devel] [PATCH v4 storage 2/6] api: content: implement moving a volume between storages

2024-11-26 Thread Filip Schauer
On 20/09/2024 16:27, Daniel Kral wrote: Also if I'm not missing something, this could also use a `format => 'pve-volume-id'`, but I can see that it isn't used in any other route in that module and is also only used in `PVE::Storage::Plugin::LVMPlugin`, `PVE::Storage::CLI::pvesm` and `pve-conta

[pve-devel] [PATCH storage v5 7/7] storage migrate: avoid ssh when moving a volume locally

2024-11-26 Thread Filip Schauer
Avoid the overhead of SSH when moving a volume between storages on the same node. Signed-off-by: Filip Schauer --- src/PVE/Storage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index 5d25a2a..c1f383a 100755 --- a/src/PVE

[pve-devel] [PATCH storage v5 5/7] support moving VMA backups to PBS

2024-11-26 Thread Filip Schauer
Extend the move API to support moving VMA backups to a Proxmox Backup Server. Signed-off-by: Filip Schauer --- debian/control | 1 + src/PVE/API2/Storage/Content.pm | 53 +++ src/PVE/Storage/PBSPlugin.pm| 65 + 3

[pve-devel] [PATCH storage v5 3/7] api: content: support moving backups between path based storages

2024-11-26 Thread Filip Schauer
This commit adds the "backup+size" export format. When this format is used, the data stream starts with metadata of the backup (protected flag & notes) followed by the contents of the backup archive. Signed-off-by: Filip Schauer --- src/PVE/API2/Storage/Content.pm | 15 +++

[pve-devel] [PATCH storage v5 2/7] api: content: implement moving a volume between storages

2024-11-26 Thread Filip Schauer
Add the ability to move an iso, snippet or vztmpl between storages and nodes. Use either curl to call the API method: ``` curl https://$APINODE:8006/api2/json/nodes/$SOURCENODE/storage/$SOURCESTORAGE/content/$SOURCEVOLUME \ --insecure --cookie "$( --- src/PVE/API2/Storage/Content.pm | 111

[pve-devel] [PATCH storage v5 6/7] pvesm: add a move-volume command

2024-11-26 Thread Filip Schauer
container template to another node and delete the source: ``` pvesm move-volume \ local:vztmpl/devuan-4.0-standard_4.0_amd64.tar.gz local \ --target-node pvenode2 --delete ``` Signed-off-by: Filip Schauer --- src/PVE/CLI/pvesm.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE

[pve-devel] [PATCH storage v5 0/7] support moving volumes between storages

2024-11-26 Thread Filip Schauer
Add the ability to move a backup, ISO, container template, snippet, or OVA/OVF between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and

[pve-devel] [PATCH storage v5 1/7] plugin: allow volume import of iso, snippets, vztmpl and import

2024-11-26 Thread Filip Schauer
templates between nodes. Existing behavior for importing VM disks and container volumes remains unchanged. Signed-off-by: Filip Schauer --- src/PVE/Storage/Plugin.pm | 72 ++- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage/Plugin.

[pve-devel] [PATCH storage v5 4/7] storage: introduce decompress_archive_into_pipe helper

2024-11-26 Thread Filip Schauer
Extract the file decompression code into its own reusable subroutine. Signed-off-by: Filip Schauer --- src/PVE/Storage.pm | 64 +- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index ae190cd

[pve-devel] [PATCH container] fix #5907: ignore conflicting mount options for read-only mounts

2024-11-25 Thread Filip Schauer
m cannot be mounted due to invalid option 'discard'. This commit ensures that only valid mount options, such as "nodev", "noexec", and "nosuid", are applied to read-only mounts, avoiding potential mount failures. Signed-off-by: Filip Schauer --- src/PVE/LX

Re: [pve-devel] [PATCH installer] fetch-answer: encode unsafe characters in partition label

2024-11-19 Thread Filip Schauer
On 19/11/2024 16:40, Christoph Heiss wrote: I think the original, non-encoded partition label should be printed here. As it would be somewhat surprising to users/administrators to suddenly see some partition label being searched that what the specified -- thus considering this as an internal imp

[pve-devel] [PATCH installer v2] fetch-answer: encode unsafe characters in partition label

2024-11-19 Thread Filip Schauer
util, which is used by `/lib/udev/rules.d/60-persistent-storage.rules` to create a symlink under `/dev/disk/by-label/`. For example: "ANSWER PART" is encoded to "ANSWER\x20PART" [0] https://github.com/util-linux/util-linux/blob/master/libblkid/src/encode.c Signed-off-by: F

[pve-devel] [PATCH installer] fetch-answer: encode unsafe characters in partition label

2024-11-19 Thread Filip Schauer
util, which is used by `/lib/udev/rules.d/60-persistent-storage.rules` to create a symlink under `/dev/disk/by-label/`. For example: "ANSWER PART" is encoded to "ANSWER\x20PART" [0] https://github.com/util-linux/util-linux/blob/master/libblkid/src/encode.c Signed-off-by: F

Re: [pve-devel] [PATCH storage/qemu-server/manager v7] implement ova/ovf import for file based storages

2024-11-18 Thread Filip Schauer
On 18/11/2024 18:53, Thomas Lamprecht wrote: diff --git a/src/PVE/GuestImport/OVF.pm b/src/PVE/GuestImport/OVF.pm index 4af58ed..ed6fcea 100644 --- a/src/PVE/GuestImport/OVF.pm +++ b/src/PVE/GuestImport/OVF.pm @@ -191,6 +191,7 @@ sub parse_ovf { # 'ovf' is the default namespace so it will prepe

Re: [pve-devel] [PATCH storage/qemu-server/manager v7] implement ova/ovf import for file based storages

2024-11-18 Thread Filip Schauer
I tried importing the GNS3 OVA files found here: https://www.gns3.com/software/download-vm I got the same XPath error with the VirtualBox file. The ESXi and Workstation & Fusion OVA files were imported successfully and they boot aswell. On 18/11/2024 18:14, Filip Schauer wrote: Hello

Re: [pve-devel] [PATCH storage/qemu-server/manager v7] implement ova/ovf import for file based storages

2024-11-18 Thread Filip Schauer
ct/linuxovafiles/GUI/ArcoLinux-vm.ova?viasf=1 to /var/lib/vz/import/ArcoLinux-vm.ova 2b353ac59598bac24d4cf0721e367935d00178a31d84e09c94425bdee3dab6a1 /var/lib/vz/import/ArcoLinux-vm.ova Tested-by: Filip Schauer On 18/11/2024 16:29, Dominik Csapak wrote: This series enables importing ova/ovf

[pve-devel] [PATCH manager v3] ui: acme: switch cluster view items over to those from widget-toolkit

2024-11-13 Thread Filip Schauer
This leaves PVE.node.ACMEAccountView & pveACMEPluginEditor unused, so remove them too. Signed-off-by: Filip Schauer --- Changes since v2: * In pveACMEClusterView correct the xtype of the first item (pmxACMEAccountView -> pmxACMEAccounts) Changes since v1: * Also switch over account view * Correct ac

Re: [pve-devel] [PATCH v2 manager] ui: acme: switch cluster view items over to those from widget-toolkit

2024-11-13 Thread Filip Schauer
On 12/11/2024 20:47, Thomas Lamprecht wrote: Look OK in general but needs a rebase due to a typo fix in the deleted file and I get an exception when navigating to the Datacenter -> ACME panel, so maybe something else changed that needs adaption here. 20:45:51.345 Uncaught neither 'url' nor both,

[pve-devel] [PATCH manager] ui: lxc: add the "discard" mount option

2024-10-28 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/lxc/MPEdit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js index f1db867b..dae17748 100644 --- a/www/manager6/lxc/MPEdit.js +++ b/www/manager6/lxc/MPEdit.js @@ -299,6 +299,7 @@ Ext.define

Re: [pve-devel] applied: [PATCH container] fix #5761: add the "discard" mount option

2024-10-28 Thread Filip Schauer
Sent a patch for the UI integration: https://lists.proxmox.com/pipermail/pve-devel/2024-October/065805.html On 24/10/2024 16:49, Thomas Lamprecht wrote: Am 09/10/2024 um 16:22 schrieb Filip Schauer: Introduce the "discard" mount option for rootfs and mount points. This ensures t

[pve-devel] [PATCH container] fix #5761: add the "discard" mount option

2024-10-09 Thread Filip Schauer
Introduce the "discard" mount option for rootfs and mount points. This ensures that unused container volume blocks are discarded from the underlying storage backend when deleting files within the container. Signed-off-by: Filip Schauer --- src/PVE/LXC/Config.pm | 2 +- 1 file

Re: [pve-devel] [PATCH common] tools: file_set_contents: use syswrite instead of print

2024-09-30 Thread Filip Schauer
Superseded by: https://lists.proxmox.com/pipermail/pve-devel/2024-September/065476.html On 25/09/2024 16:37, Dominik Csapak wrote: hi, as we already talked off list, this may be an issue when we do have a string that is marked as utf8 (e.g. api parameters that contain codepoints > 127) if

[pve-devel] [PATCH v2 common] tools: file_set_contents: use syswrite instead of print

2024-09-30 Thread Filip Schauer
://lists.proxmox.com/pipermail/pve-devel/2024-September/065396.html Signed-off-by: Filip Schauer --- Changes since v1: * Add benchmark results without rename to commit message * Fix "Wide character in syswrite" error by first encoding $data with print src/PVE/Tools.pm | 21 ++-

Re: [pve-devel] [PATCH common] tools: file_set_contents: use syswrite instead of print

2024-09-25 Thread Filip Schauer
I am appending the following to the commit message: Since `file_set_contents` also performs a `rename` after writing, the following table shows the results when the file is written without renaming it afterwards:    print    big_writes+print big_writes+syswrite file size  wri

[pve-devel] [PATCH common] tools: file_set_contents: use syswrite instead of print

2024-09-24 Thread Filip Schauer
KiB 369568 KiB360.9 187496 KiB183.1 15845 KiB 15.5 [1] https://lists.proxmox.com/pipermail/pve-devel/2024-September/065396.html Signed-off-by: Filip Schauer --- src/PVE/Tools.pm | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/PVE/Tools.pm b

Re: [pve-devel] [RFC PATCH pve-cluster] fix #5728: pmxcfs: allow bigger writes than 4k for fuse

2024-09-23 Thread Filip Schauer
h up until 128k data size. It seems that `PVE::Tools::file_set_contents` needs to be optimized to not write the contents in 8k blocks. Instead of `print` we might want to use `syswrite`. On 23/09/2024 13:48, Filip Schauer wrote: I also ran some benchmarks with the same script. I created a VM

Re: [pve-devel] [RFC PATCH pve-cluster] fix #5728: pmxcfs: allow bigger writes than 4k for fuse

2024-09-23 Thread Filip Schauer
I also ran some benchmarks with the same script. I created a VM with two virtual disks, (both on an LVM Thin storage) installed PVE on one disk and set up an ext4 partition on the other. I stopped pvestatd and pve-cluster, ``` systemctl stop pvestatd systemctl stop pve-cluster ``` moved the pm

Re: [pve-devel] [PATCH v3 storage] fix #5191: api, cli: implement moving a volume between storages

2024-09-18 Thread Filip Schauer
On 05/09/2024 14:12, Fiona Ebner wrote: @@ -483,15 +485,173 @@ __PACKAGE__->register_method ({ return $upid; }}); +sub volume_move { Should this even be a new top-level method? Or can/should we extend export/import instead, to not only cover guest images? Because with this top-l

[pve-devel] [PATCH v4 storage 4/6] storage: introduce decompress_archive_into_pipe helper

2024-09-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/Storage.pm | 64 +- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index 12f7b3f..e5f5326 100755 --- a/src/PVE/Storage.pm +++ b/src/PVE/Storage.pm

[pve-devel] [PATCH v4 storage 2/6] api: content: implement moving a volume between storages

2024-09-18 Thread Filip Schauer
Add the ability to move an iso, snippet or vztmpl between storages and nodes. Use curl to call the API method: ``` curl https://$APINODE:8006/api2/json/nodes/$SOURCENODE/storage/$SOURCESTORAGE/content/$SOURCEVOLUME \ --insecure --cookie "$( --- src/PVE/API2/Storage/Content.pm | 149 +++

[pve-devel] [PATCH v4 storage 3/6] api: content: support moving backups between path based storages

2024-09-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/API2/Storage/Content.pm | 41 ++-- src/PVE/Storage.pm | 10 +++- src/PVE/Storage/Plugin.pm | 42 ++--- 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/src/PVE

[pve-devel] [PATCH v4 storage 5/6] support moving VMA backups to PBS

2024-09-18 Thread Filip Schauer
Extend the move API to support moving VMA backups to a Proxmox Backup Server. Signed-off-by: Filip Schauer --- debian/control | 1 + src/PVE/API2/Storage/Content.pm | 86 ++--- src/PVE/Storage/PBSPlugin.pm| 65 + 3 files

[pve-devel] [PATCH v4 storage 6/6] pvesm: add a move-volume command

2024-09-18 Thread Filip Schauer
container template to another node and delete the source: ``` pvesm move-volume \ local:vztmpl/devuan-4.0-standard_4.0_amd64.tar.gz local \ --target-node pvenode2 --delete ``` Signed-off-by: Filip Schauer --- src/PVE/CLI/pvesm.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE

[pve-devel] [PATCH v4 storage 1/6] plugin: allow volume import of iso, snippets and vztmpl

2024-09-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/Storage/Plugin.pm | 67 +-- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 8cc693c..57536c6 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src

[pve-devel] [PATCH v4 storage 0/6] support moving volumes between storages

2024-09-18 Thread Filip Schauer
Add the ability to move a backup, ISO, container template or snippet between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and moving ba

Re: [pve-devel] [PATCH container/manager v2 0/2] add deny read/write options for device passthrough

2024-09-09 Thread Filip Schauer
Superseded by: https://lists.proxmox.com/pipermail/pve-devel/2024-September/065282.html On 06/09/2024 19:01, Thomas Lamprecht wrote: Am 06/09/2024 um 14:14 schrieb Fiona Ebner: Am 24.07.24 um 19:18 schrieb Filip Schauer: Add the deny_read and deny_write options for device passthrough, to

[pve-devel] [PATCH manager v3 2/2] ui: lxc: add readonly option for device passthrough

2024-09-09 Thread Filip Schauer
Add a checkbox to the device passthrough dialogue for restricting write access to a device passed through to a container. Signed-off-by: Filip Schauer --- www/manager6/lxc/DeviceEdit.js | 8 1 file changed, 8 insertions(+) diff --git a/www/manager6/lxc/DeviceEdit.js b/www/manager6/lxc

[pve-devel] [PATCH container v3 1/2] add deny-write option for device passthrough

2024-09-09 Thread Filip Schauer
Add the deny-write options for device passthrough, to restrict container access to devices. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm| 7 ++- src/PVE/LXC/Config.pm | 6 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index

[pve-devel] [PATCH container/manager v3 0/2] add a deny-write option for device passthrough

2024-09-09 Thread Filip Schauer
to a lack of use-cases * rename deny_write to deny-write pve-container: Filip Schauer (1): add deny-write option for device passthrough src/PVE/LXC.pm| 7 ++- src/PVE/LXC/Config.pm | 6 ++ 2 files changed, 12 insertions(+), 1 deletion(-) pve-manager: Filip Schauer (1): ui:

Re: [pve-devel] [PATCH qemu-server] fix #5657: allow configuring RNG device as non-root user

2024-09-03 Thread Filip Schauer
On 02/09/2024 14:21, Fabian Grünbichler wrote: IIRC this was intentional, since passing in the hardware RNG can starve the host of entropy rather quickly. is this no longer the case, or handled by some other check? if so, please include these details here. if not, then I don't think we want to go

Re: [pve-devel] [PATCH qemu-server] fix #5284: diallow moving vm disks to storages not meant for images

2024-09-02 Thread Filip Schauer
iled: can't allocate space in pbs storage ``` After the patch: ``` $ qm disk move 103 efidisk0 store1 --delete 400 Parameter verification failed. storage: storage 'store1' does not support vm images qm disk move [] [OPTIONS] ``` PS: The title has a typo: "diallow" T

[pve-devel] [PATCH container] fix #5666: fix quota regression due to device passthrough

2024-08-27 Thread Filip Schauer
lacing the premature `exit` call with a `return` statement, ensuring the `lxc-pve-autodev-hook` continues executing and processes the passthrough mounts as expected. Signed-off-by: Filip Schauer --- src/PVE/LXC/Tools.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC/

[pve-devel] [PATCH qemu-server] fix #5657: allow configuring RNG device as non-root user

2024-08-26 Thread Filip Schauer
Allow any user with the VM.Config.HWType permission to add or remove a VirtIO RNG device on a VM. This is in line with the behaviour of cloning a VM and restoring a VM backup as defined in PVE::QemuServer::check_mapping_access. Signed-off-by: Filip Schauer --- PVE/API2/Qemu.pm | 1 + 1 file

Re: [pve-devel] [PATCH container/manager 0/2] add deny read/write options for device passthrough

2024-07-24 Thread Filip Schauer
On 24/07/2024 12:20, Fiona Ebner wrote: In the UI, it think it's enough to expose a checkbox for read-only. Use cases that deny reads seem a bit esoteric, so I'm not even sure we should add deny_read in the back-end before somebody complains. But no strong opinion there. I removed the deny_rea

[pve-devel] [PATCH manager v2 2/2] ui: lxc: add readonly option for device passthrough

2024-07-24 Thread Filip Schauer
Add a checkbox to the device passthrough dialogue for restricting container write access to a passed through device. Signed-off-by: Filip Schauer --- www/manager6/lxc/DeviceEdit.js | 8 1 file changed, 8 insertions(+) diff --git a/www/manager6/lxc/DeviceEdit.js b/www/manager6/lxc

[pve-devel] [PATCH container v2 1/2] add deny read/write options for device passthrough

2024-07-24 Thread Filip Schauer
Add the deny_read and deny_write options for device passthrough, to restrict container access to devices. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm| 13 - src/PVE/LXC/Config.pm | 12 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/PVE

[pve-devel] [PATCH container/manager v2 0/2] add deny read/write options for device passthrough

2024-07-24 Thread Filip Schauer
that device without an option to restrict that access as pointed out by @Fiona. Changes since v1: * set default values for deny_read & deny_write * remove the deny_read checkbox from the UI, since it is expected to only have a very niche use case. pve-container: Filip Schauer (1): add

[pve-devel] [PATCH backup-qemu] bump build dependencies

2024-07-09 Thread Filip Schauer
Signed-off-by: Filip Schauer --- debian/control| 6 -- submodules/proxmox-backup | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index d8a5692..3771d3b 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Build

Re: [pve-devel] [PATCH v2 storage] fix #5191: api, cli: implement moving a volume between storages

2024-07-03 Thread Filip Schauer
On 26/06/2024 11:58, Fabian Grünbichler wrote: @@ -1613,6 +1615,15 @@ sub volume_export { run_command(['tar', @COMMON_TAR_FLAGS, '-cf', '-', '-C', $file, '.'], output => '>&'.fileno($fh)); return; + } elsif ($format eq 'backup+size') { nit:

[pve-devel] [PATCH v3 storage] fix #5191: api, cli: implement moving a volume between storages

2024-07-03 Thread Filip Schauer
Add the ability to move a backup, ISO, container template or snippet between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and moving ba

Re: [pve-devel] [PATCH storage] add API method to move a volume between storages

2024-06-25 Thread Filip Schauer
review: subject could mention CLI too, e.g.: api, cli: implement moving a volume between storages Am 12/06/2024 um 16:45 schrieb Filip Schauer: Add the ability to move a backup, ISO, container template or snippet between storages of a node via an API method. Moving a VMA backup to a Proxmox Backup

[pve-devel] [PATCH v2 storage] fix #5191: api, cli: implement moving a volume between storages

2024-06-25 Thread Filip Schauer
Add the ability to move a backup, ISO, container template or snippet between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and moving ba

Re: [pve-devel] [PATCH storage] add API method to move a volume between storages

2024-06-12 Thread Filip Schauer
I forgot to mention that this fixes #5191 On 12/06/2024 16:45, Filip Schauer wrote: Add the ability to move a backup, ISO, container template or snippet between storages of a node via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be

[pve-devel] [PATCH storage] add API method to move a volume between storages

2024-06-12 Thread Filip Schauer
Add the ability to move a backup, ISO, container template or snippet between storages of a node via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and moving ba

Re: [pve-devel] [PATCH qemu-server v9 1/3] add C program to get hardware capabilities from CPUID

2024-05-07 Thread Filip Schauer
Ran this on an Intel(R) Core(TM) i7-7700K CPU at Markus' request to see how this behaves on an Intel processor. This results in the following being written to /run/qemu-server/host-hw-capabilities.json: { "amd-sev": { "cbitpos": 0, "reduced-phys-bits": 0, "sev-support": false, "sev-support-es":

Re: [pve-devel] [PATCH manager] ui: Remove pveACMEPluginView in favor of pmxACMEPluginView

2024-04-30 Thread Filip Schauer
/2023 um 13:00 schrieb Filip Schauer: Remove pveACMEPluginView and use the ACMEPluginView from the proxmox-widget-toolkit instead. This leaves pveACMEPluginEditor unused, so remove it as well. when got this moved, would be good to have some references here, which would it also make it easier to decide

[pve-devel] [PATCH v2 manager] ui: acme: switch cluster view items over to those from widget-toolkit

2024-04-30 Thread Filip Schauer
This leaves PVE.node.ACMEAccountView & pveACMEPluginEditor unused, so remove them too. Signed-off-by: Filip Schauer --- Changes since v1: * Also switch over account view * Correct acmeUrl (/config/acme -> /cluster/acme) * Reference introduction of pmxACMEAccountView & pmxACMEPluginView in

[pve-devel] [PATCH manager 2/2] ui: lxc: add deny read/write options for device passthrough

2024-04-29 Thread Filip Schauer
Add checkboxes to the device passthrough dialogue for restricting container read/write access to a passed through device. Signed-off-by: Filip Schauer --- www/manager6/lxc/DeviceEdit.js | 16 1 file changed, 16 insertions(+) diff --git a/www/manager6/lxc/DeviceEdit.js b/www

[pve-devel] [PATCH container 1/2] add deny read/write options for device passthrough

2024-04-29 Thread Filip Schauer
Add the deny_read and deny_write options for device passthrough, to restrict container access to devices. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm| 13 - src/PVE/LXC/Config.pm | 10 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/PVE

[pve-devel] [PATCH container/manager 0/2] add deny read/write options for device passthrough

2024-04-29 Thread Filip Schauer
that device without an option to restrict that access as pointed out by @Fiona. pve-container: Filip Schauer (1): add deny read/write options for device passthrough src/PVE/LXC.pm| 13 - src/PVE/LXC/Config.pm | 10 ++ 2 files changed, 22 insertions(+), 1 deletion

Re: [pve-devel] [PATCH manager] ui: Remove pveACMEPluginView in favor of pmxACMEPluginView

2024-04-29 Thread Filip Schauer
bump On 29/08/2023 13:00, Filip Schauer wrote: Remove pveACMEPluginView and use the ACMEPluginView from the proxmox-widget-toolkit instead. This leaves pveACMEPluginEditor unused, so remove it as well. Signed-off-by: Filip Schauer --- www/manager6/dc/ACMEClusterView.js | 100

[pve-devel] [PATCH qemu-server] fix get_cpu_bitness always reverting to default cpu type

2024-04-24 Thread Filip Schauer
This fixes the broken prevention of starting a VM with a 32-bit CPU using a 64-bit OVMF (UEFI) BIOS. Signed-off-by: Filip Schauer --- PVE/QemuServer/CPUConfig.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm index

Re: [pve-devel] [PATCH v2 container] fix #4846: Avoid the outdated noacl mount option on ext4

2024-04-17 Thread Filip Schauer
On 11/04/2024 15:44, Fabian Grünbichler wrote: I am not sure this is correct.. or rather, wouldn't it be simpler to say if $storage && $format eq 'raw' => no noacl ? if we get complains that somebody did something non-standard (i.e., manually formatted a raw volume using a different filesystem)

[pve-devel] [PATCH v3 container] fix #4846: Avoid the outdated noacl mount option on ext4

2024-04-17 Thread Filip Schauer
Do not use the 'noacl' mount option when mounting a container disk with an ext4 file system. The option was removed from the kernel in commit 2d544ec923db Signed-off-by: Filip Schauer --- Changes since v3: * Simplify ext4 detection * Do not add noacl if $acl is undefined src/PVE/L

Re: [pve-devel] applied: [PATCH v5 manager 0/2] add edit window for device passthrough

2024-04-17 Thread Filip Schauer
That is already fixed by this commit to pve-container: https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=556ddd393165d51653fe32c1f8fe8628d1802219 On 17/04/2024 11:54, Thomas Lamprecht wrote: Also noticed something not related to the UI side: if I enter some bogus path, like `/dev/enoen

Re: [pve-devel] [PATCH v4 manager 2/2] ui: lxc: add edit window for device passthrough

2024-04-17 Thread Filip Schauer
Changed in patch v5. I also fixed a bug that ignored a custom devid when creating a device passthrough. https://lists.proxmox.com/pipermail/pve-devel/2024-April/063108.html On 16/04/2024 15:57, Fiona Ebner wrote: Am 16.04.24 um 14:10 schrieb Filip Schauer: + +cbind: { + confid

[pve-devel] [PATCH v5 manager 2/2] ui: lxc: add edit window for device passthrough

2024-04-17 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/Makefile | 1 + www/manager6/Utils.js | 11 +++ www/manager6/lxc/DeviceEdit.js | 176 + www/manager6/lxc/Resources.js | 31 +- 4 files changed, 218 insertions(+), 1 deletion(-) create mode

[pve-devel] [PATCH v5 manager 1/2] utils: clarify naming of LXC mount point utils

2024-04-17 Thread Filip Schauer
Clarify the naming of mount point utils to clearly indicate their relation to LXC containers. Signed-off-by: Filip Schauer --- www/manager6/Utils.js| 12 ++-- www/manager6/lxc/MPEdit.js | 4 ++-- www/manager6/lxc/MultiMPEdit.js | 4 ++-- www

[pve-devel] [PATCH v5 manager 0/2] add edit window for device passthrough

2024-04-17 Thread Filip Schauer
non-root users * Change var to let * Minor code cleanup of DeviceEdit.js Changes since v1: * Remove usb mapping * Add mode, uid and gid fields Filip Schauer (2): utils: clarify naming of LXC mount point utils ui: lxc: add edit window for device passthrough www/manager6/Makefile

Re: [pve-devel] [PATCH v3 manager 0/2] add edit window for device passthrough

2024-04-16 Thread Filip Schauer
Superseded by: https://lists.proxmox.com/pipermail/pve-devel/2024-April/063002.html On 31/01/2024 16:03, Filip Schauer wrote: Changes since v2: * Clarify naming of mount point and device passthrough related utils * Remove unnecessary cbind * Make the device index selectible * Add default values

[pve-devel] [PATCH v4 manager 2/2] ui: lxc: add edit window for device passthrough

2024-04-16 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/Makefile | 1 + www/manager6/Utils.js | 11 ++ www/manager6/lxc/DeviceEdit.js | 180 + www/manager6/lxc/Resources.js | 31 +- 4 files changed, 222 insertions(+), 1 deletion(-) create mode

[pve-devel] [PATCH v4 manager 1/2] utils: clarify naming of LXC mount point utils

2024-04-16 Thread Filip Schauer
Clarify the naming of mount point utils to clearly indicate their relation to LXC containers. Signed-off-by: Filip Schauer --- www/manager6/Utils.js| 12 ++-- www/manager6/lxc/MPEdit.js | 4 ++-- www/manager6/lxc/MultiMPEdit.js | 4 ++-- www

  1   2   3   >