vpncloud
vpncloud copied to clipboard
Documentation for LXC containers post-install or post-configuration about additional requirements? (Proxmox Example)
When setting up within a LXC container, such as with proxmox, the service will fail to start due to missing the tun interface,
I propose that after install, or after configuration, either add a general note to the user, or, use systemd-detect-virt to check if the user is within a container environment and then provide the appropriate instructions.
For example, I use proxmox, and the LXC container information is stored as such: /etc/pve/lxc/
ERROR - Failed to open virtual tap interface vpncloud%d: No such device (os error 19)
This can be solved by appending the following lines to the LXC container's configuration
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.cgroup2.devices.allow: c 10:200 rwm
Here's a single command to paste in the proxmox host:
id=123
tee -a "/etc/pve/lxc/$id.conf" << EOF
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.cgroup2.devices.allow: c 10:200 rwm
EOF
pct reboot "$id"
pct enter "$id"