diff options
| author | Simon Rettberg | 2025-03-27 14:12:10 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2025-03-27 14:12:10 +0100 |
| commit | eb82f6de9a28d16aaa19125fd5aaf3b767c9b8c3 (patch) | |
| tree | 35c0864b93ef0c52451a1ddb6820f6ac15cd3caf | |
| parent | [qemu] Pass usb redir autoconnect to run-virt javatool (TBD) (diff) | |
| download | mltk-eb82f6de9a28d16aaa19125fd5aaf3b767c9b8c3.tar.gz mltk-eb82f6de9a28d16aaa19125fd5aaf3b767c9b8c3.tar.xz mltk-eb82f6de9a28d16aaa19125fd5aaf3b767c9b8c3.zip | |
[run-virt] Conditionally pass through USB ethernet adapters
| -rw-r--r-- | core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/usb_detector.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/usb_detector.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/usb_detector.inc index 2d8b60dd..c1c9ad8e 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/usb_detector.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/usb_detector.inc @@ -3,11 +3,15 @@ # Include: Detect and pass USB devices to the VM # ################################################## -declare -g PASSTHROUGH_USB_DEVICES="2 0:5 0:6 0:7 0:14 0:16 0:17 239" +# 2:* Communication devices, 2:6 is Ethernet +# 239 Misc +declare -g PASSTHROUGH_USB_DEVICES="2:2 2:13 2:14 0:5 0:6 0:7 0:14 0:16 0:17 239" +if ! is_on "$SLX_BRIDGE_OTHER_NICS" && ! is_on "$SLX_DHCP_OTHER_NICS"; then + PASSTHROUGH_USB_DEVICES+=" 2:6" +fi # include USB IDs explicitly given by SLX_PASSTHROUGH_USB_ID # which is expected to be a space-separated list! -. /opt/openslx/config if [ -n "${SLX_PASSTHROUGH_USB_ID}" ]; then while IFS= read -ra USB_ID; do for ID in ${USB_ID[@]}; do |
