Hello,
I have a host running Ubuntu 22.04LTS and I am running an LXC container, also utilizing the Ubuntu 22.04 image.
I am trying to make use of a USB wireless adapter within a LXC container. I have added the following in the LXC container profile:
wlx00ef44fc4085:
name: wlx00ef44fc4085
nictype: physical
parent: wlx00ef44fc4085
type: nic
This allows that USB wireless adapter to be recognized within the LXC container via " ip link " / " ip address " output.
Within the LXC container (a Ubuntu 22.04 image), I am using Netplan to connect the USB wireless adapter to an access-point. Here is the snippet of the netplan file:
network:
renderer: NetworkManager
version: 2
wifis:
wlx00ef44fc4085:
dhcp4: true
optional: true
access-points:
“MYSSID”:
password: “MYPASSWORD”
When I apply the netplan config within the container (netplan apply), I am given this output:
root@test:~# netplan apply
wlx00ef44fc4085: Failed to write ‘change’ to ‘/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/net/wlx00ef44fc4085/uevent’: Read-only file system
Traceback (most recent call last):
File “/usr/sbin/netplan”, line 23, in
netplan.main()
File “/usr/share/netplan/netplan/cli/core.py”, line 50, in main
self.run_command()
File “/usr/share/netplan/netplan/cli/utils.py”, line 231, in run_command
self.func()
File “/usr/share/netplan/netplan/cli/commands/apply.py”, line 61, in run
self.run_command()
File “/usr/share/netplan/netplan/cli/utils.py”, line 231, in run_command
self.func()
File “/usr/share/netplan/netplan/cli/commands/apply.py”, line 253, in command_apply
subprocess.check_call([‘udevadm’, ‘trigger’, ‘–attr-match=subsystem=net’])
File “/usr/lib/python3.10/subprocess.py”, line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘udevadm’, ‘trigger’, ‘–attr-match=subsystem=net’]’ returned non-zero exit status 1.
root@test:~#
I am stuck here. I have tried to Google around for solutions but I am coming up short. I have attempted to change this container in a privilege container, as well as set the apparmor.profile to unconfined. I have tried LXD 5.0LTS and the latest (5.19) … all scenarios provide the same outcome.
Any hints at this point?
Again, goal is for the container to entirely utilize/manage/control the USB wireless adapter.