[SOLVED] CT is assigned swap space but appears to have none.

rcd

Active Member
Jul 12, 2019
245
23
38
62
Proxmox 6.4 host with ZFS. Created LXC container with 1 GB RAM and 1 GB swap. From Proxmox everything seems fine, but in the container there is just the RAM, no sign of swap.

I think there is something about ZFS not using swap, but then why does the GUI allow me to assign it?
What is the proper way to assign swap to this container?
 
hi,

is swapping enabled on the host? check with swapon -s on your PVE server.

also please post the container configuration (pct config CTID)
 
swapon -s on the host reports nothing.

Code:
# pct config <redacted>
arch: amd64
cores: 2
description: <redacted>
features: fuse=1,nesting=1
hostname: host1
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=<redacted>,hwaddr=<redacted>,ip=<redacted>/32,type=veth
onboot: 1
ostype: debian
rootfs: vmdata:subvol-3706-disk-0,size=80G
swap: 2048
unprivileged: 1
 
Last edited:
swapon -s on the host reports nothing.
okay, without swap on your host you won't be able to have swap in the container.

to have swap with a ZFS root, you'll need to create a new partition and enable swap on that. afterwards add that partition inside /etc/fstab to make it come up on boot.
 

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!