Hi all,
I've been testing live memory expansion (hotplug) on a Proxmox VM and ran into some behavior I'd like to understand better. I'm not reporting a bug — I just want to understand why it works this way.
Setup:
Three things I noticed:
1. Memory always rounds up or down to the nearest 512 MiB.
Whatever value I type, it gets rounded up or down to the nearest 512 MiB boundary. So 3000 MiB becomes 3072, for example. I assume this has something to do with how QEMU handles virtual DIMMs internally — is that correct? And does the rounding granularity change depending on the memory ceiling you set for the VM?
2. Proxmox accepts values way beyond what the host actually has free.
I typed 100 GB as a test, even though my node only has 6 GB free (18 GB across the full cluster). Proxmox accepted it without any warning, stored it as pending, and partially applied it before throwing this error:
After the error, the UI showed ~47 GB as the applied value, with 100 GB still pending in orange. Is there any validation at the config level, or does the check only happen at the moment QEMU tries to plug the DIMM? And what exactly is the "vhost memory slot" limit — is it a fixed number per VM, or does it depend on configuration?
3. The partial application after the error.
Related to the above — it looked like some DIMMs got plugged before the error was thrown. Is QEMU adding them one at a time and stopping mid-way when it hits the slot limit? Or was what I saw in the UI just the pending config value and not actual allocated RAM?
I've done some reading and pieced together a rough understanding, but I haven't found a single source that explains all of this clearly. Happy to be pointed at documentation if it exists — I just haven't found it.
Thanks
I've been testing live memory expansion (hotplug) on a Proxmox VM and ran into some behavior I'd like to understand better. I'm not reporting a bug — I just want to understand why it works this way.
Setup:
- Proxmox VE (latest stable)
- 6gb ram node
- 4 cpu node
- VM with hotplug enabled for Memory and CPU
- NUMA enabled
- Guest: Debian 13
Three things I noticed:
1. Memory always rounds up or down to the nearest 512 MiB.
Whatever value I type, it gets rounded up or down to the nearest 512 MiB boundary. So 3000 MiB becomes 3072, for example. I assume this has something to do with how QEMU handles virtual DIMMs internally — is that correct? And does the rounding granularity change depending on the memory ceiling you set for the VM?
2. Proxmox accepts values way beyond what the host actually has free.
I typed 100 GB as a test, even though my node only has 6 GB free (18 GB across the full cluster). Proxmox accepted it without any warning, stored it as pending, and partially applied it before throwing this error:
memory: hotplug problem - VM 100 qmp command 'device_add' failed - a used vhost backend has not enough free memory slots left
After the error, the UI showed ~47 GB as the applied value, with 100 GB still pending in orange. Is there any validation at the config level, or does the check only happen at the moment QEMU tries to plug the DIMM? And what exactly is the "vhost memory slot" limit — is it a fixed number per VM, or does it depend on configuration?
3. The partial application after the error.
Related to the above — it looked like some DIMMs got plugged before the error was thrown. Is QEMU adding them one at a time and stopping mid-way when it hits the slot limit? Or was what I saw in the UI just the pending config value and not actual allocated RAM?
I've done some reading and pieced together a rough understanding, but I haven't found a single source that explains all of this clearly. Happy to be pointed at documentation if it exists — I just haven't found it.
Thanks