harvie

Well-Known Member
Apr 5, 2017
138
23
58
35
Hello, i've added these settings to CT config:

lxc.cgroup.devices.allow: c 10:200 rwm
lxc.hook.autodev: sh -c "modprobe tun; cd ${LXC_ROOTFS_MOUNT}/dev; mkdir net; mknod net/tun c 10 200; chmod 0666 net/tun"


now when i do pct shutdown <ctid>; pct start <ctid> then tun driver (and openvpn) starts working immediately. But i have some CTs that cannot be restarted because of availability reasons. i understand that i can do pct enter and execute all the commands from lxc.hook.autodev line manualy. But how do i make pve reload lxc.cgroup.devices.allow without container restart? is there something like pct reload <vmid> which would cause these settings to apply without restarting container?
 
Last edited:
what version of pve do you use? (pveversion -v)
afaics there is no 'pct restart' ?

edit: misread the bit about reload
 
what version of pve do you use? (pveversion -v)
afaics there is no 'pct restart' ?

Virtual Environment 4.4-18/ef2610e8
Sorry, i was actually doing shutdown followed by start. not sure why there's no restart. However that's not point. I am wondering how to give device permissions to container without restarting it (= having to shut down and restart all processes runing in that ct).
 
you need to do that manually using the cgroups sys interface from the hypervisor.
 

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!