Allow edit of initial memory size

mbosma

Renowned Member
Dec 3, 2018
124
25
68
30
Hi Devs,

Using memory hotplug according to the proxmox wiki I succesfully increased and decreased the memory size of a Debian/Ubuntu guest.

However when booting a virtual machine with memory hot-plug enabled and more than 21GB memory the guest OS can kernel panic with the following error:
Code:
Kernel panic - not syncing: System is deadlocked on memory

After doing some digging it appears that coldplug of a high amount of memory dimms (70 in my case with 64gb) the 1Gb of initial memory is depleted.
More on this is found on in this thread: https://bugzilla.redhat.com/show_bug.cgi?id=1866360

I used qm showcmd and edited the configuration to start the vm with 4GB initial memory using 2 2048M dimms instead of 2 512M dimms, this allowed the vm to start without issues.
-cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep -m 'size=1024,slots=255,maxmem=524288M' -object 'memory-backend-ram,id=ram-node0,size=512M' -numa 'node,nodeid=0,cpus=0-15,memdev=ram-node0' -object 'memory-backend-ram,id=ram-node1,size=512M' -numa 'node,nodeid=1,cpus=16-31,memdev=ram-node1' -object 'memory-backend-ram,id=mem-dimm0,size=512M' -device 'pc-dimm,id=dimm0,memdev=mem-dimm0,node=0' -object 'memory-backend-ram,id=mem-dimm1,size=512M' -device 'pc-dimm,id=dimm1,memdev=mem-dimm1,node=1' -object 'memory-backend-ram,id=mem-dimm2,size=512M' -device 'pc-dimm,id=dimm2,memdev=mem-dimm2,node=0' -object 'memory-backend-ram,id=mem-dimm3,size=512M' -device 'pc-dimm,id=dimm3,memdev=mem-dimm3,node=1'
*TRUNCATED FOR CHARACTER LIMIT*
-object 'memory-backend-ram,id=mem-dimm68,size=2048M' -device 'pc-dimm,id=dimm68,memdev=mem-dimm68,node=0' -object 'memory-backend-ram,id=mem-dimm69,size=2048M' -device 'pc-dimm,id=dimm69,memdev=mem-dimm69,node=1' -object 'memory-backend-ram,id=mem-dimm70,size=2048M' -device 'pc-dimm,id=dimm70,memdev=mem-dimm70,node=0' -object 'memory-backend-ram,id=mem-dimm71,size=2048M' -device 'pc-dimm,id=dimm71,memdev=mem-dimm71,node=1'
*TRUNCATED FOR CHARACTER LIMIT*

-cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep -m 'size=4096,slots=255,maxmem=524288M' -object 'memory-backend-ram,id=ram-node0,size=2048M' -numa 'node,nodeid=0,cpus=0-15,memdev=ram-node0' -object 'memory-backend-ram,id=ram-node1,size=2048M' -numa 'node,nodeid=1,cpus=16-31,memdev=ram-node1' -object 'memory-backend-ram,id=mem-dimm0,size=512M' -device 'pc-dimm,id=dimm0,memdev=mem-dimm0,node=0' -object 'memory-backend-ram,id=mem-dimm1,size=512M' -device 'pc-dimm,id=dimm1,memdev=mem-dimm1,node=1' -object 'memory-backend-ram,id=mem-dimm2,size=512M' -device 'pc-dimm,id=dimm2,memdev=mem-dimm2,node=0' -object 'memory-backend-ram,id=mem-dimm3,size=512M' -device 'pc-dimm,id=dimm3,memdev=mem-dimm3,node=1'
*TRUNCATED FOR CHARACTER LIMIT*
-object 'memory-backend-ram,id=mem-dimm68,size=2048M' -device 'pc-dimm,id=dimm68,memdev=mem-dimm68,node=0' -object 'memory-backend-ram,id=mem-dimm69,size=2048M' -device 'pc-dimm,id=dimm69,memdev=mem-dimm69,node=1' -object 'memory-backend-ram,id=mem-dimm70,size=512M' -device 'pc-dimm,id=dimm70,memdev=mem-dimm70,node=0' -object 'memory-backend-ram,id=mem-dimm71,size=512M' -device 'pc-dimm,id=dimm71,memdev=mem-dimm71,node=1'
*TRUNCATED FOR CHARACTER LIMIT*

In summary, I edited 'size=1024,slots=255,maxmem=524288M' to 'size=4096,slots=255,maxmem=524288M', made the first two dimms 2048M each and the last two to 512M to compensate for that.

Would it be possible to add a variable in memory settings to pass this changed initial memory value to the VM?

I saw some more threads on the forum with describing this same issue so it seems I'm not alone.
Here are a few instances I found:
https://forum.proxmox.com/threads/problem-with-hotplug-and-64gb-ram.73621/post-627640
https://forum.proxmox.com/threads/t...2048-for-hotplugging-still.127632/post-558002
https://forum.proxmox.com/threads/memory-hotplug-system-is-deadlocked-on-memory.115403/post-499639

Shall I open a feature request or does a similar one already exist?

Kind regards
 
Last edited:

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!