I created an openwrt LXC container and used three virtual interfaces and one pass-through network port, but when I stopped lxc and restarted it, it showed:
The following is the configuration of my lxc container:
Code:
()
explicitly configured lxc.apparmor.profile overrides the following settings: features:nesting
GUEST HOOK: 103 pre-start
103 is starting, doing preparations.
__netdev_configure_container_common: 1314 File exists - Failed to rename network device "phystAwjkt" to "enp4s0"
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 "103"
sync_wait: 34 An error occurred in another process (expected sequence number 3)
__lxc_start: 2114 Failed to spawn container "103"
TASK ERROR: startup for container '103' failed
Code:
arch: amd64
cores: 2
features: keyctl=1,mknod=1,nesting=1
hookscript: local:snippets/hookscript.pl
hostname:OpenWrt
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:79:4E:33,type=veth
net1: name=eth1,bridge=vmbr1,hwaddr=00:11:22:33:44:1B,type=veth
net2: name=eth2,bridge=vmbr2,hwaddr=00:11:22:33:44:2A,type=veth
onboot: 1
ostype: unmanaged
rootfs: local-lvm:vm-103-disk-0,size=5G
swap: 0
lxc.net.4.type:phys
lxc.net.4.link: enp4s0
lxc.net.4.flags: up
lxc.apparmor.profile: unconfined
lxc.include: /usr/share/lxc/config/openwrt.common.conf
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.mount.auto: proc:mixed sys:ro cgroup:mixed
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
lxc.mount.entry: /dev/ppp dev/ppp none bind,create=file