From 1d4da507b3e530abaa872d901542defabba54578 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 4 Apr 2025 14:53:40 +0200 Subject: [PATCH] machine: incorporate pve machine version when pinning windows guests When creating or updating guests with OS type windows, we want to pin the machine version to a specific one. Since introduction of that feature, we never bumped the pve machine version, so this was missing. Append the pve machine version only if it's not 0 so we don't add that unnecessarily. Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner Reviewed-by: Stoiko Ivanov Tested-By: Stoiko Ivanov Link: https://lore.proxmox.com/20250404125345.3244659-5-d.csapak@proxmox.com Signed-off-by: Thomas Lamprecht --- PVE/QemuServer/Machine.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm index 33f00a59..a5962443 100644 --- a/PVE/QemuServer/Machine.pm +++ b/PVE/QemuServer/Machine.pm @@ -200,6 +200,11 @@ sub windows_get_pinned_machine_version { my $pin_version = $base_version; if (!defined($base_version) || !can_run_pve_machine_version($base_version, $kvmversion)) { $pin_version = get_installed_machine_version($kvmversion); + # pin to the current pveX version to make use of most current features if > 0 + my $pvever = get_pve_version($pin_version); + if ($pvever > 0) { + $pin_version .= "+pve$pvever"; + } } if (!$machine || $machine eq 'pc') { $machine = "pc-i440fx-$pin_version";