when we don't have a specific machine version on a windows guest, we use
the creation meta info to pin the machine version. Currently we always
append the pve machine version from the current installed kvm version,
which is not necessarily the version we pinned the guest to.

Instead, use the same mechanism as for normal version pinned machines,
which use 'pve0'.

For non-windows machines, we use the current QEMU machine version so we
should use the pve machine version from that too, so that stays the
same.

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
changes from v1:
* drop the pve version check from the meta info

 PVE/QemuServer/Machine.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm
index f1acde8f..33f00a59 100644
--- a/PVE/QemuServer/Machine.pm
+++ b/PVE/QemuServer/Machine.pm
@@ -240,11 +240,12 @@ sub get_vm_machine {
                }
            }
            $machine = windows_get_pinned_machine_version($machine, 
$base_version, $kvmversion);
+       } else {
+           $arch //= 'x86_64';
+           $machine ||= default_machine_for_arch($arch);
+           my $pvever = get_pve_version($kvmversion);
+           $machine .= "+pve$pvever";
        }
-       $arch //= 'x86_64';
-       $machine ||= default_machine_for_arch($arch);
-       my $pvever = get_pve_version($kvmversion);
-       $machine .= "+pve$pvever";
     }
 
     if ($machine !~ m/\+pve\d+?(?:\.pxe)?$/) {
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to