[SOLVED] less memory inside VM with hotplug memory

udo

Distinguished Member
Apr 22, 2009
5,981
203
163
Ahrensburg; Germany
Hi,
just see an strange effect.

If I select Hotplug Mem for an 4GB ubuntu 14.04 VM I see only 1GB Ram inside the VM:
Code:
free
  total  used  free  shared  buffers  cached
Mem:  1017676  479352  538324  500  18088  159724
-/+ buffers/cache:  301540  716136
Swap:  3600380  0  3600380
The VM-qonfig looks not strange:
Code:
cat /etc/pve/qemu-server/110.conf
boot: cdn
bootdisk: virtio0
cores: 1
hotplug: disk,network,usb,memory
memory: 4096
name: vdb01
net0: virtio=1H:C7:22:6E:9D:B1,bridge=vmbr0,tag=4
numa: 1
onboot: 1
ostype: l26
scsihw: virtio-scsi-pci
sockets: 1
virtio0: local-zfs:vm-110-disk-1,size=25000M
virtio1: local-zfs:vm-110-disk-2,backup=0,size=41G
without hotplug memory I got full 4GB!

edit: Version:
Code:
pveversion -v
proxmox-ve: 4.3-71 (running kernel: 4.4.21-1-pve)
pve-manager: 4.3-9 (running version: 4.3-9/f7c6f0cd)
pve-kernel-4.4.21-1-pve: 4.4.21-71
pve-kernel-4.4.19-1-pve: 4.4.19-66
lvm2: 2.02.116-pve3
corosync-pve: 2.4.0-1
libqb0: 1.0-1
pve-cluster: 4.0-46
qemu-server: 4.0-92
pve-firmware: 1.1-10
libpve-common-perl: 4.0-79
libpve-access-control: 4.0-19
libpve-storage-perl: 4.0-68
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-docs: 4.3-12
pve-qemu-kvm: 2.7.0-4
pve-container: 1.0-80
pve-firewall: 2.0-31
pve-ha-manager: 1.0-35
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 2.0.5-1
lxcfs: 2.0.4-pve2
criu: 1.6.0-1
novnc-pve: 0.5-8
smartmontools: 6.5+svn4324-1~pve80
zfsutils: 0.6.5.8-pve13~bpo80
openvswitch-switch: 2.5.0-1
ceph: 0.94.9-1~bpo80+1
Udo
 
I know this problem. I had the same in the past, i haven'd configured it out:
https://pve.proxmox.com/wiki/Hotplug_(qemu_disk,nic,cpu,memory)#cpu_.26.26_memory_hotplug
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash iommu=soft"

https://pve.proxmox.com/wiki/Hotplug_(qemu_disk,nic,cpu,memory)
do you have added the udev rules
/lib/udev/rules.d/80-hotplug-cpu-mem.rules
?
Hi fireon and spirit,
thanks for the info - no I hadn't read the wiki... and also not the udev-rule.
I asume it was plug and play ;-)

Will test today.

Udo
 
When memory hotplug is enabled, qemu have a small static memory (512M or 1G by socket if I remember), then the other is memory is virtuall dimm memory.

without the udev rule, the dimm memory is not actived at boot. (online=0 in kernel).
 
When memory hotplug is enabled, qemu have a small static memory (512M or 1G by socket if I remember), then the other is memory is virtuall dimm memory.

without the udev rule, the dimm memory is not actived at boot. (online=0 in kernel).
Do you have any information on this? I have a debian 12 (bookworm) VM that I enabled hotplug on and after doing so when I boot the VM with less than 1.5GB of memory it runs out of memory (OOM) before it fully boots. I think what you said might be the cause?