Memory hotplug problem in Proxmox

Edit: Oh, I’m in idiot. Proxmox clearly state that this doesn’t work in Ubuntu out of the box:

For Linux memory unplug, you need to have movable zone enabled, in the kernel config (not enabled by default on Debian/Ubuntu):

CONFIG_MOVABLE_NODE=YES

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

Original post

Tried to reduce the memory used by a VM on ProxMox:

Parameter verification failed. (400)

memory: hotplug problem – 400 Parameter verification failed. dimm4: error unplug memory module

And in the syslog:


Jun 19 01:15:46 samba01 kernel: [6657625.965645] Offlined Pages 32768
Jun 19 01:15:46 samba01 kernel: [6657625.975153] Offlined Pages 32768
Jun 19 01:15:46 samba01 kernel: [6657625.977703] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:46 samba01 kernel: [6657625.977707] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:46 samba01 kernel: [6657625.977711] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:46 samba01 kernel: [6657625.977713] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:46 samba01 kernel: [6657625.977714] page dumped because: unmovable page
Jun 19 01:15:46 samba01 kernel: [6657625.982024] Offlined Pages 32768
Jun 19 01:15:46 samba01 kernel: [6657625.984611] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:46 samba01 kernel: [6657625.984615] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:46 samba01 kernel: [6657625.984619] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:46 samba01 kernel: [6657625.984622] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:46 samba01 kernel: [6657625.984623] page dumped because: unmovable page
Jun 19 01:15:46 samba01 kernel: [6657625.984647] memory memory50: Offline failed.
Jun 19 01:15:49 samba01 kernel: [6657628.969161] Offlined Pages 32768
Jun 19 01:15:49 samba01 kernel: [6657628.975996] Offlined Pages 32768
Jun 19 01:15:49 samba01 kernel: [6657628.977797] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:49 samba01 kernel: [6657628.977801] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:49 samba01 kernel: [6657628.977806] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:49 samba01 kernel: [6657628.977808] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:49 samba01 kernel: [6657628.977809] page dumped because: unmovable page
Jun 19 01:15:50 samba01 kernel: [6657628.982276] Offlined Pages 32768
Jun 19 01:15:50 samba01 kernel: [6657628.982783] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:50 samba01 kernel: [6657628.982786] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:50 samba01 kernel: [6657628.982790] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:50 samba01 kernel: [6657628.982792] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:50 samba01 kernel: [6657628.982793] page dumped because: unmovable page
Jun 19 01:15:50 samba01 kernel: [6657628.982815] memory memory50: Offline failed.
Jun 19 01:15:52 samba01 kernel: [6657631.979709] Offlined Pages 32768
Jun 19 01:15:53 samba01 kernel: [6657631.987515] Offlined Pages 32768
Jun 19 01:15:53 samba01 kernel: [6657631.987911] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:53 samba01 kernel: [6657631.987962] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:53 samba01 kernel: [6657631.987968] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:53 samba01 kernel: [6657631.987970] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:53 samba01 kernel: [6657631.987971] page dumped because: unmovable page
Jun 19 01:15:53 samba01 kernel: [6657631.991985] Offlined Pages 32768
Jun 19 01:15:53 samba01 kernel: [6657631.993757] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:53 samba01 kernel: [6657631.993761] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:53 samba01 kernel: [6657631.993765] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:53 samba01 kernel: [6657631.993768] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:53 samba01 kernel: [6657631.993769] page dumped because: unmovable page
Jun 19 01:15:53 samba01 kernel: [6657631.993792] memory memory50: Offline failed.
Jun 19 01:15:56 samba01 kernel: [6657634.990796] Offlined Pages 32768
Jun 19 01:15:56 samba01 kernel: [6657634.998121] Offlined Pages 32768
Jun 19 01:15:56 samba01 kernel: [6657634.998571] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:56 samba01 kernel: [6657634.998574] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:56 samba01 kernel: [6657634.998578] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:56 samba01 kernel: [6657634.998580] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:56 samba01 kernel: [6657634.998581] page dumped because: unmovable page
Jun 19 01:15:56 samba01 kernel: [6657635.002457] Offlined Pages 32768
Jun 19 01:15:56 samba01 kernel: [6657635.003626] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:56 samba01 kernel: [6657635.003631] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:56 samba01 kernel: [6657635.003635] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:56 samba01 kernel: [6657635.003637] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:56 samba01 kernel: [6657635.003638] page dumped because: unmovable page
Jun 19 01:15:56 samba01 kernel: [6657635.003661] memory memory50: Offline failed.
Jun 19 01:15:59 samba01 kernel: [6657637.999099] Offlined Pages 32768
Jun 19 01:15:59 samba01 kernel: [6657638.007138] Offlined Pages 32768
Jun 19 01:15:59 samba01 kernel: [6657638.007587] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:59 samba01 kernel: [6657638.007590] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:59 samba01 kernel: [6657638.007594] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:59 samba01 kernel: [6657638.007597] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:59 samba01 kernel: [6657638.007598] page dumped because: unmovable page
Jun 19 01:15:59 samba01 kernel: [6657638.012491] Offlined Pages 32768
Jun 19 01:15:59 samba01 kernel: [6657638.013243] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:15:59 samba01 kernel: [6657638.013246] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:15:59 samba01 kernel: [6657638.013254] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:15:59 samba01 kernel: [6657638.013256] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:15:59 samba01 kernel: [6657638.013257] page dumped because: unmovable page
Jun 19 01:15:59 samba01 kernel: [6657638.013291] memory memory50: Offline failed.
Jun 19 01:16:02 samba01 kernel: [6657641.011053] Offlined Pages 32768
Jun 19 01:16:02 samba01 kernel: [6657641.015726] Offlined Pages 32768
Jun 19 01:16:02 samba01 kernel: [6657641.016167] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:16:02 samba01 kernel: [6657641.016170] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:16:02 samba01 kernel: [6657641.016175] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:16:02 samba01 kernel: [6657641.016177] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:16:02 samba01 kernel: [6657641.016178] page dumped because: unmovable page
Jun 19 01:16:02 samba01 kernel: [6657641.020044] Offlined Pages 32768
Jun 19 01:16:02 samba01 kernel: [6657641.020495] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:16:02 samba01 kernel: [6657641.020499] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:16:02 samba01 kernel: [6657641.020503] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:16:02 samba01 kernel: [6657641.020505] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:16:02 samba01 kernel: [6657641.020506] page dumped because: unmovable page
Jun 19 01:16:02 samba01 kernel: [6657641.020529] memory memory50: Offline failed.
Jun 19 01:16:05 samba01 kernel: [6657644.027669] Offlined Pages 32768
Jun 19 01:16:05 samba01 kernel: [6657644.032558] Offlined Pages 32768
Jun 19 01:16:05 samba01 kernel: [6657644.033056] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:16:05 samba01 kernel: [6657644.033059] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:16:05 samba01 kernel: [6657644.033063] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:16:05 samba01 kernel: [6657644.033120] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:16:05 samba01 kernel: [6657644.033123] page dumped because: unmovable page
Jun 19 01:16:05 samba01 kernel: [6657644.037184] Offlined Pages 32768
Jun 19 01:16:05 samba01 kernel: [6657644.037639] page:ffffef54c64a1000 refcount:1 mapcount:0 mapping:ffff8c6fb1f8b880 index:0x0 compound_mapcount: 0
Jun 19 01:16:05 samba01 kernel: [6657644.037642] flags: 0x17ffffc0010200(slab|head)
Jun 19 01:16:05 samba01 kernel: [6657644.037647] raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff8c6fb1f8b880
Jun 19 01:16:05 samba01 kernel: [6657644.037649] raw: 0000000000000000 00000000001d001d 00000001ffffffff 0000000000000000
Jun 19 01:16:05 samba01 kernel: [6657644.037650] page dumped because: unmovable page
Jun 19 01:16:05 samba01 kernel: [6657644.037673] memory memory50: Offline failed.

Tried to offline memory-chunks manually:

root@samba01:~# cat /sys/devices/system/memory/memory50/removable
1
root@samba01:~# echo offline > /sys/devices/system/memory/memory50/state
-bash: echo: write error: Device or resource busy
root@samba01:~# echo offline > /sys/devices/system/memory/memory50/state
-bash: echo: write error: Device or resource busy

Tried to force memory compaction:

root@samba01:~# echo 1 > /proc/sys/vm/compact_memory

But no. In the end I had to shut down the VM and restart it to make enforce the new memory limit. Not a big deal really but interesting. Just one more example of why we should set things up in such a way as to tolerate reboots. In this particular case it was my local network file share which is just fine to have down for two minutes but I do also have a read-only backup to take over when the primary is down.