PVE 4.4, incorrect swap in LXC containers

laughingchan

New Member
Aug 25, 2017
1
0
1
39
Hi,

I set the swap to 256MB in lxc, but the swap actual display is 32GB in container, same as the swap on the node.

how to fix it?

thanks
 
Keep in mind that containers aren't in fact virtualisation. If you run lsblk you'll see all block devices and mount will show that your root is mounted from somewhere else than an actual block device. Containers don't try to conceal the fact that the environment you're running is is a somewhat administrated one.
You can see that more swap than your allocated 256MB exist. You just can't use it.