DEV Community

Discussion on: Coral EdgeTPU USB Accelerator with VirtualBox

Collapse
 
hb020 profile image
hb020 • Edited

Thanks for the find. Now I got this working once on my MBP, but now I am no longer able to get it working. Tried SMC reset, rebooting the host and the VM, (latest)VirtualBox with the above tweak of the extra USB device, VMWare Fusion with and without the equivalent tweak in the vmx file, other USB ports and external powered ports. All no luck. I no longer get the "18d1:9302 Google Inc" device when I do "lsusb" in the VM, nor do I see it in the list of USB devices through MacOS's System Report (all I see is the composite device from Global Unichip).
Anyone having a Macbook Pro that has succeeded in keeping it working?
So in essence, the solution above is partial, those on Mac might hit extra hurdles.

Collapse
 
0xkoji profile image
0xkoji

Hey @hb020

Thank you for telling me this.

I just checked what you said.
I think I know what the issue is.
Will add the solution for that issue soon.

Collapse
 
hb020 profile image
hb020

After some digging, this is what I found with VMWare Fusion (and I guess VirtualBox is something like this):

  • plug in the Coral USB accelerator
  • start VMWare Fusion
  • start the (Ubuntu/Debian) VM
  • in the VM settings, attach the "Global Unichip device" to USB
  • run the engine (classify or detection)
  • it will fail with "RuntimeError: Failed to allocate tensors"
  • in the VM settings, remove the Global Unichip device from USB. DO NOT UNPLUG!
  • you will see it suddenly becomes "Google USB Device"
  • in the VM settings, attach the "Google USB Device" to USB
  • and all is well

It just needs an init from a first run and a forced logical disconnect from the original device.
Instead of disconnect, a VM reboot sometimes also works, but it's not always successful.
Any physical power down of the device will force you to go through the process again.

It might be possible to automate this.

F.I.:

Initially, both the VM and the host (MBP in my case), show the USB device as:

Product ID: 0x089a
Vendor ID: 0x1a6e (Global Unichip Corp.)

After the "init + re-attach", both show the USB device as:

Product ID: 0x9302
Vendor ID: 0x18d1 (Google Inc.)

I have reached out to Google for guidance on making this easier.

Thread Thread
 
0xkoji profile image
0xkoji

okay cool, that is what i did exactly.
i think the issue is vbox since i haven't had any issues with raspberry pi and another device