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

[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
to 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') {

[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

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

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

[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

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
to 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

[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/LXC.pm | 16

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

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
for 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

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

2024-04-16 Thread Filip Schauer
* 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| 1 + www/manager6/Utils.js| 23 ++- www/manager6/lxc/DeviceEdit.js | 180

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

2024-04-16 Thread Filip Schauer
On 15/04/2024 14:12, Fiona Ebner wrote: + +advancedColumn2: [ + { + xtype: 'textfield', + name: 'mode', + editable: true, + fieldLabel: gettext('Access Mode'), + emptyText: '0660', + labelAlign: 'right', + validator:

Re: [pve-devel] [PATCH common v2 1/2] add get_device_stat helper subroutine

2024-04-16 Thread Filip Schauer
Patch v3 is available: https://lists.proxmox.com/pipermail/pve-devel/2024-April/062989.html On 15/04/2024 15:54, Fiona Ebner wrote: Am 15.04.24 um 15:17 schrieb Filip Schauer: The get_device_stat subroutine gets a device path, validates it, and returns the file mode and the device identifier

[pve-devel] [PATCH v3 container] fix invalid device passthrough being added to config

2024-04-16 Thread Filip Schauer
from update_lxc_config to update_pct_config, which is run before the entry is written to the config file. Signed-off-by: Filip Schauer --- Changes since v2: * Rename get_device_stat to get_device_mode_and_rdev and move it from PVE::Tools to PVE::LXC::Tools. * Cleanup formatting of post-ifs

Re: [pve-devel] [PATCH container] Fix invalid device passthrough being added to config

2024-04-15 Thread Filip Schauer
On 11/04/2024 14:18, Fiona Ebner wrote: - my $absolute_path = $device->{path}; my ($mode, $rdev) = (stat($absolute_path))[2, 6]; - die "Device $absolute_path does not exist\n" if $! == ENOENT; - die "Error accessing device $absolute_path\n" if

[pve-devel] [PATCH common/container v2 0/2] fix invalid device passthrough being added to config

2024-04-15 Thread Filip Schauer
from update_lxc_config to update_pct_config, which is run before the entry is written to the config file. Changes since v1: * Use "if" instead of "unless" * Move device path validation and stat to seperate helper function pve-common: Filip Schauer (1): add get_device_st

[pve-devel] [PATCH container v2 2/2] fix invalid device passthrough being added to config

2024-04-15 Thread Filip Schauer
from update_lxc_config to update_pct_config, which is run before the entry is written to the config file. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm| 18 -- src/PVE/LXC/Config.pm | 11 ++- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src

[pve-devel] [PATCH common v2 1/2] add get_device_stat helper subroutine

2024-04-15 Thread Filip Schauer
The get_device_stat subroutine gets a device path, validates it, and returns the file mode and the device identifier. Signed-off-by: Filip Schauer --- src/PVE/Tools.pm | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm

Re: [pve-devel] [PATCH v2 container 1/2] fix #5160: fix move_mount regression for mount point hotplug

2024-04-09 Thread Filip Schauer
Agreed. This appear to be a leftover from testing. A patch v3 with this removed is available: https://lists.proxmox.com/pipermail/pve-devel/2024-April/062693.html On 09/04/2024 10:23, Wolfgang Bumiller wrote: diff --gita/src/pve-container-debug@.service b/src/pve-container-debug@.service

[pve-devel] [PATCH v3 container 1/2] fix #5160: fix move_mount regression for mount point hotplug

2024-04-09 Thread Filip Schauer
w Apparmor profile to allow move_mount on every mount, specifically for mount point hotplug. Signed-off-by: Filip Schauer --- debian/rules | 3 +++ src/Makefile | 3 +++ src/PVE/LXC.pm | 2 +- src/pve-container-mounthotplug | 7 +++ 4 files c

[pve-devel] [PATCH v3 container 2/2] fix undef warning when apparmor changeprofile fails

2024-04-09 Thread Filip Schauer
Fix a "Use of uninitialized value in numeric ne (!=)" warning when syswrite returns undef when trying to change the apparmor profile. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LX

[pve-devel] [PATCH v3 container 0/2] fix #5160: fix move_mount regression for mount point hotplug

2024-04-09 Thread Filip Schauer
subdirectory. * Fix a perl undef warning when apparmor changeprofile fails. Filip Schauer (2): fix #5160: fix move_mount regression for mount point hotplug fix undef warning when apparmor changeprofile fails debian/rules | 3 +++ src/Makefile | 3 +++ src/PVE

Re: [pve-devel] [PATCH container] fix #5160: fix move_mount regression for mount point hotplug

2024-03-25 Thread Filip Schauer
Patch v2 is available: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062390.html On 08/01/2024 14:54, Filip Schauer wrote: Set up an Apparmor profile to allow moving mounts for mount point hotplug. This fixes a regression caused by kernel commit 157a3537d6 ("apparmor: Fix regre

Re: [pve-devel] [PATCH container] fix #5160: fix move_mount regression for mount point hotplug

2024-03-25 Thread Filip Schauer
On 25/03/2024 11:29, Fiona Ebner wrote: Am 08.01.24 um 14:54 schrieb Filip Schauer: Set up an Apparmor profile to allow moving mounts for mount point hotplug. This fixes a regression caused by kernel commit 157a3537d6 ("apparmor: Fix regression in mount mediation") The commit

[pve-devel] [PATCH v2 container 2/2] fix undef warning when apparmor changeprofile fails

2024-03-25 Thread Filip Schauer
Fix a "Use of uninitialized value in numeric ne (!=)" warning when syswrite returns undef when trying to change the apparmor profile. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LX

[pve-devel] [PATCH v2 container 1/2] fix #5160: fix move_mount regression for mount point hotplug

2024-03-25 Thread Filip Schauer
w Apparmor profile to allow move_mount on every mount, specifically for mount point hotplug. Signed-off-by: Filip Schauer --- debian/rules | 3 +++ src/Makefile | 3 +++ src/PVE/LXC.pm | 2 +- src/pve-container-debug@.service | 1 + src/pve

[pve-devel] [PATCH v2 container 0/2] fix #5160: fix move_mount regression for mount point hotplug

2024-03-25 Thread Filip Schauer
Changes since v1: * Fix loading of apparmor profile not working in postinst, since the profile is not found by dh_apparmor. This is fixed by moving pve-container-mounthotplug out of the pve subdirectory. * Fix a perl undef warning when apparmor changeprofile fails. Filip Schauer (2): fix

[pve-devel] [PATCH backup-qemu] make capi_types module public

2024-03-13 Thread Filip Schauer
public functions, therefore it makes sense to have them public as well. Signed-off-by: Filip Schauer --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 02e74f7..9067fc5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ use

Re: [pve-devel] [PATCH qemu-server 5/5] cpu config: die on hotplug of non x86_64 CPUs

2024-03-11 Thread Filip Schauer
Here is a fixed patch v2: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062153.html On 08/03/2024 14:53, Fiona Ebner wrote: Am 08.03.24 um 14:34 schrieb Thomas Lamprecht: Am 21/02/2024 um 15:33 schrieb Filip Schauer: When attempting a CPU hotplug on an architecture other than

[pve-devel] [PATCH v2 qemu-server] cpu config: die on hotplug of non x86_64 CPUs

2024-03-11 Thread Filip Schauer
When attempting a CPU hotplug on an architecture other than x86_64, die with a clean error instead of attempting a hotplug with a known non-working device command line. Also move the corresponding FIXME up to the error. Signed-off-by: Filip Schauer --- PVE/QemuServer/CPUConfig.pm | 4 +++- 1

Re: [pve-devel] [PATCH qemu-server 1/1] fix #1905: Allow moving unused disks

2024-03-05 Thread Filip Schauer
schrieb Filip Schauer: Allow moving unused/detached disks to another storage. this is a repetition of the commit subject, while that is on it's own OK, I'd rather see a description about why this is OK to do, i.e., why was the original check added, what changed since then, what are the drawbacks

Re: [pve-devel] [PATCH qemu-server 4/4] cpu config: Unify the default value for 'kvm'

2024-02-23 Thread Filip Schauer
On 22/02/2024 10:35, Fiona Ebner wrote: Yes, I also think the change is fine. But breaking ARM64 guests on a x86_64 host would not be fine. The point is CPU hotplug already doesn't work here, so the commit message should be adapted to mention that. I saw you completely removed the commit

Re: [pve-devel] [PATCH qemu-server 4/5] Unify the default value for 'kvm'

2024-02-23 Thread Filip Schauer
this is not a breaking change after all. It should be noted that this change does alter the CPU hotplug behaviour when emulating an x86_64 CPU on a non-x86_64 host. This is however not officially supported in Proxmox VE. On 21/02/2024 15:33, Filip Schauer wrote: Signed-off-by: Filip Schauer --- PVE

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

2024-02-23 Thread Filip Schauer
A v2 of this patch is available: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061932.html On 16/02/2024 14:59, Fiona Ebner wrote: Am 01.09.23 um 11:05 schrieb Filip Schauer: Do not use the 'noacl' mount option when mounting a container disk with an ext4 file system. The option

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

2024-02-23 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 The ext4 detection is based on $do_format in alloc_disk. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm | 22 -- 1

Re: [pve-devel] [PATCH qemu-server 4/4] cpu config: Unify the default value for 'kvm'

2024-02-21 Thread Filip Schauer
On 19/02/2024 15:47, Fiona Ebner wrote: On an x86_64 host, for guests using a different architecture (i.e. aarch64), hot-plugging is already broken, because we try to hotplug a CPU of type "$cpu-x86_64-cpu,XYZ" which won't work anyways: vcpus: hotplug problem - VM 130 qmp command 'device_add'

Re: [pve-devel] [PATCH common 1/1] tools: Add is_native sub to compare the CPU architecture

2024-02-21 Thread Filip Schauer
Patch v8 available: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061899.html On 19/02/2024 15:46, Fiona Ebner wrote: Am 19.12.23 um 10:40 schrieb Filip Schauer: Add an is_native($arch) subroutine to compare a CPU architecture to the host CPU architecture. This is brought

[pve-devel] [PATCH qemu-server 5/5] cpu config: die on hotplug of non x86_64 CPUs

2024-02-21 Thread Filip Schauer
When attempting a CPU hotplug on an architecture other than x86_64, die with a clean error instead of attempting a hotplug with a known non-working device command line. Also move the corresponding FIXME up to the error. Signed-off-by: Filip Schauer --- PVE/QemuServer/CPUConfig.pm | 4 +++- 1

[pve-devel] [PATCH qemu-server 3/5] Move is_native from PVE::QemuServer to PVE::Tools

2024-02-21 Thread Filip Schauer
Move is_native from PVE::QemuServer to PVE::Tools and rename it to is_native_arch to be more descriptive. Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 33c374c

[pve-devel] [PATCH qemu-server 4/5] Unify the default value for 'kvm'

2024-02-21 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 5 +++-- PVE/QemuServer/CPUConfig.pm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 7600939..6055d40 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm

[pve-devel] [PATCH qemu-server 2/5] prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2024-02-21 Thread Filip Schauer
that have the long mode feature (CPUID_EXT2_LM). Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 5 - PVE/QemuServer/CPUConfig.pm | 39 + 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index

[pve-devel] [PATCH common 1/1] tools: add is_native_arch to compare the CPU architecture

2024-02-21 Thread Filip Schauer
Add an is_native_arch($arch) subroutine to compare a CPU architecture to the host CPU architecture. This is brought in from PVE::QemuServer. Signed-off-by: Filip Schauer --- src/PVE/Tools.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index

[pve-devel] [PATCH qemu-server 1/5] cpu config: add helper to get the default CPU type

2024-02-21 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer/CPUConfig.pm | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm index ca2946b..4be5262 100644 --- a/PVE/QemuServer/CPUConfig.pm +++ b/PVE/QemuServer

[pve-devel] [PATCH-SERIES v8 qemu-server, common] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2024-02-21 Thread Filip Schauer
how the list of 32-bit CPU types was obtained common: Filip Schauer (1): tools: add is_native_arch to compare the CPU architecture src/PVE/Tools.pm | 6 ++ 1 file changed, 6 insertions(+) qemu-server: Filip Schauer (5): cpu config: Add helper to get the default CPU type Prevent

[pve-devel] [PATCH many] fix #1905: Allow moving unused disks

2024-02-19 Thread Filip Schauer
Allow moving unused/detached disks to another storage. qemu-server: Filip Schauer (1): fix #1905: Allow moving unused disks PVE/API2/Qemu.pm | 3 --- PVE/QemuServer.pm | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) pve-manager: Filip Schauer (1): Allow moving unused disks

[pve-devel] [PATCH qemu-server 1/1] fix #1905: Allow moving unused disks

2024-02-19 Thread Filip Schauer
Allow moving unused/detached disks to another storage. Signed-off-by: Filip Schauer --- PVE/API2/Qemu.pm | 3 --- PVE/QemuServer.pm | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 69c5896..97216a3 100644 --- a/PVE/API2/Qemu.pm

[pve-devel] [PATCH manager 1/1] Allow moving unused disks to another storage

2024-02-19 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/qemu/HardwareView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js index 5b33b1e2..672a7e1a 100644 --- a/www/manager6/qemu/HardwareView.js +++ b/www/manager6/qemu

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

2024-02-14 Thread Filip Schauer
bump On 01/09/2023 11:05, Filip Schauer wrote: 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 --- src/PVE/LXC.pm | 10 +++--- 1 file changed, 7

Re: [pve-devel] [PATCH pve-manager v2 1/2] fix #4963: firewall: fix editing firewall rules using ips / cidrs

2024-02-14 Thread Filip Schauer
Tested with ipset, alias and direct IPv4 addresses as source and destination. It all works for me. Tested-by: Filip Schauer On 16/01/2024 15:30, Stefan Hanreich wrote: fall back to using v.ref as value when we do not have an alias or ipset since scope and name are not set for ips / cidrs

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

2024-01-31 Thread Filip Schauer
On 26/01/2024 16:23, Fiona Ebner wrote: I might be missing something, but isn't this a normal ExtJS text field? Does this cbind have any actual consequences? Same for the others. This cbind is indeed not needed here. A patch v3 that incorporates your feedback is available:

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

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

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

2024-01-31 Thread Filip Schauer
for 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

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

2024-01-31 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

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

2024-01-29 Thread Filip Schauer
This is a bug in pve-container. I sent a patch for it: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061513.html On 26/01/2024 16:23, Fiona Ebner wrote: - if I add /dev/doesnotexist I'll get an error but it'll still be added to the configuration

[pve-devel] [PATCH container] Fix invalid device passthrough being added to config

2024-01-29 Thread Filip Schauer
from update_lxc_config to update_pct_config, which is run before the entry is written to the config file. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm| 8 src/PVE/LXC/Config.pm | 19 ++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/PVE

Re: [pve-devel] [PATCH cluster] cfs_write_file: fix accidental UTF-8 re-encoding

2024-01-09 Thread Filip Schauer
Repeatedly creating users no longer re-encodes non-ASCII characters with this patch applied. Tested-by: Filip Schauer On 09/01/2024 12:55, Fiona Ebner wrote: by correclty passing the $force_utf8 flag to PVE::Tools::file_set_contents(). The idea was that only callers that are ready will opt

Re: [pve-devel] [PATCH v2 access-control] fix #5136: ldap: Decode non-ASCII characters in attributes

2024-01-09 Thread Filip Schauer
I just tried your patch, but it did not fix this specific issue. On 09/01/2024 14:38, Fiona Ebner wrote: Am 09.01.24 um 14:35 schrieb Filip Schauer: UTF8 decode non-ASCII characters when syncing user attributes, since those will be encoded later on. Without this fix the attributes were encoded

Re: [pve-devel] [PATCH access-control] fix #5136: ldap: Decode non-ASCII characters in attributes

2024-01-09 Thread Filip Schauer
Patch v2 is available: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061273.html On 08/01/2024 10:26, Wolfgang Bumiller wrote: On Wed, Dec 20, 2023 at 03:37:03PM +0100, Filip Schauer wrote: Decode non-ASCII character when syncing user attributes, since those decode *how

[pve-devel] [PATCH v2 access-control] fix #5136: ldap: Decode non-ASCII characters in attributes

2024-01-09 Thread Filip Schauer
UTF8 decode non-ASCII characters when syncing user attributes, since those will be encoded later on. Without this fix the attributes were encoded twice, resulting in cases such as 'ü' turning into 'ü'. Signed-off-by: Filip Schauer --- Changes since v1: * Do not try to URI unescape the user

[pve-devel] [PATCH container] fix #5160: fix move_mount regression for mount point hotplug

2024-01-08 Thread Filip Schauer
w Apparmor profile to allow move_mount on every mount, specifically for mount point hotplug. Signed-off-by: Filip Schauer --- debian/rules | 3 +++ src/Makefile | 3 +++ src/PVE/LXC.pm | 2 +- src/pve-container-debug@.service | 1 + src/pve

[pve-devel] [PATCH access-control] fix #5136: ldap: Decode non-ASCII characters in attributes

2023-12-20 Thread Filip Schauer
Decode non-ASCII character when syncing user attributes, since those will be encoded later on. Without this fix the attributes where encoded twice, resulting in cases such as 'ü' turning into 'ü'. Signed-off-by: Filip Schauer --- src/PVE/Auth/LDAP.pm | 2 +- 1 file changed, 1 insertion(+), 1

Re: [pve-devel] [PATCH v6 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-19 Thread Filip Schauer
Patch series v7 is available: https://lists.proxmox.com/pipermail/pve-devel/2023-December/061147.html On 14/12/2023 12:09, Filip Schauer wrote: Instead of starting a VM with a 32-bit CPU type and a 64-bit OVMF image, throw an error before starting the VM telling the user that OVMF

[pve-devel] [PATCH qemu-server 4/4] cpu config: Unify the default value for 'kvm'

2023-12-19 Thread Filip Schauer
'kvm64' to 'qemu64'. Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 6 -- PVE/QemuServer/CPUConfig.pm | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 1a1080d..b2d71e1 100644 --- a/PVE/QemuServer.pm +++ b/PVE

[pve-devel] [PATCH qemu-server 1/4] cpu config: Add helper to get the default CPU type

2023-12-19 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer/CPUConfig.pm | 9 +++-- PVE/QemuServer/Helpers.pm | 10 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm index ca2946b..c25c2c8 100644 --- a/PVE/QemuServer

[pve-devel] [PATCH v7 qemu-server 2/4] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-19 Thread Filip Schauer
that have the long mode feature (CPUID_EXT2_LM). Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 5 - PVE/QemuServer/CPUConfig.pm | 39 + 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index

[pve-devel] [PATCH-SERIES v7 qemu-server, common] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-19 Thread Filip Schauer
in CPUConfig.pm * Describe how the list of 32-bit CPU types was obtained qemu-server: Filip Schauer (4): cpu config: Add helper to get the default CPU type Prevent starting a 32-bit VM using a 64-bit OVMF BIOS Move is_native from PVE::QemuServer to PVE::Tools Unify the default value

[pve-devel] [PATCH common 1/1] tools: Add is_native sub to compare the CPU architecture

2023-12-19 Thread Filip Schauer
Add an is_native($arch) subroutine to compare a CPU architecture to the host CPU architecture. This is brought in from PVE::QemuServer. Signed-off-by: Filip Schauer --- src/PVE/Tools.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 766c809

[pve-devel] [PATCH qemu-server 3/4] Move is_native from PVE::QemuServer to PVE::Tools

2023-12-19 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index a7b237e..1a1080d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -45,7 +45,7 @@ use PVE::RPCEnvironment; use PVE

Re: [pve-devel] [PATCH v6 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-18 Thread Filip Schauer
I think it makes sense to make the default for $kvm consistent and take is_native($arch) into account. Since it is not officially supported to run Proxmox VE on different architectures this breaking change would likely not hurt. On 15/12/2023 11:08, Fiona Ebner wrote: so we only need to care

Re: [pve-devel] [PATCH v5 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-14 Thread Filip Schauer
Patch v6 available: https://lists.proxmox.com/pipermail/pve-devel/2023-December/061097.html On 14/12/2023 10:46, Fiona Ebner wrote: Am 13.12.23 um 17:58 schrieb Filip Schauer: @@ -719,6 +731,26 @@ sub get_cpu_from_running_vm { return $1; } +sub get_cpu_bitness { Learned a new word

[pve-devel] [PATCH v6 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-14 Thread Filip Schauer
that have the long mode feature (CPUID_EXT2_LM). Signed-off-by: Filip Schauer --- Changes since v3: * Move the cputypes_32bit list from QemuServer.pm to CPUConfig.pm * Turn cputypes_32bit into a hash for lookup * Create a helper get_cpu_bitness function in CPUConfig.pm * Describe how the list of 32

Re: [pve-devel] [PATCH qemu-server] Properly identify the CPU architecture of 32-bit VMs

2023-12-13 Thread Filip Schauer
On 12/12/2023 12:48, Fiona Ebner wrote: Am 12.12.23 um 11:39 schrieb Filip Schauer: It's actually not a different binary. qemu-system-i386 is a symlink that points to qemu-system-x86_64. But still this does indeed break migration between a node that has this patch applied and another node

Re: [pve-devel] [PATCH v4 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-13 Thread Filip Schauer
Patch v5 is available: https://lists.proxmox.com/pipermail/pve-devel/2023-December/061079.html On 13/12/2023 17:53, Filip Schauer wrote: Instead of starting a VM with a 32-bit CPU type and a 64-bit OVMF image, throw an error before starting the VM telling the user that OVMF is not supported

Re: [pve-devel] [PATCH v3 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-13 Thread Filip Schauer
Patch v5 is available: https://lists.proxmox.com/pipermail/pve-devel/2023-December/061079.html On 12/12/2023 12:12, Fiona Ebner wrote: Am 12.12.23 um 11:58 schrieb Filip Schauer: Instead of starting a VM with a 32-bit CPU type and a 64-bit OVMF image, throw an error before starting the VM

[pve-devel] [PATCH v5 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-13 Thread Filip Schauer
that have the long mode feature (CPUID_EXT2_LM). Signed-off-by: Filip Schauer --- Changes since v2: * Simplify the check whether a 32-bit CPU type is used in combination with OVMF Changes since v3: * Move the cputypes_32bit list from QemuServer.pm to CPUConfig.pm * Turn cputypes_32bit into a hash

[pve-devel] [PATCH v4 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-13 Thread Filip Schauer
that have the long mode feature (CPUID_EXT2_LM). Signed-off-by: Filip Schauer --- Changes since v2: * Simplify the check whether a 32-bit CPU type is used in combination with OVMF Changes since v3: * Move the cputypes_32bit list from QemuServer.pm to CPUConfig.pm * Turn cputypes_32bit into a hash

Re: [pve-devel] [PATCH v2 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-12 Thread Filip Schauer
A much simpler patch v3 is available: https://lists.proxmox.com/pipermail/pve-devel/2023-December/061036.html On 12/12/2023 11:37, Filip Schauer wrote: Instead of starting a VM with a 32-bit CPU type and a 64-bit OVMF image, throw an error before starting the VM telling the user that OVMF

[pve-devel] [PATCH v3 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-12 Thread Filip Schauer
Instead of starting a VM with a 32-bit CPU type and a 64-bit OVMF image, throw an error before starting the VM telling the user that OVMF is not supported on 32-bit CPU types. Signed-off-by: Filip Schauer --- Changes since v2: * Simplify the check whether a 32-bit CPU type is used in combination

Re: [pve-devel] [PATCH qemu-server] Properly identify the CPU architecture of 32-bit VMs

2023-12-12 Thread Filip Schauer
://lists.proxmox.com/pipermail/pve-devel/2023-December/061034.html On 11/12/2023 15:37, Fiona Ebner wrote: Am 11.12.23 um 15:12 schrieb Filip Schauer: @@ -3293,11 +3293,12 @@ sub is_native($) { sub get_vm_arch { my ($conf) = @_; -return $conf->{arch} // get_host_arch(); +return $c

[pve-devel] [PATCH v2 qemu-server] Prevent starting a 32-bit VM using a 64-bit OVMF BIOS

2023-12-12 Thread Filip Schauer
Instead of starting a VM with a 32-bit CPU type and a 64-bit OVMF image, throw an error before starting the VM telling the user that OVMF is not supported on 32-bit CPU types. Signed-off-by: Filip Schauer --- PVE/API2/Qemu.pm | 2 +- PVE/QemuServer.pm | 27 --- 2 files

[pve-devel] [PATCH qemu-server] Properly identify the CPU architecture of 32-bit VMs

2023-12-11 Thread Filip Schauer
ince we do not support 32 bit OVMF images. Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 8 +--- PVE/QemuServer/CPUConfig.pm | 28 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 2063e66..5459

  1   2   >