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

Filip Schauer f.schauer at proxmox.com
Tue Dec 12 11:39:37 CET 2023


It's actually not a different binary. qemu-system-i386 is a symlink that
points to qemu-system-x86_64. But still this does indeed break migration
between a node that has this patch applied and another node without the
patch.

A patch v2 that only adds the check is available here:
https://lists.proxmox.com/pipermail/pve-devel/2023-December/061034.html

On 11/12/2023 15:37, Fiona Ebner wrote:
> 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