[pve-devel] [PATCH v9 qemu-server 2/6] Include "-cpu" parameter with snapshots/suspend

Stefan Reiter s.reiter at proxmox.com
Tue Apr 7 09:25:22 CEST 2020


On 07/04/2020 09:04, Fabian Ebner wrote:
> On 06.04.20 15:01, Stefan Reiter wrote:
>> On 06/04/2020 14:31, Fabian Ebner wrote:
>>> On 26.03.20 16:13, Stefan Reiter wrote:
>>>> Just like with live-migration, custom CPU models might change after a
>>>> snapshot has been taken (or a VM suspended), which would lead to a
>>>> different QEMU invocation on rollback/resume.
>>>>
>>>> Save the "-cpu" argument as a new "runningcpu" option into the VM conf
>>>> akin to "runningmachine" and use as override during rollback/resume.
>>>>
>>>> No functional change with non-custom CPU types intended.
>>>>
>>>
>>> The changes apply to all CPU types, but that's not a bad thing. If 
>>> one takes a snapshot, restarts the VM with a different CPU type and 
>>> does a rollback, it'll use the CPU at the time of the snapshot even 
>>> if no custom models are involved.
>>>
>>
>> Was that a thing before? It should have worked that way anyhow, since 
>> the 'cpu' setting was stored in the snapshot's section in the config.
>>
> 
> Ah, you're right. As long as the defaults for the standard models don't 
> change, vm_start will re-generate the same -cpu option when no custom 
> model is involved.
> 

The default models can also be versioned with 'runningmachine', so for 
non-custom cpus this was always safe.




More information about the pve-devel mailing list