[pve-devel] [PATCH qemu-server 02/13] add 'arch' vm configuration

Dominik Csapak d.csapak at proxmox.com
Mon Oct 29 11:17:07 CET 2018


On 10/29/18 10:28 AM, Thomas Lamprecht wrote:
> Am 10/25/2018 um 04:19 PM schrieb Dominik Csapak:
>> On 10/24/18 10:56 AM, Wolfgang Bumiller wrote:
>>> @@ -3175,7 +3215,7 @@ sub config_to_command {
>>>          my $q35 = machine_type_is_q35($conf);
>>>        my $hotplug_features = parse_hotplug_features(defined($conf->{hotplug}) ? $conf->{hotplug} : '1');
>>> -    my $machine_type = $forcemachine || $conf->{machine};
>>> +    my $machine_type = $forcemachine || $base_machine;
>>
>> this seems wrong, since we lose all version info about the machine
>> (e.g. if someone uses pc-2.5)
> 
> the get_basic_machine_info sub uses $conf->{machine} so your implication is wrong?
> This look OK, AFAICT.

but get_basic_machine_info removes that:

sub get_basic_machine_info {
     my ($conf) = @_;

     my $arch = $conf->{arch} // get_host_arch();

     # $base_machine is the "base" type (q35, i440fx, virt) without 
version or pxe
     # suffix...
     my $base_machine = $conf->{machine} || $default_machines->{$arch};
     $base_machine =~ s/-\d.*$//;
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here the versions get removed

     return ($arch, $base_machine);
}


> 
>>
>>>        my $use_old_bios_files = undef;
>>>        ($use_old_bios_files, $machine_type) = qemu_use_old_bios_files($machine_type);
>>>   
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 





More information about the pve-devel mailing list