[pve-devel] [PATCH qemu-server v2 3/8] machine: correctly select pve machine version for non pinned windows guests
Dominik Csapak
d.csapak at proxmox.com
Fri Mar 7 15:44:30 CET 2025
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.csapak at 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
More information about the pve-devel
mailing list