[pve-devel] [PATCH qemu-server] Properly identify the CPU architecture of 32-bit VMs

Fiona Ebner f.ebner at proxmox.com
Mon Dec 11 15:37:39 CET 2023


Am 11.12.23 um 15:12 schrieb Filip Schauer:
> @@ -3293,11 +3293,12 @@ sub is_native($) {
>  
>  sub get_vm_arch {
>      my ($conf) = @_;
> -    return $conf->{arch} // get_host_arch();
> +    return $conf->{arch} // cpu_type_to_arch($conf->{cpu}) // get_host_arch();
>  }
>  
>  my $default_machines = {
>      x86_64 => 'pc',
> +    i386 => 'pc',
>      aarch64 => 'virt',
>  };
>  
> @@ -3390,6 +3391,7 @@ sub get_ovmf_files($$$) {
>  
>  my $Arch2Qemu = {
>      aarch64 => '/usr/bin/qemu-system-aarch64',
> +    i386 => '/usr/bin/qemu-system-i386',
>      x86_64 => '/usr/bin/qemu-system-x86_64',

Am I understanding correctly that you would automatically pick a
different binary depending on the CPU type? Does that actually work with
KVM and/or live migration, i.e. source was started with
qemu-system-x86_64 and now suddenly on the target with qemu-system-i386?

And even if it does, I'd rather not add support for running machines
with this binary. Especially if the only reason is to have this new
check. Once the new binary is there, we'd need to support it (even if
it's not prominently exposed).

If there is no easy way to do the check otherwise, I'd rather wait until
enough users complain and re-consider how to implement the check only then.




More information about the pve-devel mailing list