From f4740916f570e2ef425bcd6e014adc48a8644a8d Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 28 Mar 2026 12:49:52 +0100 Subject: [PATCH] Update install_coral_lxc.sh --- scripts/gpu_tpu/install_coral_lxc.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/gpu_tpu/install_coral_lxc.sh b/scripts/gpu_tpu/install_coral_lxc.sh index 3e9c55c2..11f52ffd 100644 --- a/scripts/gpu_tpu/install_coral_lxc.sh +++ b/scripts/gpu_tpu/install_coral_lxc.sh @@ -7,8 +7,8 @@ # Revision : @Blaspt (USB passthrough via udev rule with persistent /dev/coral) # Copyright : (c) 2024 MacRimi # License : (GPL-3.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE) -# Version : 1.2 -# Last Updated: 20/01/2025 +# Version : 1.3 +# Last Updated: 28/03/2025 # ========================================================== # Description: # This script automates the configuration and installation of @@ -21,6 +21,12 @@ # Supports Coral USB and Coral M.2 (PCIe) devices. # Includes USB passthrough enhancement using persistent udev alias (/dev/coral). # +# Changelog v1.3: +# - Fixed Coral USB passthrough: mount /dev/bus/usb instead of /dev/coral symlink +# The udev symlink /dev/coral is not passthrough-safe in LXC; mounting the full +# USB bus tree ensures the real device node is accessible inside the container +# regardless of which port the Coral USB is connected to. +# # Changelog v1.2: # - Fixed symlink detection for /dev/coral (create=dir for symlinks) # - Fixed /dev/apex_0 not being mounted in PVE 9 (device existence not required) @@ -250,8 +256,13 @@ configure_lxc_hardware() { if ! grep -Pq "^lxc.cgroup2.devices.allow: c 189:\\\* rwm" "$CONFIG_FILE"; then echo "lxc.cgroup2.devices.allow: c 189:* rwm # Coral USB" >> "$CONFIG_FILE" fi - - add_mount_if_needed "/dev/coral" "dev/coral" "$CONFIG_FILE" + + # FIX v1.3: Mount /dev/bus/usb instead of the /dev/coral symlink. + # The udev symlink /dev/coral cannot be safely passed through to LXC because + # it points to a dynamic path (e.g. /dev/bus/usb/001/005) that changes on + # reconnect. Mounting the full USB bus tree makes the real device node + # available inside the container regardless of port or reconnection. + add_mount_if_needed "/dev/bus/usb" "dev/bus/usb" "$CONFIG_FILE" if [ -L "/dev/coral" ]; then msg_ok "$(translate 'Coral USB configuration added - device detected')"