problem with hotplug and 64GB ram

We are seeing exactly the same issue
TASK ERROR: memory size (65536) must be aligned to 2048 for hotplugging
 
Hi!

The problem is still there in Proxmox 7.2-11
If the memory hotplug is activated, I get a kernel panic after a reboot.
The problem does not occur with Ubuntu VM, only with Almalinux and Rockylinux.
I tried several kernel versions, but there was a kernel panic with all of them.

I also often encounter such errors:
TASK ERROR: memory size (65536) must be aligned to 2048 for hotplugging

Thanks!
 

Attachments

  • Bildschirmfoto_2022-09-22_10-47-27.png
    Bildschirmfoto_2022-09-22_10-47-27.png
    53.5 KB · Views: 13
  • Bildschirmfoto_2022-09-21_14-30-41.png
    Bildschirmfoto_2022-09-21_14-30-41.png
    221.9 KB · Views: 13
Last edited:
hi, i am having problems with some test vm with 64GB Ram and hotplug (no probs with 32GB and until 45056 MiB).
simply the vm refuse to start with the error :

TASK ERROR: memory size (65536) must be aligned to 2048 for hotplugging

there are no other vm on the proxmox
free -m total used free shared buff/cache available Mem: 515644 4616 510466 80 561 509192 Swap: 16383 0 16383



proxmox updated to:
proxmox-ve: 6.2-1 (running kernel: 5.4.44-2-pve)
pve-manager: 6.2-10 (running version: 6.2-10/a20769ed)
....

there are some restriction to use memory hotplug and vm with a lot of ram?
DOS ALTERNATIVAS:
A-> En modulo de administracion web de la maquina virtual --> Options --> Hotplug-->edit--> ("Deshabilita todo") ----> start

B-> En modulo de administracion web de la maquina virtual --> Hardware--> Memory-->edit--> ("Quitar opcion balloon device") ----> start

Despues del correcto arranque de la maquina virtual , procedemos apagar la maquina virtual y nuevamente podriamos configurar las opciones deshabilitadas.

ruta de la configuracion de la MV -------> /etc/pve/qemu-server/"id maquina.conf"
 
Last edited:
ALTERNATIVAS:
A-> En modulo de administracion web de la maquina virtual --> Options --> Hotplug-->edit--> ("Deshabilita todo") ----> start

B-> En modulo de administracion web de la maquina virtual --> Hardware--> Memory-->edit--> ("Quitar opcion balloon device") ----> start

Despues del correcto arranque de la maquina virtual , procedemos apagar la maquina virtual y nuevamente podriamos configurar las opciones deshabilitadas.

ruta de la configuracion de la MV -------> /etc/pve/qemu-server/"id maquina.conf"
 
En realidad estoy usando 4098 MB y no 4096, error al calcular. jeje
View attachment 29224
Y en la máquina física hay 80 vcore y 256 GB de RAM que solo uso el 5% de la potencia computacional.
ALTERNATIVAS:
A-> En modulo de administracion web de la maquina virtual --> Options --> Hotplug-->edit--> ("Deshabilita todo") ----> start

B-> En modulo de administracion web de la maquina virtual --> Hardware--> Memory-->edit--> ("Quitar opcion balloon device") ----> start

Despues del correcto arranque de la maquina virtual , procedemos apagar la maquina virtual y nuevamente podriamos configurar las opciones deshabilitadas.

ruta de la configuracion de la MV -------> /etc/pve/qemu-server/"id maquina.conf"
ALTERNATIVAS:
A-> En modulo de administracion web de la maquina virtual --> Options --> Hotplug-->edit--> ("Deshabilita todo") ----> start

B-> En modulo de administracion web de la maquina virtual --> Hardware--> Memory-->edit--> ("Quitar opcion balloon device") ----> start

Despues del correcto arranque de la maquina virtual , procedemos apagar la maquina virtual y nuevamente podriamos configurar las opciones deshabilitadas.

ruta de la configuracion de la MV -------> /etc/pve/qemu-server/"id maquina.conf"
 
En realidad estoy usando 4098 MB y no 4096, error al calcular. jeje
View attachment 29224
Y en la máquina física hay 80 vcore y 256 GB de RAM que solo uso el 5% de la potencia computacional.
ALTERNATIVAS:
A-> En modulo de administracion web de la maquina virtual --> Options --> Hotplug-->edit--> ("Deshabilita todo") ----> start

B-> En modulo de administracion web de la maquina virtual --> Hardware--> Memory-->edit--> ("Quitar opcion balloon device") ----> start

Despues del correcto arranque de la maquina virtual , procedemos apagar la maquina virtual y nuevamente podriamos configurar las opciones deshabilitadas.

