From 4fd49b4a0458854374c9ccc42b97ef3b234aa011 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 19 Apr 2024 08:51:54 +0200 Subject: [PATCH 01/16] clone disk: prevent 'uninitialized value' warning for unused check since commit 1f743141 (fix #1905: Allow moving unused disks) we want to check the source drive name for 'unused', but in case of importing a volume from the 'import' content type (e.g. from esxi), there is no source drive name. So we have to first check if it's defined. Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 661613d..28e630d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -8154,7 +8154,7 @@ sub clone_disk { my ($newvmid, $dst_drivename, $efisize) = $dest->@{qw(vmid drivename efisize)}; my ($storage, $format) = $dest->@{qw(storage format)}; - my $unused = $src_drivename =~ /^unused/; + my $unused = defined($src_drivename) && $src_drivename =~ /^unused/; my $use_drive_mirror = $full && $running && $src_drivename && !$snapname && !$unused; if ($src_drivename && $dst_drivename && $src_drivename ne $dst_drivename) { -- 2.39.2 From 36377acfbd58c97afaa6703bbd2a18ab96b1c195 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Thu, 11 Apr 2024 11:29:36 +0200 Subject: [PATCH 02/16] backup: disk info: also keep track of size which will be needed to allocate fleecing images. Signed-off-by: Fiona Ebner --- PVE/VZDump/QemuServer.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index be7d8e1..51498db 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -140,6 +140,7 @@ sub prepare { path => $path, volid => $volid, storeid => $storeid, + size => $size, format => $format, virtdev => $ds, qmdevice => "drive-$ds", -- 2.39.2 From 5d8572828211c13e1498b4432d0aa8b060fa159d Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Thu, 11 Apr 2024 11:29:37 +0200 Subject: [PATCH 03/16] backup: implement fleecing option Management for fleecing images is implemented here. If the fleecing option is set, for each disk (except EFI disk and TPM state) a new fleecing image is allocated on the configured fleecing storage (same storage as original disk by default). The disk is attached to QEMU with the 'size' parameter, because the block node in QEMU has to be the exact same size and the newly allocated image might be bigger if the storage has a coarser allocation or rounded up. After backup, the disks are detached and removed from the storage. If the storage supports qcow2, use that as the fleecing image format. This allows saving some space even on storages that do not properly support discard, like, for example, older versions of NFS. Since there can be multiple volumes with the same volume name on different storages, the fleecing image's name cannot be just based on the original volume's name. The schema vm-ID-fleece-N(.FORMAT) with N incrementing for each disk is used. Partially inspired by the existing handling of the TPM state image during backup. Signed-off-by: Fiona Ebner --- PVE/VZDump/QemuServer.pm | 144 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 2 deletions(-) diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 51498db..8c97ee6 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -26,6 +26,7 @@ use PVE::Format qw(render_duration render_bytes); use PVE::QemuConfig; use PVE::QemuServer; +use PVE::QemuServer::Helpers; use PVE::QemuServer::Machine; use PVE::QemuServer::Monitor qw(mon_cmd); @@ -525,6 +526,121 @@ sub get_and_check_pbs_encryption_config { die "internal error - unhandled case for getting & checking PBS encryption ($keyfile, $master_keyfile)!"; } +my sub cleanup_fleecing_images { + my ($self, $disks) = @_; + + for my $di ($disks->@*) { + if (my $volid = $di->{'fleece-volid'}) { + eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); }; + $self->log('warn', "error removing fleecing image '$volid' - $@") if $@; + } + } +} + +my sub allocate_fleecing_images { + my ($self, $disks, $vmid, $fleecing_storeid, $format) = @_; + + die "internal error - no fleecing storage specified\n" if !$fleecing_storeid; + + # TODO what about potential left-over images from a failed attempt? Just + # auto-remove? While unlikely, could conflict with manually created image from user... + + eval { + my $n = 0; # counter for fleecing image names + + for my $di ($disks->@*) { + next if $di->{virtdev} =~ m/^(?:tpmstate|efidisk)\d$/; # too small to be worth it + if ($di->{type} eq 'block' || $di->{type} eq 'file') { + my $scfg = PVE::Storage::storage_config($self->{storecfg}, $fleecing_storeid); + my $name = "vm-$vmid-fleece-$n"; + $name .= ".$format" if $scfg->{path}; + + my $size = PVE::Tools::convert_size($di->{size}, 'b' => 'kb'); + + $di->{'fleece-volid'} = PVE::Storage::vdisk_alloc( + $self->{storecfg}, $fleecing_storeid, $vmid, $format, $name, $size); + + $n++; + } else { + die "implement me (type '$di->{type}')"; + } + } + }; + if (my $err = $@) { + cleanup_fleecing_images($self, $disks); + die $err; + } +} + +my sub detach_fleecing_images { + my ($disks, $vmid) = @_; + + return if !PVE::QemuServer::Helpers::vm_running_locally($vmid); + + for my $di ($disks->@*) { + if (my $volid = $di->{'fleece-volid'}) { + my $devid = "$di->{qmdevice}-fleecing"; + $devid =~ s/^drive-//; # re-added by qemu_drivedel() + eval { PVE::QemuServer::qemu_drivedel($vmid, $devid) }; + } + } +} + +my sub attach_fleecing_images { + my ($self, $disks, $vmid, $format) = @_; + + # unconditionally try to remove potential left-overs from a previous backup + detach_fleecing_images($disks, $vmid); + + my $vollist = [ map { $_->{'fleece-volid'} } grep { $_->{'fleece-volid'} } $disks->@* ]; + PVE::Storage::activate_volumes($self->{storecfg}, $vollist); + + for my $di ($disks->@*) { + if (my $volid = $di->{'fleece-volid'}) { + $self->loginfo("$di->{qmdevice}: attaching fleecing image $volid to QEMU"); + + my $path = PVE::Storage::path($self->{storecfg}, $volid); + my $devid = "$di->{qmdevice}-fleecing"; + my $drive = "file=$path,if=none,id=$devid,format=$format,discard=unmap"; + # Specify size explicitly, to make it work if storage backend rounded up size for + # fleecing image when allocating. + $drive .= ",size=$di->{size}" if $format eq 'raw'; + $drive =~ s/\\/\\\\/g; + my $ret = PVE::QemuServer::Monitor::hmp_cmd($vmid, "drive_add auto \"$drive\""); + die "attaching fleecing image $volid failed - $ret\n" if $ret !~ m/OK/s; + } + } +} + +my sub check_and_prepare_fleecing { + my ($self, $vmid, $fleecing_opts, $disks, $is_template, $qemu_support) = @_; + + # Even if the VM was started specifically for fleecing, it's possible that the VM is resumed and + # then starts doing IO. For VMs that are not resumed the fleecing images will just stay empty, + # so there is no big cost. + + my $use_fleecing = $fleecing_opts && $fleecing_opts->{enabled} && !$is_template; + + if ($use_fleecing && !defined($qemu_support->{'backup-fleecing'})) { + $self->log( + 'warn', + "running QEMU version does not support backup fleecing - continuing without", + ); + $use_fleecing = 0; + } + + if ($use_fleecing) { + my ($default_format, $valid_formats) = PVE::Storage::storage_default_format( + $self->{storecfg}, $fleecing_opts->{storage}); + my $format = scalar(grep { $_ eq 'qcow2' } $valid_formats->@*) ? 'qcow2' : 'raw'; + + allocate_fleecing_images($self, $disks, $vmid, $fleecing_opts->{storage}, $format); + attach_fleecing_images($self, $disks, $vmid, $format); + } + + return $use_fleecing; +} + sub archive_pbs { my ($self, $task, $vmid) = @_; @@ -578,6 +694,7 @@ sub archive_pbs { # get list early so we die on unkown drive types before doing anything my $devlist = _get_task_devlist($task); + my $use_fleecing; $self->enforce_vm_running_for_backup($vmid); $self->{qmeventd_fh} = PVE::QemuServer::register_qmeventd_handle($vmid); @@ -606,6 +723,11 @@ sub archive_pbs { $attach_tpmstate_drive->($self, $task, $vmid); + my $is_template = PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}); + + $use_fleecing = check_and_prepare_fleecing( + $self, $vmid, $opts->{fleecing}, $task->{disks}, $is_template, $qemu_support); + my $fs_frozen = $self->qga_fs_freeze($task, $vmid); my $params = { @@ -617,6 +739,8 @@ sub archive_pbs { devlist => $devlist, 'config-file' => $conffile, }; + $params->{fleecing} = JSON::true if $use_fleecing; + if (defined(my $ns = $scfg->{namespace})) { $params->{'backup-ns'} = $ns; } @@ -633,7 +757,6 @@ sub archive_pbs { $params->{"master-keyfile"} = $master_keyfile if defined($master_keyfile); } - my $is_template = PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}); $params->{'use-dirty-bitmap'} = JSON::true if $qemu_support->{'pbs-dirty-bitmap'} && !$is_template; @@ -665,6 +788,11 @@ sub archive_pbs { } $self->restore_vm_power_state($vmid); + if ($use_fleecing) { + detach_fleecing_images($task->{disks}, $vmid); + cleanup_fleecing_images($self, $task->{disks}); + } + die $err if $err; } @@ -724,8 +852,10 @@ sub archive_vma { $speed = $opts->{bwlimit}*1024; } + my $is_template = PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}); + my $diskcount = scalar(@{$task->{disks}}); - if (PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}) || !$diskcount) { + if ($is_template || !$diskcount) { my @pathlist; foreach my $di (@{$task->{disks}}) { if ($di->{type} eq 'block' || $di->{type} eq 'file') { @@ -765,6 +895,7 @@ sub archive_vma { } my $devlist = _get_task_devlist($task); + my $use_fleecing; $self->enforce_vm_running_for_backup($vmid); $self->{qmeventd_fh} = PVE::QemuServer::register_qmeventd_handle($vmid); @@ -784,6 +915,9 @@ sub archive_vma { $attach_tpmstate_drive->($self, $task, $vmid); + $use_fleecing = check_and_prepare_fleecing( + $self, $vmid, $opts->{fleecing}, $task->{disks}, $is_template, $qemu_support); + my $outfh; if ($opts->{stdout}) { $outfh = $opts->{stdout}; @@ -812,6 +946,7 @@ sub archive_vma { devlist => $devlist }; $params->{'firewall-file'} = $firewall if -e $firewall; + $params->{fleecing} = JSON::true if $use_fleecing; add_backup_performance_options($params, $opts->{performance}, $qemu_support); $qmpclient->queue_cmd($vmid, $backup_cb, 'backup', %$params); @@ -853,6 +988,11 @@ sub archive_vma { $self->restore_vm_power_state($vmid); + if ($use_fleecing) { + detach_fleecing_images($task->{disks}, $vmid); + cleanup_fleecing_images($self, $task->{disks}); + } + if ($err) { if ($cpid) { kill(9, $cpid); -- 2.39.2 From 4c042b28020cd4a0568f90456c9613a9d8374848 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 19 Apr 2024 16:47:54 +0200 Subject: [PATCH 04/16] bump version to 8.1.2 Signed-off-by: Fiona Ebner --- debian/changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 921c4d1..7d4015b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +qemu-server (8.1.2) bookworm; urgency=medium + + * fix #4136: backup: implement fleecing option for improved guest + stability when the backup target is slow + + * fix #4474: stop VM: add 'overrule-shutdown' parameter to prevent + currently running shutdown tasks from blocking the stop task + + * fix #1905: disk move: allow moving unused disks + + * fix #3784: add vIOMMU parameter to support passthrough of PCI devices to + nested virtual machines + + * fix #5363: cloudinit: fix regression to make creation of scsi cloudinit + disks possible again + + -- Proxmox Support Team Fri, 19 Apr 2024 16:09:18 +0200 + qemu-server (8.1.1) bookworm; urgency=medium * config: pending network: avoid undef-warning on old/new comparison -- 2.39.2 From 29728dbf830b99ac1c299980c3d3cdda9333e45e Mon Sep 17 00:00:00 2001 From: Stefan Hanreich Date: Fri, 19 Apr 2024 11:42:34 +0200 Subject: [PATCH 05/16] firewall: add handling for new nft firewall When the nftables firewall is enabled, we do not need to create firewall bridges. Signed-off-by: Stefan Hanreich [ TL: use a more meaningful variable name and add a comment ] Signed-off-by: Thomas Lamprecht --- vm-network-scripts/pve-bridge | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vm-network-scripts/pve-bridge b/vm-network-scripts/pve-bridge index 85997a0..299be1f 100755 --- a/vm-network-scripts/pve-bridge +++ b/vm-network-scripts/pve-bridge @@ -6,6 +6,7 @@ use warnings; use PVE::QemuServer; use PVE::Tools qw(run_command); use PVE::Network; +use PVE::Firewall; my $have_sdn; eval { @@ -44,13 +45,16 @@ die "unable to get network config '$netid'\n" my $net = PVE::QemuServer::parse_net($netconf); die "unable to parse network config '$netid'\n" if !$net; +# The nftable-based implementation from the newer proxmox-firewall does not requires FW bridges +my $create_firewall_bridges = $net->{firewall} && !PVE::Firewall::is_nftables(); + if ($have_sdn) { PVE::Network::SDN::Vnets::add_dhcp_mapping($net->{bridge}, $net->{macaddr}, $vmid, $conf->{name}); PVE::Network::SDN::Zones::tap_create($iface, $net->{bridge}); - PVE::Network::SDN::Zones::tap_plug($iface, $net->{bridge}, $net->{tag}, $net->{firewall}, $net->{trunks}, $net->{rate}); + PVE::Network::SDN::Zones::tap_plug($iface, $net->{bridge}, $net->{tag}, $create_firewall_bridges, $net->{trunks}, $net->{rate}); } else { PVE::Network::tap_create($iface, $net->{bridge}); - PVE::Network::tap_plug($iface, $net->{bridge}, $net->{tag}, $net->{firewall}, $net->{trunks}, $net->{rate}); + PVE::Network::tap_plug($iface, $net->{bridge}, $net->{tag}, $create_firewall_bridges, $net->{trunks}, $net->{rate}); } exit 0; -- 2.39.2 From 21e3a39e48e3a12db39b88a099fa04e5d2a0c787 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 19 Apr 2024 20:11:54 +0200 Subject: [PATCH 06/16] d/control: bump versioned pve-firewall dependency to ensure the is_nftables helper is available Signed-off-by: Thomas Lamprecht --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index b527c60..1301a36 100644 --- a/debian/control +++ b/debian/control @@ -49,7 +49,7 @@ Depends: dbus, # TODO: make legacy edk2 optional (suggests) for PVE 9 and warn explicitly about it pve-edk2-firmware-legacy | pve-edk2-firmware (<< 4~), pve-edk2-firmware-ovmf | pve-edk2-firmware (>= 3.20210831-1), - pve-firewall, + pve-firewall (>= 5.0.4), pve-ha-manager (>= 3.0-9), pve-qemu-kvm (>= 7.1~), socat, -- 2.39.2 From e2c1459968b2249065319c46d43f5039b8b6cf63 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 19 Apr 2024 20:24:20 +0200 Subject: [PATCH 07/16] bump version to 8.1.3 Signed-off-by: Thomas Lamprecht --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7d4015b..bcfba5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +qemu-server (8.1.3) bookworm; urgency=medium + + * firewall: add handling for new nftables based firewall implementation, + which currently is a opt-in drop-in replacement for the older iptables- + based one. + + -- Proxmox Support Team Fri, 19 Apr 2024 20:23:39 +0200 + qemu-server (8.1.2) bookworm; urgency=medium * fix #4136: backup: implement fleecing option for improved guest -- 2.39.2 From 43569a32ae907d796d171bf3d5963a62ec0da6aa Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 20 Apr 2024 12:23:33 +0200 Subject: [PATCH 08/16] api: create vm: fix missing import for serializing machine type The machine handling was transformed into a full fledged property string with a (sub) format, but the single call-site for print_machine was seemingly not tested, as this could have never worked due to a missing import of the print_property_string helper. Fixes: 8082eb8 ("config: define machine schema as property-string") Signed-off-by: Thomas Lamprecht --- 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 3d92c96..cc92e7e 100644 --- a/PVE/QemuServer/Machine.pm +++ b/PVE/QemuServer/Machine.pm @@ -5,7 +5,7 @@ use warnings; use PVE::QemuServer::Helpers; use PVE::QemuServer::Monitor; -use PVE::JSONSchema qw(get_standard_option parse_property_string); +use PVE::JSONSchema qw(get_standard_option parse_property_string print_property_string); # Bump this for VM HW layout changes during a release (where the QEMU machine # version stays the same) -- 2.39.2 From 0089920f42802965a02079b5380c6eef15639c18 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 20 Apr 2024 12:28:39 +0200 Subject: [PATCH 09/16] bump version to 8.1.4 Signed-off-by: Thomas Lamprecht --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index bcfba5c..7398cc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +qemu-server (8.1.4) bookworm; urgency=medium + + * api: create vm: add missing import for serializing machine type to fix a + regression of version 8.1.2. + + -- Proxmox Support Team Sat, 20 Apr 2024 12:28:35 +0200 + qemu-server (8.1.3) bookworm; urgency=medium * firewall: add handling for new nftables based firewall implementation, -- 2.39.2 From 6ba1f1c0c3845f8e37b4a6269d98a44b5123cd2b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 20 Apr 2024 16:19:15 +0200 Subject: [PATCH 10/16] os type: add Windows Server 2025 as supported with win11 type Martin tested the 2025 preview and it worked fine using the win11 OS type. Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 28e630d..82e7d6a 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -421,7 +421,7 @@ wvista;; Microsoft Windows Vista win7;; Microsoft Windows 7 win8;; Microsoft Windows 8/2012/2012r2 win10;; Microsoft Windows 10/2016/2019 -win11;; Microsoft Windows 11/2022 +win11;; Microsoft Windows 11/2022/2025 l24;; Linux 2.4 Kernel l26;; Linux 2.6 - 6.X Kernel solaris;; Solaris/OpenSolaris/OpenIndiania kernel -- 2.39.2 From 81a8c4e5ee44af91dc283bc5ebf4760f0b8b8a51 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Tue, 10 Oct 2023 10:57:03 +0200 Subject: [PATCH 11/16] qmeventd: also treat 'prelaunch' and 'suspended' states as active Otherwise, a VM in those states would be terminated after a backup in handle_qmp_return() with QMP 'quit', which is pretty bad in case of the 'suspended' state. Does not change the fact that a VM started in prelaunch mode for backup is terminated later (that is handled by the Perl code). Signed-off-by: Fiona Ebner --- qmeventd/qmeventd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qmeventd/qmeventd.c b/qmeventd/qmeventd.c index 002b2ac..d8f3ee7 100644 --- a/qmeventd/qmeventd.c +++ b/qmeventd/qmeventd.c @@ -272,8 +272,12 @@ handle_qmp_return(struct Client *client, struct json_object *data, bool error) bool active = false; if (has_status) { const char *status_str = json_object_get_string(status); - active = status_str && - (!strcmp(status_str, "running") || !strcmp(status_str, "paused")); + active = status_str && ( + !strcmp(status_str, "running") + || !strcmp(status_str, "paused") + || !strcmp(status_str, "suspended") + || !strcmp(status_str, "prelaunch") + ); } switch (client->state) { -- 2.39.2 From ed9956cced3ed4436464de33cadf35c490cb3c52 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 23 Apr 2024 17:09:28 +0200 Subject: [PATCH 12/16] bump version to 8.2.0 Signed-off-by: Thomas Lamprecht --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7398cc0..b7e6018 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +qemu-server (8.2.0) bookworm; urgency=medium + + * qmeventd: also treat 'prelaunch' and 'suspended' states as active to avoid + issues when backing up VMs that currently are in those states. + + * OS type: add Windows Server 2025 as supported, map it to the same virtual + hardware profile as the Windows 11 one. + + -- Proxmox Support Team Tue, 23 Apr 2024 17:09:20 +0200 + qemu-server (8.1.4) bookworm; urgency=medium * api: create vm: add missing import for serializing machine type to fix a -- 2.39.2 From c82cb5159092b2d5d360400892b35aa1590fd25a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 23 Apr 2024 17:18:30 +0200 Subject: [PATCH 13/16] d/copyright: update years Signed-off-by: Thomas Lamprecht --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index f974f8e..4c7a015 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -Copyright (C) 2011 - 2021 Proxmox Server Solutions GmbH +Copyright (C) 2011 - 2024 Proxmox Server Solutions GmbH This software is written by Proxmox Server Solutions GmbH -- 2.39.2 From 67dca4238b3df03abf35aba1e1b53bac39de0d85 Mon Sep 17 00:00:00 2001 From: Filip Schauer Date: Wed, 24 Apr 2024 11:14:33 +0200 Subject: [PATCH 14/16] cpu config: fix get_cpu_bitness always reverting to default cpu type This fixes the broken prevention of starting a VM with a 32-bit CPU using a 64-bit OVMF (UEFI) BIOS. Fixes: 89d5b1c9 ("prevent starting a 32-bit VM using a 64-bit OVMF BIOS") Signed-off-by: Filip Schauer [FE: add Fixes trailer, add prefix to title] Signed-off-by: Fiona Ebner --- PVE/QemuServer/CPUConfig.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm index 97a5e55..33f7524 100644 --- a/PVE/QemuServer/CPUConfig.pm +++ b/PVE/QemuServer/CPUConfig.pm @@ -757,7 +757,7 @@ sub get_cpu_bitness { my $cpu = PVE::JSONSchema::parse_property_string('pve-vm-cpu-conf', $cpu_prop_str) or die "Cannot parse cpu description: $cpu_prop_str\n"; - my $cputype = $cpu->{cputype}; + $cputype = $cpu->{cputype}; if (my $model = $builtin_models->{$cputype}) { $cputype = $model->{'reported-model'}; -- 2.39.2 From 54aa98cea5071b5cd325cfaeb21b7aaa4af9bb4d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 24 Apr 2024 11:49:08 +0200 Subject: [PATCH 15/16] bump version to 8.2.1 Signed-off-by: Thomas Lamprecht --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index b7e6018..2e4df79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +qemu-server (8.2.1) bookworm; urgency=medium + + * cpu config: fix get_cpu_bitness always reverting to default cpu type + + -- Proxmox Support Team Wed, 24 Apr 2024 11:49:03 +0200 + qemu-server (8.2.0) bookworm; urgency=medium * qmeventd: also treat 'prelaunch' and 'suspended' states as active to avoid -- 2.39.2 From ce8a5a4b7ec2332d426a77c37bbf3df8f0fae519 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 3 May 2024 14:01:35 +0200 Subject: [PATCH 16/16] schema: fix description of migrate_downtime parameter Since commit 865ef132 ("implement dynamic migration_downtime") the migration downtime will be automatically increased when migration cannot converge at the very end. Update the description to reflect reality. Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 82e7d6a..9032d29 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -590,7 +590,10 @@ EODESCR migrate_downtime => { optional => 1, type => 'number', - description => "Set maximum tolerated downtime (in seconds) for migrations.", + description => "Set maximum tolerated downtime (in seconds) for migrations. Should the" + ." migration not be able to converge in the very end, because too much newly dirtied" + ." RAM needs to be transferred, the limit will be increased automatically step-by-step" + ." until migration can converge.", minimum => 0, default => 0.1, }, -- 2.39.2