LXC configuration to attach SR-IOV NIC VF for networking

anime

New Member
Apr 2, 2024
12
1
3
Hi all,

Ran into this trouble assigning SR-IOV NIC VF to LXC with configuration below.

Configuration in LXC conf:

Code:
lxc.apparmor.profile: unconfined
lxc.net.1.type: phys
lxc.net.1.link: enp1s0f0v14
lxc.net.1.flags: up
lxc.net.1.ipv4.address: 192.168.10.65/24
lxc.net.1.ipv4.gateway: 192.168.10.1

When I launch LXC I get following error:

Code:
explicitly configured lxc.apparmor.profile overrides the following settings: features:nesting
__netdev_configure_container_common: 1314 File exists - Failed to rename network device "physugx4jw" to "enp1s0f0v14"
lxc_setup_network_in_child_namespaces: 4059 File exists - Failed to setup netdev
lxc_setup: 3892 Failed to setup network
do_start: 1273 Failed to setup container "114"
sync_wait: 34 An error occurred in another process (expected sequence number 3)
__lxc_start: 2114 Failed to spawn container "114"
TASK ERROR: startup for container '114' failed

What's interesting is that after this first failure, if I go ahead assign another VF (example, enp1s0f0v13) by updating the LXC conf above, the LXC starts and network is accessible in both direction (outside in, inside out). But if I go back to the original VF, it throws the same error.

Would very much appreciate if someone can shed some light how to get it right after the very first launch.

Thanks a lot!
 

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!