ruta de la configuracion de la MV -------> /etc/pve/qemu-server/"id maquina.conf"
hola, estoy teniendo problemas con algunas máquinas virtuales de prueba con 64 GB de RAM y hotplug (sin problemas con 32 GB y hasta 45056 MiB).
simplemente el vm se niega a comenzar con el error:

ERROR DE TAREA: el tamaño de la memoria (65536) debe estar alineado con 2048 para la conexión en caliente

no hay otra máquina virtual en el proxmox
libre -m caché/búfer compartido gratuito total utilizado disponible Mem: 515644 4616 510466 80 561 509192 Intercambio: 16383 0 16383



proxmox actualizado a:
proxmox-ve: 6.2-1 (núcleo en ejecución: 5.4.44-2-pve)
pve-manager: 6.2-10 (versión en ejecución: 6.2-10/a20769ed)
....

¿Hay alguna restricción para usar memoria hotplug y vm con mucha ram?
ALTERNATIVAS:
A-> En modulo de administracion web de la maquina virtual --> Options --> Hotplug-->edit--> ("Deshabilita todo") ----> start

B-> En modulo de administracion web de la maquina virtual --> Hardware--> Memory-->edit--> ("Quitar opcion balloon device") ----> start

Despues del correcto arranque de la maquina virtual , procedemos apagar la maquina virtual y nuevamente podriamos configurar las opciones deshabilitadas.

ruta de la configuracion de la MV -------> /etc/pve/qemu-server/"id maquina.conf"
 
Hi,

we are currently working to improve memory hotplug, where you'll be able to define maxmemory and also virtio-mem support.

I think it should solve all yours problem.

It should be available in coming weeks.

Hello!

Maybe any news about this?
 
Hello!

We upgrade PVE version to 7.4-3. And when we assign 60 GB RAM get error:

Code:
generating cloud-init ISO
TASK ERROR: memory size (61440) must be aligned to 2048 for hotplugging
 
Hello!

Thank you, we do it and get this:

Code:
generating cloud-init ISO
kvm: -device pc-dimm,id=dimm62,memdev=mem-dimm62,node=0: a used vhost backend has no free memory slots left
TASK ERROR: start failed: QEMU exited with code 1

Can you say it's critical problem? Maybe we simple turn of memory from HotPlug menu and use VM? Hm?
 
Can you say it's critical problem? Maybe we simple turn of memory from HotPlug menu and use VM? Hm?
Is this problem critical in any case? Can we just remove the memory from the hotplug and create a VM?
I don't understand the question, sorry. For me, the problem is not critical because it's your problem. Maybe memory hotplug is critical for your use case? Only you can decide.
 
  • Like
Reactions: Orkhan
try to add

/etc/modprobe.d/vhost.conf
options vhost max_mem_regions=509

The main problem is that kvm have changed number of memory devices some year ago (to 64 if I remember).

and proxmox try to allocate with 256 dimm, up to 4TB, with an incremental dimm size (8 small dimm of 512M, then 8 small dimm of 1024M, then 8 dimm of 2048....).

this kvm option increase number of max dimm. (it's not enabled by default, because it can increase a little bit the latency)


A fix is coming soon, with a new maxmemory option and a fixed computed dimm size. (max=64GB , 64 dimm of 1G , max=128GB 64 dimm of 2G, ....)
 
Third post in this thread had *working solution* (for me):

https://forum.proxmox.com/threads/problem-with-hotplug-and-64gb-ram.73621/#post-329329

and later it was repeated

https://forum.proxmox.com/threads/problem-with-hotplug-and-64gb-ram.73621/page-2#post-544025

so

Bash:
# cat /etc/modprobe.d/modprobe.conf
options vhost max_mem_regions=512

(default is 64)

and reboot. Then just set 65536 for ram (wanted 64GB) or whatever else value you want.

The error message is misleading. Actual code checks more that simple alignment:

/usr/share/perl5/PVE/QemuServer/Memory.pm

Perl:
foreach_dimm($conf, $vmid, $memory, $sockets, sub {
            my ($conf, $vmid, $name, $dimm_size, $numanode, $current_size, $memory) = @_;

            my $mem_object = print_mem_object($conf, "mem-$name", $dimm_size);

            push @$cmd, "-object" , $mem_object;
            push @$cmd, "-device", "pc-dimm,id=$name,memdev=mem-$name,node=$numanode";

            die "memory size ($memory) must be aligned to $dimm_size for hotplugging\n"
                if $current_size > $memory;
        });


and for me current_size was end up being 66560
 

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!