问题
I'm running Ubuntu 14.04LTS, 64bit via VirtualBox on a mac. I want to talk to a USB HID device from my VM via a python app (pyusb) but I can't select the device. From VirtualBox -> Devices -> USB Devices I see my device but it's grayed out.
I was hoping to find a command I could run on the mac terminal to 'let go' of it, but it's turning out to be more difficult than I imagined. On an Ubuntu VM via Windows 7, I can take control of the USB HID device via Devices -> USB Devices -> Select my device and talk to it just fine.
Is there some reason why this may not be possible on a mac?
回答1:
There is no concept of 'unmount in host OS to grab it in vm's OS'.
To get a normally plug-and-play device to work:
- Shut down the guest machine.
- Highlight the guest machine in the VirtualBox panel.
- Go to Settings for that vm -> Ports -> USB
- Click the green plus icon to add your device.
- Your usb device should now be visible, click to add that.
- Remove the USB device from your physical machine
- Start VB and guest OS (in my case Ubuntu 14.04 LTS, 64bit)
- Plug in USB device
- Inspect that the device has been captured by the vm's operating system in Devices -> USB Devices
来源:https://stackoverflow.com/questions/24318375/how-to-eject-a-usb-hid-device-from-mac-osx-to-use-in-ubuntu-vm