Re: [pve-devel] [RFC PATCH storage] pvesm export: convert dd's \r in status=progress output to \n

2025-01-16 Thread Fabian Grünbichler
On January 16, 2025 9:13 am, Dominik Csapak wrote: > On 1/15/25 12:28, Thomas Lamprecht wrote: >> Am 15.01.25 um 10:59 schrieb Dominik Csapak: >>> pvesm export is mostly used for (remote) migrations, where the >>> status progress output lands in a task log. For task logs we want to >>> have line ba

Re: [pve-devel] [RFC PATCH storage] pvesm export: convert dd's \r in status=progress output to \n

2025-01-16 Thread Thomas Lamprecht
Am 16.01.25 um 09:13 schrieb Dominik Csapak: >> FWIW, you could test with `-t STDERR` if the std error FD is a terminal >> and differ between replacing \r or not. >> > not sure if that would work here since we do quite some redirection for > the worker task (to be able to display + putting it in th

Re: [pve-devel] [PATCH docs v3 1/2] pvesr: update the chapter and bring it into good condition

2025-01-16 Thread Daniel Kral
On 1/10/25 17:58, Alexander Zeidler wrote: Existing information is preserved in a restructured way and usefully supplemented. * restructure and revise the introduction * add subchapter "Considerations" * remove the subchapter "Schedule Format" with its one line of content and link where appro

Re: [pve-devel] [PATCH qemu] add fix for crash during live migration in combination with block flush

2025-01-16 Thread Fiona Ebner
Am 15.01.25 um 17:28 schrieb Thomas Lamprecht: > Am 08.01.25 um 14:03 schrieb Fiona Ebner: >> Setting blk->root is a graph change operation and thus needs to be >> protected by the block graph write lock in blk_remove_bs(). The >> assignment to blk->root in blk_insert_bs() is already protected by >

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

2025-01-16 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 8392400e..52425ee8 100644 --- a/PVE/API2/Qemu.pm +++ b/PV

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

2025-01-16 Thread Fiona Ebner
Changes in v2: * change deprecation logic into QEMU itself rather than just weakening the warning there (so no need to change the deprecation logic in qemu-server anymore) * get rid of outdated information from "Update to a Newer Machine Version" section in docs In QEMU commit a35f8577a0 ("i

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

2025-01-16 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 82795767..ee7bb017 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3

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

2025-01-16 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 --- Changes in v2: * get rid of outdated information from "Update to

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

2025-01-16 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 868508e7..2840de1b 100644 --- a/PVE/AP

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

2025-01-16 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 2840de1b..8d0

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

2025-01-16 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 v2 17/18] machine: code cleanup: avoid superfluous augmented assignment operator

2025-01-16 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 6398e756..7b7479d1 100644 --- a/PVE/QemuServer/Machine.pm +++ b/PVE/QemuServer/Machine

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

2025-01-16 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 v2 03/18] move get_command_for_arch() helper to helpers module

2025-01-16 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

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

2025-01-16 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 v2 16/18] machine: rename machine_version() function to machine_version_at_least()

2025-01-16 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 6f2a9aed..58d23533 1

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

2025-01-16 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 v2 05/18] move kvm_user_version() function to helpers module

2025-01-16 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 v2 14/18] api: update vm config: pin machine version when switching to windows os type

2025-01-16 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 --- PVE/API2/Qemu.pm | 18 ++ 1 file changed, 18 insertions(+) diff --g

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

2025-01-16 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 v2 01/18] adapt machine version deprecation for Proxmox VE

2025-01-16 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 v2 04/18] helpers: improve name for variable for mapping arch to binary

2025-01-16 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 qemu-server v2 13/18] machine: add check_and_pin_machine_string() helper

2025-01-16 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(-)

Re: [pve-devel] [PATCH qemu] add fix for crash during live migration in combination with block flush

2025-01-16 Thread Thomas Lamprecht
Am 16.01.25 um 11:30 schrieb Fiona Ebner: > That more complete change is in the package provided to the forum user. > The change should still be an improvement over the status quo, however, > the user reported that it didn't help with the specific crash. I don't > see other code paths that would fi

Re: [pve-devel] [PATCH proxmox-ve-config] cargo: update dependencies to latest

2025-01-16 Thread Gabriel Goller
Obsolete. This has been done here already: https://git.proxmox.com/?p=proxmox-ve-rs.git;a=commit;h=a8f9c5ca270b6d25249c4c85805ed90c1b02ff88 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-de

Re: [pve-devel] [RFC PATCH storage] pvesm export: convert dd's \r in status=progress output to \n

