Am 29.01.26 um 1:15 PM schrieb Dominik Csapak:
> On 1/29/26 12:11 PM, Fiona Ebner wrote:
>> Am 28.01.26 um 1:30 PM schrieb Dominik Csapak:
>>> For this, introduce a new 'QemuMachineSelector', which does the same
>>> thing as the scsihw selector by filtering the kv store with a predefined
>>> list for each architecture.
>>>
>>> Since the backend default of the machine is actually different for
>>> x86_64 vs aarch64, there is some logic to handle the 'default' value
>>> for the machine (iow. replace 'pc' with the default machine for each
>>> architecture)
>>>
>>
>> Setting a machine version for an existing aarch64 VM is broken, e.g. the
>> result will be "pc-i440fx-10.1" instead.
> 
> yep noticed it too now, the reason is that the arch and nodename are not
> set via 'binds' yet when the 'onMachineChange' is triggering
> (at least not everytime, maybe a race condition? i swear it
> worked at least once on my machine ;) )
> 
> I'll have to change how we get/save the arch/nodename there.
> When that works, it'll not show any versions currently because
> the backend does not return any 'virt' models.
> 
> i think we should fix that in the backend. I'd also add an 'arch'
> parameter for the machines like you sent for the cputype

Ah, I'll look into adding that!

>>> diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/
>>> HardwareView.js
>>> index b7cc7856..1e2cd026 100644
>>> --- a/www/manager6/qemu/HardwareView.js
>>> +++ b/www/manager6/qemu/HardwareView.js
>>> @@ -202,13 +202,14 @@ Ext.define('PVE.qemu.HardwareView', {
>>>                   defaultValue: '',
>>>                   renderer: function (value, metaData, record,
>>> rowIndex, colIndex, store, pending) {
>>>                       let ostype = me.getObjectValue('ostype',
>>> undefined, pending);
>>> +                    let arch =
>>> PVE.Utils.getArchitecture(me.getObjectValue('arch'), nodename);
>>>                       if (
>>>                           PVE.Utils.is_windows(ostype) &&
>>>                           (!value || value === 'pc' || value === 'q35')
>>>                       ) {
>>>                           return value === 'q35' ? 'pc-q35-5.1' :
>>> 'pc-i440fx-5.1';
>>
>> Unrelated to the patch, but I noticed now that this is actually wrong.
>> Since QEMU 9.1+ the backend defaults to the creation version if present.
> 
> i think this was just done as a heuristic without trying to replicate
> the backend logic too tightly, but i might be misremembering

I think I just wasn't aware/didn't adapt it to the backend change (that
came much later).



Reply via email to