Why don't VMs update certain hardware settings on reboot?

Tmanok

Well-Known Member
Hi PVE Staff and Community,

This has been a bane of mine for a while and I'm not sure if there is something I can do to "fix" it. Whenever I change a VM config (normally in the WebGUI) to provision a different number of resources, e.g. CPU cores, memory, etc, the VM only receives those provisions after a full shutdown and manual boot (I wait about 10s to be sure). When rebooting the VM, either from inside the guest OS or using PVE WebGUI (GEMU agent to request reboot), the provision change does not take effect.

Is there a way to change this? Ideally I would like to be able to assign more or less of any given resource and then schedule a VM reboot that evening for the changes to take effect. However, I am forced to wait and manually apply the process- yes I can and have setup an "at" or crontab script to do this for me in the past on a PVE node in the cluster, but that is not always reliable (e.g. node fails, or the change didn't take effect because it didn't wait long enough).

On VMWare ESXi at least, there is the ability to "hotswap" some resources (namely memory), would this ever be an option in PVE? (Not sure that KVM can even do it, I haven't looked into it myself).
Cheers, thanks for continuing to make a great product and reading my comments regarding this minor administrative irritance.


Tmanok
 
hi,

Whenever I change a VM config (normally in the WebGUI) to provision a different number of resources, e.g. CPU cores, memory, etc, the VM only receives those provisions after a full shutdown and manual boot (I wait about 10s to be sure). When rebooting the VM, either from inside the guest OS or using PVE WebGUI (GEMU agent to request reboot), the provision change does not take effect.
un-hotpluggable pending changes require the qemu process to be spawned anew -- otherwise PVE doesn't know that something has changed (when you reboot inside the VM for example, the qemu process isn't restarted).

On VMWare ESXi at least, there is the ability to "hotswap" some resources (namely memory), would this ever be an option in PVE? (Not sure that KVM can even do it, I haven't looked into it myself).
yes you can enable hotplugging of different resources [0] that won't require a restart of the process then :)

Is there a way to change this? Ideally I would like to be able to assign more or less of any given resource and then schedule a VM reboot that evening for the changes to take effect. However, I am forced to wait and manually apply the process- yes I can and have setup an "at" or crontab script to do this for me in the past on a PVE node in the cluster, but that is not always reliable (e.g. node fails, or the change didn't take effect because it didn't wait long enough).
if there are pending changes the VM won't start without applying them anyways (they're applied at Stop/Start)

but yeah, you can just make a cron script to do something like qm stop VMID && qm start VMID (or just qm reboot VMID) at a given time. not waiting long enough shouldn't be an issue, there might just be some visual delay on the GUI interface but the changes should be still applied.

[0]: https://pve.proxmox.com/wiki/Hotplug_(qemu_disk,nic,cpu,memory)

edit: you can also issue a "Reboot" from the GUI, that should shutdown the VM and apply the changes as well
 
Last edited:
but yeah, you can just make a cron script to do something like qm stop VMID && qm start VMID (or just qm reboot VMID) at a given time. not waiting long enough shouldn't be an issue, there might just be some visual delay on the GUI interface but the changes should be still applied.
If the VM is configured as HA, it should automatically restart if you shut it down from within, at least this was the case in the past. Haven't tried if that is still the case. With this setup, you can just trigger it from the inside.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!