LXC trying to set swappiness , read only error?

deniax

New Member
Jan 23, 2023
15
0
1
Hi,

I restored Proxmox and some LXC containers and I try to alter the swappiness, but I cant.
I remember before the restore it worked, so pretty sure I'm missing something, but I cant figure out what

I tried:

1)
Code:
root@ibra:~# sysctl -w vm.swappiness=1
sysctl: setting key "vm.swappiness", ignoring: Read-only file system

2) Add vm.swappiness=1 to /etc/sysctl.conf , and then restart, but after reboot I still have:
Code:
root@ibra:~# cat /proc/sys/vm/swappiness
60

My LXC config file:
Code:
features: fuse=1,mount=cifs,nesting=1
hostname: ibra
memory: 41192
mp1: ssd:vm-102-disk-1,mp=/ssd,size=256G
net0: name=eth0,bridge=vmbr0,gw=10.1.1.1,hwaddr=3A:1C:8C:4A:3D:3A,ip=10.1.1.4/24,type>
onboot: 1
ostype: ubuntu
rootfs: ssd:vm-102-disk-0,size=50G
startup: order=3,up=1
swap: 1812
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
 

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!