[pve-devel] [PATCH qemu-server] fix get_cpu_bitness always reverting to default cpu type

Filip Schauer f.schauer at proxmox.com
Wed Apr 24 11:14:33 CEST 2024


This fixes the broken prevention of starting a VM with a 32-bit CPU
using a 64-bit OVMF (UEFI) BIOS.

Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
---
 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





More information about the pve-devel mailing list