Swap Not Showing in Containers After Storage Rework on Proxmox

afzaal

New Member
Jul 31, 2024
3
0
1
Hello everyone,

I am currently using Proxmox, and I have encountered an issue with swap space not appearing in my containers after performing some rework on storage disks for redundancy. This issue persists even though the containers were recreated post-activity. The Proxmox OS itself has not been altered.

Details:

  • Proxmox Configuration:
    • Full Proxmox cluster with 8 physical nodes.
    • Containers were recreated after the storage rework.
  • Proxmox Version:
    pveversion
    pve-manager/6.4-4/337d6701 (running kernel: 5.4.106-1-pve)

  • Container OS Information:
    cat /etc/os-release
    VERSION="10 (buster)"
Issue:
  • Swap space is not showing in the containers.
  • No exceptions or errors are appearing in syslog or messages.
Outputs:
  • Physical Node:
    free -mh
    total used free shared buff/cache available
    Mem: 125Gi 10Gi 91Gi 221Mi 23Gi 113Gi
    Swap: 26Gi 0B 26Gi

  • Container:
    free -mh
    total used free shared buff/cache available
    Mem: 20Gi 41Mi 19Gi 7.0Mi 58Mi 19Gi
    Swap: 0B 0B 0B
Steps Taken:
  1. Recreated all containers post-storage rework.
  2. Checked syslog and messages for any errors or exceptions (none found).
  3. Deleted and re created swap on physical.
Request for Help:

We need to power up our production environment as soon as possible, so we require urgent support in this matter. If anyone can provide assistance, it would be greatly appreciated.

Could someone guide me on how to enable swap space in containers on Proxmox? Any suggestions or steps to troubleshoot this issue would be greatly appreciated.

Thank you in advance!
 
Last edited:
Please show the container configuration file for people to check. I think I remember Proxmox 7 changing to cgroup2 and swap being handles differently in containers. Maybe you can locate the threads about that on this forum? Proxmox 6.4 has been out of support almost two years.
 
@leesteken thanks, i know it was old version but same version i am using in other environment where it is working fine so i am curious about it what is wrong here.

Container configuration file below (just hiding ip adresses in it):
arch: amd64
cores: 8
features: nesting=1
hostname: cbe1-ogn
memory: 20480
mp0: STORAGE:vm-102-disk-1,mp=/opt,size=85G
net0: name=eth0,bridge=vmbr0,gw=*.*.*.*,hwaddr=3A:63:71:00:07:BF,ip=*.*.*.*/25,type=veth
onboot: 1
ostype: debian
rootfs: STORAGE:vm-102-disk-0,size=30G
swap: 2048

Pveversion:
proxmox-ve: 6.3-1 (running kernel: 5.4.106-1-pve)
pve-manager: 6.4-4 (running version: 6.4-4/337d6701)
pve-kernel-5.4: 6.4-1
pve-kernel-helper: 6.4-1
pve-kernel-5.4.106-1-pve: 5.4.106-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.1.2-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.20-pve1
libproxmox-acme-perl: 1.0.8
libproxmox-backup-qemu0: 1.0.3-1
libpve-access-control: 6.4-1
libpve-apiclient-perl: 3.1-3
libpve-common-perl: 6.4-2
libpve-guest-common-perl: 3.1-5
libpve-http-server-perl: 3.2-1
libpve-storage-perl: 6.4-1
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.6-2
lxcfs: not correctly installed
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.1.5-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.5-3
pve-cluster: 6.4-1
pve-container: 3.3-5
pve-docs: 6.4-1
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-3
pve-firmware: 3.2-2
pve-ha-manager: 3.1-1
pve-i18n: 2.3-1
pve-qemu-kvm: 5.2.0-6
pve-xtermjs: 4.7.0-3
qemu-server: 6.4-1
smartmontools: 7.2-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 2.0.4-pve1
 

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!