[pve-devel] [PATCH qemu-server v2 4/8] machine: incorporate pve machine version when pinning windows guests
Dominik Csapak
d.csapak at proxmox.com
Fri Mar 7 15:44:31 CET 2025
When creating or updating guests with ostype 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 <d.csapak at proxmox.com>
---
changes from v1:
* move adding the pvever to windows_get_pinned_machine_version, as
suggested by fiona
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";
--
2.39.5
More information about the pve-devel
mailing list