2025-01-16 Thread Dominik Csapak
On 1/15/25 12:28, Thomas Lamprecht wrote: Am 15.01.25 um 10:59 schrieb Dominik Csapak: pvesm export is mostly used for (remote) migrations, where the status progress output lands in a task log. For task logs we want to have line based output (since it's not a terminal), but dd uses \r to overwri

[pve-devel] [PATCH proxmox-ve-config] cargo: update dependencies to latest

2025-01-16 Thread Gabriel Goller
Major proxmox-sectionc-config and minor proxmox-sys update, shouldn't change anything. Signed-off-by: Gabriel Goller --- proxmox-ve-config/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-ve-config/Cargo.toml b/proxmox-ve-config/Cargo.toml index 0c8f6166

Re: [pve-devel] [RFC PATCH storage] pvesm export: convert dd's \r in status=progress output to \n

2025-01-16 Thread Dominik Csapak
On 1/16/25 10:21, Thomas Lamprecht wrote: Am 16.01.25 um 09:13 schrieb Dominik Csapak: FWIW, you could test with `-t STDERR` if the std error FD is a terminal and differ between replacing \r or not. not sure if that would work here since we do quite some redirection for the worker task (to be

[pve-devel] [PATCH manager] pvestatd: improve broadcast of node version-info

2025-01-16 Thread Aaron Lauterer
Until now, the pvestatd did broadcast the pve-manager version only once after startup of the service. But there are some situations, where the local pmxcfs (pve-cluster) restarts and loses that information. Basically everytime we restart the pmxcfs without restarting pvestatd too. For example, on

Re: [pve-devel] [PATCH manager] pvestatd: improve broadcast of node version-info

2025-01-16 Thread Aaron Lauterer
On 2025-01-16 17:35, Christian Ebner wrote: On 1/16/25 17:30, Aaron Lauterer wrote: […] This will close issue 5894 I guess [0]? [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5894 Specifically, the 'version-info', yes. Are there other properties too?

Re: [pve-devel] [PATCH manager] pvestatd: improve broadcast of node version-info

2025-01-16 Thread Christian Ebner
On 1/16/25 17:30, Aaron Lauterer wrote: Until now, the pvestatd did broadcast the pve-manager version only once after startup of the service. But there are some situations, where the local pmxcfs (pve-cluster) restarts and loses that information. Basically everytime we restart the pmxcfs without

Re: [pve-devel] [PATCH manager] pvestatd: improve broadcast of node version-info

2025-01-16 Thread Christian Ebner
On 1/16/25 17:38, Aaron Lauterer wrote: On  2025-01-16  17:35, Christian Ebner wrote: On 1/16/25 17:30, Aaron Lauterer wrote: […] This will close issue 5894 I guess [0]? [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5894 Specifically, the 'version-info', yes. Are there other properties

Re: [pve-devel] [PATCH v3 qemu-server 08/11] blockdev: convert drive_mirror to blockdev_mirror

2025-01-16 Thread DERUMIER, Alexandre via pve-devel
--- Begin Message --- >>Yes, we don't need much to get enough collision-resistance. Just >>wanted >>to make sure and check it explicitly. I have done some test with sha1, with base62 encode ('0..9', 'A..Z', 'a..z) the node-name require to start with an alpha character prefix encodebase62(sha

Re: [pve-devel] [PATCH v2 qemu-server, manager 00/12] bugzilla #4225 -- improve handling of unavailable ISOs

2025-01-16 Thread Daniel Kral
On 1/13/25 09:55, Daniel Herzig wrote: This patch series addresses bugzilla entry #4225.> Currently VMs refuse to to start if a configured isofile becomes unavailable, be it a deleted file or an unavailable network storage. This patch series introduces a new parameter in Drive.pm, called 'requir

Re: [pve-devel] [PATCH v2 3/12] fix #4225: qemuserver: add function to eject isofiles

2025-01-16 Thread Daniel Kral
On 1/13/25 09:55, Daniel Herzig wrote: Current behaviour prevents a VM from starting, if an ISO file defined in the configuration becomes unavailable. The function eject_nonrequired_isos checks on whether a cdrom drive is marked as 'required' or not. If the parameter 'required' is not defined, i

Re: [pve-devel] [PATCH v2 11/12] fix #4225: ui: qemu: cdedit: enable required checkbox for isos

2025-01-16 Thread Daniel Kral
On 1/13/25 09:56, Daniel Herzig wrote: Enables the 'required' checkbox for the IsoSelector. If the parameter is not set, the backend will use the default (set to 1). Behaviour: * Only send parameter if not default (required=0) * Checked if parameter is missing (default) * Unchecked when adding a

Re: [pve-devel] [PATCH v2 2/12] qemuserver: add helper function for mocking files

2025-01-16 Thread Daniel Kral
On 1/13/25 09:55, Daniel Herzig wrote: This stub function can be used for mocking a file's existance in testruns. Signed-off-by: Daniel Herzig --- PVE/QemuServer.pm | 5 + 1 file changed, 5 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 5cde94a1..d07c170e 100644

Re: [pve-devel] [PATCH v2 12/12] ui: qemu: hardware: add eject button for cdroms

2025-01-16 Thread Daniel Kral
On 1/13/25 09:56, Daniel Herzig wrote: Eject by setting file to none. That's a great addition to the WebGUI! One small thing: What about also allow ejecting physical CDROMs? :) Else consider this: Reviewed-by: Daniel Kral Tested-by: Daniel Kral ___

[pve-devel] [PATCH proxmox-ve-rs] config: fix a few clippy warnings

2025-01-16 Thread Christoph Heiss
.. as newly introduced with 1.84. Namely `elided_named_lifetimes` for the change of `SdnConfig` and `clippy::needless_lifetimes` for the rest. Signed-off-by: Christoph Heiss --- proxmox-ve-config/src/firewall/parse.rs | 6 +++--- proxmox-ve-config/src/sdn/config.rs | 2 +- 2 files changed,