VM has less memory than configured

mrmanuel

Member
Jul 3, 2024
46
19
8
Hello,

I'm trying to enable online memory up/downgrade and memory ballooning/dynamic memory allocation, but as soon as I enable "Memory" under "Options -> Hotplug" the VM gets only 895 MB of memory.

I searched the web and the forum, but found no info on why this happen.

I'm using Proxmox VE 8.4 and the VM has Debian 12 installed with a working QEMU Guest Agent. The host has an AMD Ryzen 9 6900HX and 64 GB of memory.

1749195989387.png

1749196002538.png

1749196040780.png

1749196013075.png

Code:
root@pve01:~# cat /etc/pve/nodes/pve02/qemu-server/116.conf
agent: 1
balloon: 8192
bios: seabios
boot: order=virtio0;sata0
cores: 4
cpu: host
hotplug: disk,network,usb,memory,cpu
memory: 16384
meta: creation-qemu=9.0.0,ctime=1720039013
name: docker01
net0: virtio=00:0c:29:1a:93:ba,bridge=vmbr0
numa: 1
onboot: 1
ostype: l26
sata0: none,media=cdrom
scsihw: virtio-scsi-single
smbios1: uuid=564dde42-c068-03e6-4eb4-114d221a93ba
sockets: 1
startup: order=1
tags: replicate-15-minutes
virtio0: local-zfs:vm-116-disk-0,discard=on,iothread=1,size=100G
virtio1: local-zfs:vm-116-disk-1,discard=on,iothread=1,size=80G
vmgenid: b013bb11-1b36-4dfb-8284-e8ecd2c7d025

If I missed important informations just let me know and I will provide them.
 
Why have you enabled numa on a system that apparently has only one CPU?
With AMD, single socket does not mean necessarily that you have only one CPU as seen by the OS. AMD has multichip architecture (in general, I don't know if this also applies to this exact model), which consists of multiple CPU dies with its own memory lanes and such so that numa will make a difference (for the OS, not for the guest, which is another matter).
 
Thank for the fast answers!

@leesteken thank you very much, that was indeed the issue. I had to enable memory hotplug in the guest OS, since the memory is not automatically taken online. Creating the udev rule solved the problem.

1749198559670.png

@gfngfn256 because it's required for memory hotplug

1749198292602.png
 
Just found that here. I still agree with leesteken; not sure why you should use memory hotplugging for that VM.
 
Initially I had understood that hotplug is needed for ballooning, so that ballooning can hotplug the memory, but that is not the case.

Now I understood all better, thanks. Now I can enable ballooning on some VM's and hotplug on my development VM's.
 
  • Like
Reactions: aabraham
Initially I had understood that hotplug is needed for ballooning, so that ballooning can hotplug the memory, but that is not the case.

Now I understood all better, thanks. Now I can enable ballooning on some VM's and hotplug on my development VM's.
Hi mrmanuel! I have a few questions:

- 1.) The drivers for this feature should be present in Debian 12 by default and therefore also enabled.
- 2.) Could it be that your host was running low on memory and therefore thew Debian 12 VM automatically gave up some of its memory?
- 3.) Have you read our documentation on this? Link: https://pve.proxmox.com/wiki/Dynamic_Memory_Management