Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass connected USB devices from the OS to the VM #63

Open
RoninATX opened this issue Jan 19, 2022 · 2 comments
Open

Unable to pass connected USB devices from the OS to the VM #63

RoninATX opened this issue Jan 19, 2022 · 2 comments

Comments

@RoninATX
Copy link

RoninATX commented Jan 19, 2022

I followed the comprehensive guide from "The Hook Up" channel on YouTube that I think many people have followed. In it, they outline how to get Home Assistant running on a Windows 7/10 machine using Oracle VirtualBox as the VM host for Ubuntu/hassio. At the end of the guide there are steps directing users to download the VBoxVmService in order to get Home Assistant to automatically start and run as a background service in the event of a machine reboot.

Well, here's the issue. As long as VBoxVmService was in the mix, I had no way to go into the VirtualBox settings, under USB, and enable devices to pass through to the VM. It did not matter if I stopped the VM from running, then loaded up the VirtualBox GUI, the settings would only ever show "no devices available"
nodice

My theory is that the initialization code for the background service within VBoxVmService is spinning up too early in the kernel load process, before it's had a chance to load USB drivers for attached devices. As a result it initializes a permanent empty index of available USB devices.

To test, I had my ZigB / ZWave stick installed that I needed for Home Assistant, but I also had a basic USB flash drive as a known-good secondary device, as well as the Logitec Keyboard and Mouse USB dongle.

Once I uninstalled VBoxVMService (without changing anything else), the USB tab in VirtualBox was able to properly display the list of attached USB devices, and allow me to pass them into the VM. As you can see, all 3 devices appeared:
dice

A few final points:

  • No, it did not matter whether I was using USB 1.1, 2.0, or 3.0
  • Yes, Virtualbox and the extension packs were at the latest version
  • Yes, all of the chipset and OS drivers were up-to-date
@RJ-Make
Copy link

RJ-Make commented Jan 20, 2022

I have the same setup, and found you MUST have the VM setup and working BEFORE starting the VBoxVMService for this to work.

  1. Install the Service ( or shut it down if already installed). Just make sure the service is not running.
  2. Get everything working with HA first. Start and stop the VM through the VBox interface a couple of times and make sure it captures the stick each time.
  3. Shut the HA VM down.
  4. Configure the VBoxService ini file.
  5. Start the VBoxService service up.
  6. Using the VBoxService tooltray (you may need to start the tray program) start HA.

The VM should start without issue.

Using the Windows Device Manager you can watch the com ports captured by the VM disappear when it starts up.

That way you'll know that it started up properly.

Remember, while using the VBoxService you will not be able to control the VM through the VBoxManger GUI.

If you need any help shutting down the VM and starting it back up via command line for backup purposes let me know.

@hristo-atanasov
Copy link

@RJ-Make Not working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants