Hello.
I'm using XCP-ng version 8.2.1 and I have hundreds VMs running CentOS 7. I'm planing to migrate the Operating System of the VMs to Rocky Linux 8, due to EOL of CentOS 7 in a few months. However I'm facing a prohibitive issue on Rocky Linux 8 (and 9) about available memory on VM.
To explain the issue, let's assume I need a VM with 8GB of RAM, but I need to be able increase this memory without having to shutdown the VM, so I'm setting 8GB of Dynamic and 16GB of Static memory. The problem is that on CentOS 7, it shows the Dynamic amount as the total memory (8GB), but on CentOS 8 (or Rocky 8, o Rocky 9), the operating system shows the Static memory as total memory. Then the OS "thinks" that it have 16GB of memory available, but it only 8GB, causing the MV to reboot when OS tried to allocate memory over 8GB.
You guys can reproduce the problem issuing the following command at the Rocky 8 prompt:
</dev/zero head -c 15000m | tail
When doing this on CentOS 7 and the system reaches the total available RAM (8GB), then kernel is going to kill this process due to out of memory (OOM). In other hand, doing the same test on Rocky 8, the VM is going to reboot.
Free memory on CentOS 7:
$ free -m
total used free shared buff/cache available
Mem: 7419 2059 3044 227 2315 4806
Swap: 2047 0 2047
Free memory on Rocky 8:
$ free -m
total used free shared buff/cache available
Mem: 15738 178 15427 8 132 15327
Swap: 2047 0 2047
Note that on CentOS7 it shows about 8GB total RAM, while on Rocky 8 it shows about 16GB total RAM. Both VMs has exact the same memory configuration:
16GB Static
8GB Dynamic
Also, both VMs are using the latest guest utilities installed from EPEL repo:
xe-guest-utilities-latest-7.30.0-2.el7.x86_64
(for CentOS 7) and xe-guest-utilities-latest-7.30.0-3.el8.x86_64
(for Rocky 8).
Now, my questions are:
- is it a XCP-ng bug? or
- is it a xe-guest-utilities bug? or
- is it a Rocky 8 (or 9) bug? or
- is there anything I can do to solve it??
Thanks a lot!
Ivan Apolonio