我运行的是 CentOS v.7.5.1804,内核 3.10.0-862.el7.x86_64。
主机具有映射到/dev/ttyACM0
来宾虚拟机上的 USB 加密狗。
运行systemctl suspend
并恢复 VM 后,/dev/ttyACM0
将被删除,但不会添加回来。我可以使用的唯一方法就是重新插入加密狗。下面是 的列表udevadm monitor
。
是否可以在不重新插入物理适配器的情况下检测到加密狗?
我认为解决当前问题也将有助于解决这个。
######## UDEV events when dongle gets unplugged #############
KERNEL[40020.994890] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/tty/ttyACM0 (tty)
KERNEL[40020.994919] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0 (usb)
KERNEL[40020.994929] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1 (usb)
KERNEL[40020.995073] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2 (usb)
UDEV [40020.996954] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/tty/ttyACM0 (tty)
UDEV [40020.997707] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1 (usb)
UDEV [40020.998251] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0 (usb)
UDEV [40020.998773] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2 (usb)
######## UDEV events when dongle gets plugged back #############
KERNEL[40023.384021] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2 (usb)
KERNEL[40023.417572] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0 (usb)
KERNEL[40023.419436] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/tty/ttyACM0 (tty)
KERNEL[40023.421406] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1 (usb)
UDEV [40023.427400] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2 (usb)
UDEV [40023.428051] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0 (usb)
UDEV [40023.428235] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1 (usb)
UDEV [40023.430357] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/tty/ttyACM0 (tty)
####### VM is suspended and resumed here, /dev/ttyACM0 is removed but not added back############
KERNEL[40032.878071] remove /devices/system/machinecheck/machinecheck1 (machinecheck)
KERNEL[40032.878130] remove /devices/system/machinecheck/machinecheck2 (machinecheck)
KERNEL[40032.878140] remove /devices/system/machinecheck/machinecheck3 (machinecheck)
KERNEL[40032.878146] add /devices/system/machinecheck/machinecheck1 (machinecheck)
KERNEL[40032.878153] add /devices/system/machinecheck/machinecheck2 (machinecheck)
KERNEL[40032.878158] add /devices/system/machinecheck/machinecheck3 (machinecheck)
KERNEL[40032.878176] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0/rfkill7 (rfkill)
KERNEL[40032.878183] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0 (bluetooth)
KERNEL[40032.882785] change /devices/pci0000:00/0000:00:0f.0/drm/card0 (drm)
UDEV [40032.896262] remove /devices/system/machinecheck/machinecheck1 (machinecheck)
KERNEL[40032.897736] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/tty/ttyACM0 (tty)
KERNEL[40032.897750] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0 (usb)
KERNEL[40032.897758] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1 (usb)
KERNEL[40032.916152] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2 (usb)
UDEV [40032.916188] remove /devices/system/machinecheck/machinecheck2 (machinecheck)
UDEV [40032.916238] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0/rfkill7 (rfkill)
UDEV [40032.916252] remove /devices/system/machinecheck/machinecheck3 (machinecheck)
UDEV [40032.916264] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0 (bluetooth)
UDEV [40032.916273] add /devices/system/machinecheck/machinecheck3 (machinecheck)
UDEV [40032.916281] add /devices/system/machinecheck/machinecheck2 (machinecheck)
UDEV [40032.921414] change /devices/pci0000:00/0000:00:0f.0/drm/card0 (drm)
UDEV [40032.921940] add /devices/system/machinecheck/machinecheck1 (machinecheck)
UDEV [40032.931733] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/tty/ttyACM0 (tty)
UDEV [40032.933373] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0 (usb)
UDEV [40032.933398] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.1 (usb)
UDEV [40032.935702] remove /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2 (usb)
KERNEL[40032.940491] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0 (bluetooth)
UDEV [40032.940514] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0 (bluetooth)
KERNEL[40032.940526] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0/rfkill8 (rfkill)
UDEV [40032.951063] add /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.0/bluetooth/hci0/rfkill8 (rfkill)
KERNEL[40034.139906] add /kernel/slab/nf_conntrack_ffff9099a9dae680 (slab)
UDEV [40034.140268] add /kernel/slab/nf_conntrack_ffff9099a9dae680 (slab)
答案1
好吧,我仍然没有找到加密狗不出现问题的解决方案,但我在调查它方面取得了进展,并意识到我在错误的社区中发布了问题:加密狗可以重新出现,而无需通过显式物理插入回来在主机的 VMWare Fusion USB 选项中重新启用它。因此,VMWare Fusion 负责恢复加密狗,而不是来宾 CentOS VM。