How to passthrough physical network net1 to lxc OpenWRT in PVE 8.1?

jazzi

New Member
Jan 14, 2024
2
1
3
Question: Pass through net1 to OpenWRT in LXC container.

Found a post which claimed after PVE 8.1, there is no need to bind and allow as before:

Starting with PVE 8.1, container device passthrough is supported. So you do not have to manually bind mount the device nodes into the containers and add allow rules for certain major and minor device numbers.
Instead you can just add the device to the container config like so:

Code:
pct set <container id> -dev<n> /dev/net/tun
n is just an arbitrary number from 0 to 255 to identify the device

According to Char's Arcade's blog post, the way to pass through net1 to lxc is as below:

# Passthrough the physical network card for container
lxc.net.1.type: phys
lxc.net.1.link: enp6s0
lxc.net.1.flags: up

The PVE I installed is 8.1, so what should I do now?

Thank you,
Jazzi
 

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!