Changing Processor Type

Jul 23, 2024
8
0
1
We have a script that runs to enforce the processor type for all VMs in the cluster, it sets it to be the lowest CPU type in the cluster to allow for live migrations. At the moment we have a couple of older Skylake servers, but they are about to be repalced by newer Ice Lake servers. Our tests show that when we run:
/usr/sbin/qm set 101 --cpu Icelake-Server-v3
This won't take effect until we've properly shutdown the VM, rebooting it as part of a normal update process will not process this change.

Is there a way of getting this CPU change to take effect without having to shutdown/start each of our VMs?
 
Although it might be possible in theory, if the VM have CPU hotplug enabled and the operating system inside the VMs handles CPUs from different generations/sockets properly and the running software inside the VM can handle heterogeneous CPU instructions/architecture, this is currently not possible with Proxmox as far as I know. This never happens with real CPUs on physical hardware, so operating systems and software are not designed to handle this.
 
Yeah that makes sense.
Thinking about it, it seems that the CPU type is not changed during an OS intaited reboot, this does not trigger a hardware "refresh". If we could change Proxmox so that an OS intiated reboot effectively did a shutdown/start - that might work?
 
Thinking about it, it seems that the CPU type is not changed during an OS intaited reboot, this does not trigger a hardware "refresh".
Indeed as the kvm process keeps running. I'm not even sure if KVM/QEMU or Proxmox can always detect that the OS inside the VM is rebooting (for all kinds of OS).

If we could change Proxmox so that an OS intiated reboot effectively did a shutdown/start - that might work?
I'm assuming that you want to coordinate the Proxmox reboot (shutdown+startup) of the (kvm process of the) VM with the users of those VMs? And you don't want your users to call you to click Reboot in the Proxmox web GUI for each VM?
I don't know how to do that without some script that any user can start (and that is passed the VMID automatically) and that has sufficient permissions on the Proxmox host(s) to use the Proxmox API.
Maybe someone else here has experience with that? This might also no be specific to Proxmox, and maybe QEMU/KVM resources on the internet might provide some tips on this?

EDIT: I assume that all your VMs will continue to run fine (with the older CPU type). Maybe just wait until a maintenance windows and Bulk Stop and Bulk Start all VMs?
 
Last edited:
  • Like
Reactions: jrhoades
Indeed as the kvm process keeps running. I'm not even sure if KVM/QEMU or Proxmox can always detect that the OS inside the VM is rebooting (for all kinds of OS).
I did not know that, but that now makse sense fo what happens
EDIT: I assume that all your VMs will continue to run fine (with the older CPU type). Maybe just wait until a maintenance windows and Bulk Stop and Bulk Start all VMs?
Yeah a maintenance window might be required.
 
If you have HA enabled for the VM it will be restart after a shutdown. And since this is a real shutdown, any changes will get applied.
Not directly what you had in mind, but maybe a useful alternative.
That's a genius idea! All of our VMs are added to HA by a script, so yeah we could qm shut them down and have HA to start them up