lxc 컨테이너 내부의 udev

lxc 컨테이너 내부의 udev

저는 Proxmox에서 권한 있는 Debian LXC 컨테이너를 실행하고 그 안에서 Docker를 실행하고 있습니다. Sunshine을 사용하여 Docker 컨테이너에서 Xserver를 실행하여 Moonlight 클라이언트로 스트리밍하려고 합니다. 이를 위해 "Whale Game"이라는 프로젝트를 사용하고 있습니다. Sunshine은 시작 및 클라이언트 연결 중에 일부 입력 장치를 동적으로 생성합니다.

다음은 lxc conf의 관련 라인입니다:

features: nesting=1
lxc.mount.entry: /run/udev var/udev none bind,optional,create=dir
lxc.mount.entry: /dev/uinput dev/uinput none bind,optional,create=file
lxc.mount.entry: /dev/input dev/input none bind,optional,create=dir
lxc.cgroup2.devices.allow: c 10:* rwm
lxc.cgroup2.devices.allow: c 13:* rwm

컨테이너에 심볼릭 링크를 만든 다음 이를 Docker 컨테이너에 마운트했습니다 /var/udev. /run/udevXorg는 모든 입력 장치를 인식하지만 Sunshine에서 만든 장치는 인식하지 못합니다. evtest장치가 작동하는 모습을 볼 수 있고, 장치를 사용할 때 입력도 볼 수 있습니다. 문제는 udev이벤트가 LXC 경계를 넘으므로(내 생각에는?) Xorg가 새 장치를 추가하지 않는다는 것입니다.

내 Proxmox 호스트의 udevadm 모니터 출력은 다음과 같습니다.

❯ udevadm monitor -s input
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[124160.238916] remove   /devices/virtual/input/input160/mouse7 (input)
UDEV  [124160.258704] remove   /devices/virtual/input/input160/mouse7 (input)
KERNEL[124160.264249] remove   /devices/virtual/input/input160/event23 (input)
UDEV  [124160.265212] remove   /devices/virtual/input/input160/event23 (input)
KERNEL[124160.284184] remove   /devices/virtual/input/input160 (input)
UDEV  [124160.284846] remove   /devices/virtual/input/input160 (input)
KERNEL[124160.340229] remove   /devices/virtual/input/input161/event24 (input)
UDEV  [124160.340751] remove   /devices/virtual/input/input161/event24 (input)
KERNEL[124160.356212] remove   /devices/virtual/input/input161 (input)
KERNEL[124160.356378] remove   /devices/virtual/input/input159/mouse6 (input)
UDEV  [124160.356729] remove   /devices/virtual/input/input161 (input)
UDEV  [124160.358682] remove   /devices/virtual/input/input159/mouse6 (input)
KERNEL[124160.376267] remove   /devices/virtual/input/input159/event22 (input)
UDEV  [124160.376817] remove   /devices/virtual/input/input159/event22 (input)
KERNEL[124160.400155] remove   /devices/virtual/input/input159 (input)
UDEV  [124160.400604] remove   /devices/virtual/input/input159 (input)
KERNEL[124163.533210] add      /devices/virtual/input/input162 (input)
KERNEL[124163.533254] add      /devices/virtual/input/input162/mouse6 (input)
KERNEL[124163.533320] add      /devices/virtual/input/input162/event22 (input)
KERNEL[124163.533592] add      /devices/virtual/input/input163 (input)
KERNEL[124163.533623] add      /devices/virtual/input/input163/mouse7 (input)
KERNEL[124163.533675] add      /devices/virtual/input/input163/event23 (input)
KERNEL[124163.534019] add      /devices/virtual/input/input164 (input)
KERNEL[124163.534048] add      /devices/virtual/input/input164/event24 (input)
UDEV  [124163.558279] add      /devices/virtual/input/input162 (input)
UDEV  [124163.559783] add      /devices/virtual/input/input162/mouse6 (input)
UDEV  [124163.560873] add      /devices/virtual/input/input164 (input)
UDEV  [124163.560960] add      /devices/virtual/input/input163 (input)
UDEV  [124163.562461] add      /devices/virtual/input/input163/mouse7 (input)
UDEV  [124163.628764] add      /devices/virtual/input/input163/event23 (input)
UDEV  [124163.636735] add      /devices/virtual/input/input164/event24 (input)
UDEV  [124163.636769] add      /devices/virtual/input/input162/event22 (input)

이것은 LXC 컨테이너에 있습니다.

❯ udevadm monitor -s input
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[124160.238840] remove   /devices/virtual/input/input160/mouse7 (input)
KERNEL[124160.264292] remove   /devices/virtual/input/input160/event23 (input)
KERNEL[124160.284242] remove   /devices/virtual/input/input160 (input)
KERNEL[124160.340233] remove   /devices/virtual/input/input161/event24 (input)
KERNEL[124160.356212] remove   /devices/virtual/input/input161 (input)
KERNEL[124160.356397] remove   /devices/virtual/input/input159/mouse6 (input)
KERNEL[124160.376315] remove   /devices/virtual/input/input159/event22 (input)
KERNEL[124160.400172] remove   /devices/virtual/input/input159 (input)
KERNEL[124163.533247] add      /devices/virtual/input/input162 (input)
KERNEL[124163.533283] add      /devices/virtual/input/input162/mouse6 (input)
KERNEL[124163.533371] add      /devices/virtual/input/input162/event22 (input)
KERNEL[124163.533590] add      /devices/virtual/input/input163 (input)
KERNEL[124163.533623] add      /devices/virtual/input/input163/mouse7 (input)
KERNEL[124163.533682] add      /devices/virtual/input/input163/event23 (input)
KERNEL[124163.534049] add      /devices/virtual/input/input164 (input)
KERNEL[124163.534106] add      /devices/virtual/input/input164/event24 (input)

udev컨테이너 내부에서 작동 하도록 할 수 있는 방법이 있나요 ? Xorg에서 Sunshine의 동적 입력 장치를 사용하는 다른 방법을 찾아야 합니까?

관련 정보