Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for LXC containers post-install or post-configuration about additional requirements? (Proxmox Example) #306

Open
Lyamc opened this issue Jun 11, 2022 · 0 comments

Comments

@Lyamc
Copy link

Lyamc commented Jun 11, 2022

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/.conf
After install, I was unable to start the service:

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant