Ich habe als proxmox Neuling ein echt nervigen Blocker bei einem P2V Projekt: Das Gastsystem benötigt einen Lizenz Dongle ("Feitan" irgendwas..), welcher sich nach Anstecken soweit auch per USB Passthrough nutzen lässt.
Problem ist: Sobald das Gastsystem einmal mit USB Forwarding gestartet wurde hängt udev-settle beim nächsten Reboot. Irgendwie scheint der Dongle dann "zu klemmen". Laut dmesg wird beim Start der VM der USB Port nochmal auf Full Speed resetted (siehe letzte Zeile). Ein Kaltstart behebt das Problem.
Beim darauf folgenden Warmstart schlägt dann die Initialisierung der folgenden Services fehl:
Im dmesg Log einige fehlschlagende Zugriffversuche auf den Dongle:
Ein Kaltstart behebt das Problem.
Nun weiß ich nicht weiter, ich habe versucht das Ding per udev Rule zu ignorieren, was mir nicht gelungen ist. Mal angenommen es würde erfolgreich von udev ignoriert werden, könnte ich es dann immer noch per USB forwarden, oder ist es dann komplett unnutzbar?
Der entsprechend Dongle ist als "/dev/sdc" eingebunden:
Meine "/etc/udev/rules.d/99-ignore-usb-dongle.rules" sieht folgendermaßen aus:
Was ist an meinder udev Regel falsch? Und wie gesagt, wenn das Gerät ignoriert werden würde, könnte ich dann trotzdem den Port an sich weiterleiten?
Problem ist: Sobald das Gastsystem einmal mit USB Forwarding gestartet wurde hängt udev-settle beim nächsten Reboot. Irgendwie scheint der Dongle dann "zu klemmen". Laut dmesg wird beim Start der VM der USB Port nochmal auf Full Speed resetted (siehe letzte Zeile). Ein Kaltstart behebt das Problem.
Bash:
[ 8.386770] igb 0000:02:00.0 eno1: igb: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 8.494393] vmbr0: port 1(eno1) entered blocking state
[ 8.494669] vmbr0: port 1(eno1) entered forwarding state
[ 9.138432] tap100i0: entered promiscuous mode
[ 9.163155] vmbr0: port 2(tap100i0) entered blocking state
[ 9.163840] vmbr0: port 2(tap100i0) entered disabled state
[ 9.164250] tap100i0: entered allmulticast mode
[ 9.164520] vmbr0: port 2(tap100i0) entered blocking state
[ 9.164719] vmbr0: port 2(tap100i0) entered forwarding state
[ 9.361060] x86/split lock detection: #AC: CPU 1/KVM/5181 took a split_lock trap at address: 0x7ef1d050
[ 9.361063] x86/split lock detection: #AC: CPU 2/KVM/5182 took a split_lock trap at address: 0x7ef1d050
[ 9.361072] x86/split lock detection: #AC: CPU 3/KVM/5183 took a split_lock trap at address: 0x7ef1d050
[ 217.307658] tap102i0: entered promiscuous mode
[ 217.316121] vmbr0: port 3(tap102i0) entered blocking state
[ 217.316130] vmbr0: port 3(tap102i0) entered disabled state
[ 217.316145] tap102i0: entered allmulticast mode
[ 217.316192] vmbr0: port 3(tap102i0) entered blocking state
[ 217.316201] vmbr0: port 3(tap102i0) entered forwarding state
[ 218.203877] vfio-pci 0000:01:00.1: enabling device (0140 -> 0142)
[ 219.232772] vfio-pci 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none
[ 230.914876] x86/split lock detection: #AC: CPU 3/KVM/6168 took a split_lock trap at address: 0xfffff806234e15ac
[ 234.910533] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
Beim darauf folgenden Warmstart schlägt dann die Initialisierung der folgenden Services fehl:
Im dmesg Log einige fehlschlagende Zugriffversuche auf den Dongle:
Bash:
[ 34.167933] ast 0000:05:00.0: [drm] fb0: astdrmfb frame buffer device
[ 34.171125] power_meter ACPI000D:00: Found ACPI power meter.
[ 34.171165] power_meter ACPI000D:00: Ignoring unsafe software power cap!
[ 34.171168] power_meter ACPI000D:00: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 34.269345] intel_tcc_cooling: TCC Offset locked
[ 34.340449] intel_rapl_msr: PL4 support detected.
[ 34.340642] intel_rapl_common: Found RAPL domain package
[ 34.340649] intel_rapl_common: Found RAPL domain core
[ 64.221702] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 94.935655] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 131.800660] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 168.663674] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 205.527731] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 242.391636] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 246.873347] INFO: task ata_id:3949 blocked for more than 122 seconds.
[ 246.873361] Tainted: P O 6.8.12-4-pve #1
[ 246.873366] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 246.873372] task:ata_id state:D stack:0 pid:3949 tgid:3949 ppid:1 flags:0x00000006
[ 246.873380] Call Trace:
[ 246.873384] <TASK>
[ 246.873389] __schedule+0x401/0x15e0
[ 246.873397] ? sbitmap_find_bit+0xa1/0x1a0
[ 246.873404] schedule+0x33/0x110
[ 246.873408] io_schedule+0x46/0x80
[ 246.873413] blk_mq_get_tag+0x117/0x2a0
[ 246.873418] ? __pfx_autoremove_wake_function+0x10/0x10
[ 246.873426] __blk_mq_alloc_requests+0x1f2/0x450
[ 246.873433] ? spl_kvmalloc+0x84/0xc0 [spl]
[ 246.873446] blk_mq_alloc_request+0x243/0x290
[ 246.873451] scsi_alloc_request+0xf/0x40
[ 246.873457] sg_io+0x75/0x360
[ 246.873665] scsi_ioctl+0x3d4/0x9a0
[ 246.873837] sd_ioctl+0x120/0x200
[ 246.874000] blkdev_ioctl+0x148/0x290
[ 246.874199] __x64_sys_ioctl+0xa0/0xf0
[ 246.874366] x64_sys_call+0xa68/0x24b0
[ 246.874522] do_syscall_64+0x81/0x170
[ 246.874682] ? path_openat+0xa9b/0x1190
[ 246.874834] ? do_syscall_64+0x8d/0x170
[ 246.874986] ? do_filp_open+0xaf/0x170
[ 246.875168] ? putname+0x5b/0x80
[ 246.875329] ? do_sys_openat2+0x9f/0xe0
[ 246.875479] ? syscall_exit_to_user_mode+0x86/0x260
[ 246.875632] ? do_syscall_64+0x8d/0x170
[ 246.875779] ? __count_memcg_events+0x6f/0xe0
[ 246.875939] ? count_memcg_events.constprop.0+0x2a/0x50
[ 246.876092] ? handle_mm_fault+0xad/0x380
[ 246.876251] ? do_user_addr_fault+0x337/0x660
[ 246.876400] ? irqentry_exit_to_user_mode+0x7b/0x260
[ 246.876546] ? irqentry_exit+0x43/0x50
[ 246.876692] ? exc_page_fault+0x94/0x1b0
[ 246.876838] entry_SYSCALL_64_after_hwframe+0x78/0x80
[ 246.876986] RIP: 0033:0x7d55bbab8cdb
[ 246.877177] RSP: 002b:00007fff968c84d0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 246.877335] RAX: ffffffffffffffda RBX: 00007d55bb9b8690 RCX: 00007d55bbab8cdb
[ 246.877483] RDX: 00007fff968c85b0 RSI: 0000000000002285 RDI: 0000000000000003
[ 246.877638] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
[ 246.877783] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff968c9ee0
[ 246.877928] R13: 00007fff968c8c40 R14: 00007fff968c8c20 R15: 00007fff968c8c10
[ 246.878071] </TASK>
[ 246.878270] INFO: task hdparm:4053 blocked for more than 122 seconds.
[ 246.878421] Tainted: P O 6.8.12-4-pve #1
[ 246.878561] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 246.878703] task:hdparm state:D stack:0 pid:4053 tgid:4053 ppid:1 flags:0x00000006
[ 246.878846] Call Trace:
[ 246.878987] <TASK>
[ 246.879150] __schedule+0x401/0x15e0
[ 246.879300] ? sbitmap_find_bit+0xa1/0x1a0
[ 246.879439] schedule+0x33/0x110
[ 246.879578] io_schedule+0x46/0x80
[ 246.879718] blk_mq_get_tag+0x117/0x2a0
[ 246.879851] ? __pfx_autoremove_wake_function+0x10/0x10
[ 246.879987] __blk_mq_alloc_requests+0x1f2/0x450
[ 246.880141] blk_mq_alloc_request+0x243/0x290
[ 246.880273] scsi_alloc_request+0xf/0x40
[ 246.880406] sg_io+0x75/0x360
[ 246.880535] scsi_ioctl+0x3d4/0x9a0
[ 246.880662] sd_ioctl+0x120/0x200
[ 246.880792] blkdev_ioctl+0x148/0x290
[ 246.880916] __x64_sys_ioctl+0xa0/0xf0
[ 246.881038] x64_sys_call+0xa68/0x24b0
[ 246.881198] do_syscall_64+0x81/0x170
[ 246.881321] ? xas_find+0x6e/0x1d0
[ 246.881444] ? next_uptodate_folio+0x93/0x290
[ 246.881568] ? filemap_map_pages+0x4b8/0x5b0
[ 246.881684] ? do_fault+0x269/0x4c0
[ 246.881803] ? __handle_mm_fault+0x88f/0xf20
[ 246.881922] ? __count_memcg_events+0x6f/0xe0
[ 246.882040] ? count_memcg_events.constprop.0+0x2a/0x50
[ 246.882194] ? handle_mm_fault+0xad/0x380
[ 246.882319] ? do_user_addr_fault+0x337/0x660
[ 246.882436] ? irqentry_exit_to_user_mode+0x7b/0x260
[ 246.882550] ? irqentry_exit+0x43/0x50
[ 246.882662] ? exc_page_fault+0x94/0x1b0
[ 246.882774] entry_SYSCALL_64_after_hwframe+0x78/0x80
[ 246.882896] RIP: 0033:0x77bc6cec4cdb
[ 246.883009] RSP: 002b:00007ffc2830df00 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 246.883145] RAX: ffffffffffffffda RBX: 00007ffc2830dff0 RCX: 000077bc6cec4cdb
[ 246.883264] RDX: 00007ffc2830df80 RSI: 0000000000002285 RDI: 0000000000000003
[ 246.883385] RBP: 0000000000000000 R08: 00000000000000ef R09: 0000000000000000
[ 246.883501] R10: 00000000000000fe R11: 0000000000000246 R12: 00007ffc2830dfe0
[ 246.883617] R13: 0000000000000000 R14: 00007ffc2830e078 R15: 0000000000000000
[ 246.883734] </TASK>
[ 246.883859] INFO: task hdparm:4057 blocked for more than 122 seconds.
[ 246.883981] Tainted: P O 6.8.12-4-pve #1
[ 246.884123] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 246.884253] task:hdparm state:D stack:0 pid:4057 tgid:4057 ppid:1 flags:0x00000006
[ 246.884382] Call Trace:
[ 246.884505] <TASK>
[ 246.884627] __schedule+0x401/0x15e0
[ 246.884753] ? sbitmap_find_bit+0xa1/0x1a0
[ 246.884881] schedule+0x33/0x110
[ 246.885005] io_schedule+0x46/0x80
[ 246.885153] blk_mq_get_tag+0x117/0x2a0
[ 246.885289] ? __pfx_autoremove_wake_function+0x10/0x10
[ 246.885418] __blk_mq_alloc_requests+0x1f2/0x450
[ 246.885548] blk_mq_alloc_request+0x243/0x290
[ 246.885685] scsi_alloc_request+0xf/0x40
[ 246.885821] sg_io+0x75/0x360
[ 246.885951] scsi_ioctl+0x3d4/0x9a0
[ 246.886079] ? common_perm_cond+0x4e/0x200
[ 246.886210] sd_ioctl+0x120/0x200
[ 246.886336] blkdev_ioctl+0x148/0x290
[ 246.886461] __x64_sys_ioctl+0xa0/0xf0
[ 246.886586] x64_sys_call+0xa68/0x24b0
[ 246.886710] do_syscall_64+0x81/0x170
[ 246.886840] ? obj_cgroup_uncharge_pages+0x71/0xf0
[ 246.886964] ? __memcg_slab_free_hook+0x115/0x180
[ 246.887093] ? __memcg_slab_free_hook+0x115/0x180
[ 246.887220] ? __fput+0x15e/0x2e0
[ 246.887343] ? kmem_cache_free+0x36c/0x400
[ 246.887474] ? __fput+0x15e/0x2e0
[ 246.887600] ? syscall_exit_to_user_mode+0x86/0x260
[ 246.887724] ? do_syscall_64+0x8d/0x170
[ 246.887842] ? putname+0x5b/0x80
[ 246.887961] ? do_sys_openat2+0x9f/0xe0
[ 246.888079] ? syscall_exit_to_user_mode+0x86/0x260
[ 246.888208] ? do_syscall_64+0x8d/0x170
[ 246.888325] ? do_syscall_64+0x8d/0x170
[ 246.888435] ? exc_page_fault+0x94/0x1b0
[ 246.888546] entry_SYSCALL_64_after_hwframe+0x78/0x80
[ 246.888660] RIP: 0033:0x74cb935b1cdb
[ 246.888774] RSP: 002b:00007fff41cc4f20 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 246.888891] RAX: ffffffffffffffda RBX: 00007fff41cc5010 RCX: 000074cb935b1cdb
[ 246.889006] RDX: 00007fff41cc4fa0 RSI: 0000000000002285 RDI: 0000000000000003
[ 246.889144] RBP: 0000000000000000 R08: 00000000000000ef R09: 0000000000000000
[ 246.889263] R10: 00000000000000fe R11: 0000000000000246 R12: 00007fff41cc5000
[ 246.889385] R13: 0000000000000000 R14: 00007fff41cc5098 R15: 0000000000000000
[ 246.889500] </TASK>
[ 248.921990] sd 8:0:0:0: [sdc] Unaligned partial completion (resid=65523, sector_sz=512)
[ 248.922270] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 f0 00
[ 248.922413] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=215s
[ 248.922594] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 f0 00
[ 248.922751] I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x4000 phys_seg 3 prio class 0
[ 249.025049] audit: type=1400 audit(1735470286.210:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/lxc-copy" pid=4486 comm="apparmor_parser"
[ 249.025490] audit: type=1400 audit(1735470286.211:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="pve-container-mounthotplug" pid=4484 comm="apparmor_parser"
[ 249.027519] audit: type=1400 audit(1735470286.211:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/lxc-start" pid=4487 comm="apparmor_parser"
[ 249.027954] audit: type=1400 audit(1735470286.213:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=4483 comm="apparmor_parser"
[ 249.028659] audit: type=1400 audit(1735470286.213:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=4483 comm="apparmor_parser"
[ 249.029156] audit: type=1400 audit(1735470286.213:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="swtpm" pid=4489 comm="apparmor_parser"
[ 249.029613] audit: type=1400 audit(1735470286.213:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=4488 comm="apparmor_parser"
[ 249.030121] audit: type=1400 audit(1735470286.213:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=4488 comm="apparmor_parser"
[ 249.030122] audit: type=1400 audit(1735470286.213:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=4488 comm="apparmor_parser"
[ 249.031068] audit: type=1400 audit(1735470286.215:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lxc-container-default" pid=4482 comm="apparmor_parser"
[ 249.064725] RPC: Registered named UNIX socket transport module.
[ 249.065404] RPC: Registered udp transport module.
[ 249.065996] RPC: Registered tcp transport module.
[ 249.066783] RPC: Registered tcp-with-tls transport module.
[ 249.066784] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 249.136201] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[ 249.136216] softdog: soft_reboot_cmd=<not set> soft_active_on_boot=0
[ 249.171220] Loading iSCSI transport class v2.0-870.
[ 249.317758] NET: Registered PF_QIPCRTR protocol family
[ 2339.722302] vmbr0: port 1(eno1) entered blocking state
[ 2339.722314] vmbr0: port 1(eno1) entered disabled state
[ 2339.722333] igb 0000:02:00.0 eno1: entered allmulticast mode
[ 2339.722783] igb 0000:02:00.0 eno1: entered promiscuous mode
[ 2343.426921] igb 0000:02:00.0 eno1: igb: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 2343.529561] vmbr0: port 1(eno1) entered blocking state
[ 2343.529574] vmbr0: port 1(eno1) entered forwarding state
Ein Kaltstart behebt das Problem.
Nun weiß ich nicht weiter, ich habe versucht das Ding per udev Rule zu ignorieren, was mir nicht gelungen ist. Mal angenommen es würde erfolgreich von udev ignoriert werden, könnte ich es dann immer noch per USB forwarden, oder ist es dann komplett unnutzbar?
Der entsprechend Dongle ist als "/dev/sdc" eingebunden:
Bash:
root@m6server:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 3.6T 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 1G 0 part
└─sda3 8:3 0 3.6T 0 part
sdb 8:16 0 3.6T 0 disk
├─sdb1 8:17 0 1007K 0 part
├─sdb2 8:18 0 1G 0 part
└─sdb3 8:19 0 3.6T 0 part
sdc 8:32 0 16M 0 disk
zd0 230:0 0 931.5G 0 disk
├─zd0p1 230:1 0 101M 0 part
...
Bash:
root@m6server:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
Bus 001 Device 003: ID 046b:ff01 American Megatrends, Inc. Virtual Hub
Bus 001 Device 002: ID 096e:0403 Feitian Technologies, Inc. USB Dongle 32
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Meine "/etc/udev/rules.d/99-ignore-usb-dongle.rules" sieht folgendermaßen aus:
Code:
ATTRS{manufacturer}=="FT", OPTIONS+="ignore_device"
Was ist an meinder udev Regel falsch? Und wie gesagt, wenn das Gerät ignoriert werden würde, könnte ich dann trotzdem den Port an sich weiterleiten?