Re: [pve-devel] [PATCH qemu/qemu-server/docs 00/19] adapt to changes in QEMU machine version deprecation/removal

2025-01-03 Thread Dietmar Maurer
19 patches for this seems to be too much. Maybe we can try to cleanup the qemu code for those checks and send those patches upstream (In order to make this series shorter)? ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.c

[pve-devel] Bugfix: LXC root filesystem tar extraction (bug in the exclude pattern)

2025-01-03 Thread Orwa D via pve-devel
--- Begin Message --- *TL;DR * *The tar extraction exclude pattern for LXC containers in the source file * */usr/share/perl5/PVE/LXC/**Create.pm* *must be changed from './dev/*' to 'dev/*'* *Steps to reproduce error due to current bug:* 1. Grab any of the root filesystem cloud images from https://

[pve-devel] [PATCH qemu-server 17/19] machine: adapt to changes in QEMU machine version deprecation/removal

2025-01-03 Thread Fiona Ebner
In QEMU commit a35f8577a0 ("include/hw: add macros for deprecation & removal of versioned machines"), a new machine version deprecation and removal policy was introduced. After only 3 years a machine version will be deprecated while being removed after 6 years. The deprecation is a bit early consi

[pve-devel] [PATCH qemu-server 15/19] machine: log informational line when pinning machine version for Windows guest

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/QemuServer/Machine.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm index cf00da6d..9b18cf6e 100644 --- a/PVE/QemuServer/Machine.pm +++ b/PVE/QemuServer/Machine.pm @@ -269,6 +269,7 @@ sub check_and_pin_

[pve-devel] [PATCH qemu-server 11/19] move meta information handling to its own module

2025-01-03 Thread Fiona Ebner
Like this, it can be used by modules that cannot depend on QemuServer.pm without creating a cyclic dependency. Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 3 ++- PVE/QemuServer.pm | 42 +++--- PVE/QemuServer/Makefile| 1 + PVE/QemuServer

[pve-devel] [PATCH qemu-server 08/19] move get_installed_machine_version() helper to machine module

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm | 9 + PVE/QemuServer/Machine.pm | 7 +++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 85bbb38f..5b1ad3bc 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3

[pve-devel] [PATCH qemu-server 09/19] move windows_get_pinned_machine_version() function to machine module

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 3 ++- PVE/QemuServer.pm | 24 +--- PVE/QemuServer/Machine.pm | 20 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 4c8b2bc0..528

[pve-devel] [PATCH qemu-server 12/19] machine: get vm machine: fallback to creation QEMU version for windows starting with 9.1

2025-01-03 Thread Fiona Ebner
Starting from QEMU 9.1, pin to the creation version instead. Support for machine version 5.1 is expected to drop with QEMU 11.1 and it would still be good to handle Windows VMs that do not have explicit machine version for whatever reason. For example, explicitly setting the machine without a versi

[pve-devel] [PATCH qemu-server 02/19] machine: drop unused parameter from assert_valid_machine_property() helper

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 4 ++-- PVE/QemuServer.pm | 2 +- PVE/QemuServer/Machine.pm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index c7f45051..dc46e2e0 100644 --- a/PVE/API2/Qemu.pm +++ b/PV

[pve-devel] [PATCH qemu 01/19] weaken machine version deprecation warning

2025-01-03 Thread Fiona Ebner
In commit a35f8577a0 ("include/hw: add macros for deprecation & removal of versioned machines"), a new machine version deprecation and removal policy was introduced. After only 3 years a machine version will be deprecated while being removed after 6 years. The deprecation is a bit early considerin

[pve-devel] [PATCH qemu-server 10/19] move get_vm_machine() function to machine module

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 2 +- PVE/QemuServer.pm | 38 ++ PVE/QemuServer/Machine.pm | 34 ++ 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/

[pve-devel] [PATCH qemu-server 04/19] helpers: improve name for variable for mapping arch to binary

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/QemuServer/Helpers.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer/Helpers.pm b/PVE/QemuServer/Helpers.pm index d58bad2b..be10a92a 100644 --- a/PVE/QemuServer/Helpers.pm +++ b/PVE/QemuServer/Helpers.pm @@ -19,7 +19,7 @@

[pve-devel] [PATCH docs 19/19] qm: machine version: document support in PVE

2025-01-03 Thread Fiona Ebner
Elaborate on new QEMU machine version removal policy and how PVE will support machine versions. Make sure to also mention the years, so that users immediately have a good idea for how long it will be. Signed-off-by: Fiona Ebner --- qm.adoc | 26 ++ 1 file changed, 26 inse

[pve-devel] [PATCH qemu-server 05/19] move kvm_user_version() function to helpers module

2025-01-03 Thread Fiona Ebner
Add an export, since the function is rather commonly used (in particular inlined in function calls, where prefixing with the module name would hurt readability) and there won't be much potential for confusion name-wise. This was the only user of stat(), so remove the File::stat include. Signed-of

[pve-devel] [PATCH qemu-server 18/19] machine: code cleanup: avoid superfluous augmented assignment operator

2025-01-03 Thread Fiona Ebner
Suggested by perlcritic. Signed-off-by: Fiona Ebner --- PVE/QemuServer/Machine.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm index 79be4a0e..3b9c826e 100644 --- a/PVE/QemuServer/Machine.pm +++ b/PVE/QemuServer/Machine

[pve-devel] [PATCH qemu-server 06/19] move get_vm_arch() helper to helpers module

2025-01-03 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 4 ++-- PVE/QemuServer.pm | 13 - PVE/QemuServer/Helpers.pm | 5 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 41ad1cb6..4c8b2bc0 100644 --- a/PVE/AP

[pve-devel] [RFC qemu-server 14/19] api: update vm config: pin machine version when switching to windows os type

2025-01-03 Thread Fiona Ebner
During virtual machine creation, the machine version is pinned when the guest OS is Windows. The same should be done when the guest OS type is newly set to Windows for consistency. Signed-off-by: Fiona Ebner --- RFC because it is rather auto-magic-y, so not fully sure we want it. PVE/API2/Qemu

[pve-devel] [PATCH qemu-server 16/19] machine: rename machine_version() function to machine_version_at_least()

2025-01-03 Thread Fiona Ebner
The old name does not make it clear what exactly the function does. Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm | 4 ++-- PVE/QemuServer/Machine.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 12e5543d..5e577431 1

[pve-devel] [PATCH qemu-server 13/19] machine: add check_and_pin_machine_string() helper

2025-01-03 Thread Fiona Ebner
Extract the logic for guest OS-type dependent machine version pinning into a dedicated helper, so it can be re-used. Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 14 +++--- PVE/QemuServer/Machine.pm | 16 2 files changed, 19 insertions(+), 11 deletions(-)

[pve-devel] [PATCH qemu/qemu-server/docs 00/19] adapt to changes in QEMU machine version deprecation/removal

2025-01-03 Thread Fiona Ebner
In QEMU commit a35f8577a0 ("include/hw: add macros for deprecation & removal of versioned machines"), a new machine version deprecation and removal policy was introduced. After only 3 years a machine version will be deprecated while being removed after 6 years. The deprecation is a bit early consi

[pve-devel] [PATCH qemu-server 07/19] machine: add default_machine_for_arch() helper

2025-01-03 Thread Fiona Ebner
There are already other places where 'aarch64' and 'x86_64' are checked to be the only valid architectures, for example, the get_command_for_arch() helper, so the new error scenario for an unknown arch should not cause any regressions. Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm |

[pve-devel] [PATCH qemu-server 03/19] move get_command_for_arch() helper to helpers module

2025-01-03 Thread Fiona Ebner
Cannot use the is_native_arch() helper inside the function anymore, to avoid a cyclic dependency between the 'CPUConfig' and 'Helpers' modules, inline it. Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm | 19 +++ PVE/QemuServer/Helpers.pm | 13 + 2 files chan

Re: [pve-devel] [PATCH v2 pve-common 00/12] Introduce and Package PVE::Path & PVE::Filesystem

2025-01-03 Thread Fiona Ebner
Thank you for the detailed answer and sketching out the plans for the transition to Rust and when perlmod should be used. That clarifies a lot for me! Just wanted to ask about more details for the qemu-server example. Let's say we get to a point where it is nicely split up into dedicated modules a

Re: [pve-devel] [PATCH v2 pve-common 00/12] Introduce and Package PVE::Path & PVE::Filesystem

2025-01-03 Thread Thomas Lamprecht
On 03/01/2025 10:49, Fiona Ebner wrote: > Am 02.01.25 um 16:54 schrieb Max Carrara: > That is a good point. I agree this is also worth discussing. Do we want > to put all bindings for PVE there or do we want to have multiple > libraries for binding? Moving forward, more and more Perl packages will

Re: [pve-devel] [PATCH v2 pve-common 00/12] Introduce and Package PVE::Path & PVE::Filesystem

2025-01-03 Thread Fiona Ebner
Am 02.01.25 um 16:54 schrieb Max Carrara: > On Thu Jan 2, 2025 at 2:53 PM CET, Fiona Ebner wrote: >> Am 02.01.25 um 14:46 schrieb Fiona Ebner: >>> Am 20.12.24 um 19:51 schrieb Max Carrara: Introduce and Package PVE::Path & PVE::Filesystem - v2 =