how to fix permission when passthrough an android device to unpriviliged lxc under pve
To fix permission issues when passing through an Android device to an unprivileged LXC container under Proxmox Virtual Environment (PVE), you can follow these steps:
-
Check the Android device permissions: Connect the Android device to the Proxmox host and run the following command to identify the device's vendor and product IDs:
lsusb -
Create a new udev rule: Create a new udev rule to grant access to the Android device. Run the following command to create a new rule file:
sudo nano /etc/udev/rules.d/99-android.rules -
Add the udev rule: In the opened file, add a new line with the following content:
SUBSYSTEM=="usb", ATTR{idVendor}=="<vendor_ID>", ATTR{idProduct}=="<product_ID>", MODE="0666"Replace
<vendor_ID>and<product_ID>with the appropriate values obtained from thelsusbcommand. -
Save and exit the file: Press Ctrl+X, followed by Y, and then Enter to save and exit the nano editor.
-
Reload udev rules: Run the following command to reload the udev rules:
sudo udevadm control --reload-rules -
Restart the udev service: Run the following command to restart the udev service:
sudo service udev restart -
Verify the device permissions: Run the
lsusbcommand again to check if the permissions have been applied correctly. The device should now have the permissions set to0666. -
Pass the Android device to the LXC container: In the PVE web interface, navigate to the LXC container's configuration and add a USB device by specifying the vendor and product IDs obtained in step 1.
-
Start the LXC container: Start the LXC container to apply the changes and access the Android device from within the container.
By following these steps, you should be able to fix permission issues when passing through an Android device to an unprivileged LXC container under Proxmox Virtual Environment
原文地址: https://www.cveoy.top/t/topic/iSqk 著作权归作者所有。请勿转载和采集!