The memory display queried within an LXC container created using the CT template is incorrect.

labulac

New Member
Dec 18, 2023
4
0
1
Hello, I am using version 8.1.3 of pve on an amd64 architecture. When I create an LXC container using a CT template and limit the CPU and memory size of the LXC container, I find that after starting the LXC container, the CPU display is correct, but the memory display still shows the host's memory and does not reflect the limited size. Please help me investigate this issue. Thank you!

1702875901583.png
 
That's really strange and I cannot reproduce it. What is the output of /proc/cmdlline? Did you stop and start the container in between (maybe the configuration is out of date)? Please try stopping and starting the container,
 
I think this is an Alpine-specific issue. I can reproduce on an Alpine container but not a Debian one. Alpine uses busybox "free" which seems to look in a different place for memory info than the standard one.
Thank you for your response. You are right. I created a new LXC container using the Debian template, and when I checked the memory size inside the container, it was indeed the limited size. It might be an issue specific to Alpine.
 
That's really strange and I cannot reproduce it. What is the output of /proc/cmdlline? Did you stop and start the container in between (maybe the configuration is out of date)? Please try stopping and starting the container,
Thank you for your response.
 

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!