Page 1 of 1

USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 05:02
by CyberSpace2948
I have run into a weird issue that I cannot find anywhere else on the forums or with a Google search recently. When I plug in a flash drive to my Windows 10 host machine, the flash drives will not mount until I launch the VirtualBox program. I do not have to start a virtual machine, just the program. So far I have tested with a few devices that I will list below.

1) I have tested with three flash drives, an external hard drive, and a MIDI controller. The MIDI controller will work normally without having to launch VB for it to show up in the host machine.
2) Whatever devices I have plugged in before I start my computer up will show up fine.

As far as troubleshooting goes, I have tried the following.

1) Uninstall/re-install of VirtualBox.
2) Mounting my flash drive to a virtual machine again. However, this won't work as the USB flash drive is just not recognized.
3) Deleted the USB driver folder found in "C:\Program Files\Oracle\VirtualBox\drivers"
4) Ran an SFC scan on my host computer to check for file system errors.


For more information, I am running version 6.1.12 of VirtualBox on Windows 10 64-Bit. Last VM I was using before the issue arose was a 64-bit Windows 10 with Guest Editions installed. I didn't bother getting the VBoxHardening.log because the VM that I was last using has since been deleted and the VBoxStartup.log is not on my system as far as I can tell. If anyone needs any more information, let me know and I will post it. Thanks in advance for any ideas on this.

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 19:29
by scottgus1
This does sound like a weird issue!

It sounds like if you have a USB device attached when your host PC starts, the device works all the time whether the main Virtualbox window is open or not.

Once you boot the host PC, only the MIDI device works when it is plugged in before you start the main Virtualbox window.

Other devices attached after you boot the host PC will not work until you start the main Virtualbox window.

Will your USB devices work properly if you just uninstall Virtualbox but not reinstall it?

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 20:02
by CyberSpace2948
scottgus1 wrote: It sounds like if you have a USB device attached when your host PC starts, the device works all the time whether the main Virtualbox window is open or not.
Yep, that is correct.
scottgus1 wrote:Once you boot the host PC, only the MIDI device works when it is plugged in before you start the main Virtualbox window.
Other devices attached after you boot the host PC will not work until you start the main Virtualbox window.
Once I boot, any device that is connected before I boot works. Also, when connect my MIDI controller or a charger for a phone, it works. Only USB devices are not working (including my phone as a USB storage device).
scottgus1 wrote: Will your USB devices work properly if you just uninstall Virtualbox but not reinstall it?
No, I tried uninstalling, rebooting, and seeing if the flash drive operated normally and it did not work. Once I installed and lunched VB they mounted.

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 20:14
by scottgus1
I do not know how to fix this one. I have never heard of it. It is especially weird that a removal of Virtualbox from the PC doesn't clear up the problem. What's even weirder is that the MIDI device is not affected.

Try a complete PC disk image to have a good restorable backup, then uninstall Virtualbox again, go through the Registry and remove every key related to Virtualbox, also go through the filesystem and remove every file related to Virtualbox, then reboot and try the USB devices again.

Beyond this we'll have to wait for someone else who can suggest something.

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 20:21
by CyberSpace2948
scottgus1 wrote:I do not know how to fix this one. I have never heard of it. It is especially weird that a removal of Virtualbox from the PC doesn't clear up the problem. What's even weirder is that the MIDI device is not affected.

Try a complete PC disk image to have a good restorable backup, then uninstall Virtualbox again, go through the Registry and remove every key related to Virtualbox, also go through the filesystem and remove every file related to Virtualbox, then reboot and try the USB devices again.

Beyond this we'll have to wait for someone else who can suggest something.

I was poking around trying to find any files related to VirtualBox left after an uninstall. Have any suggestions for where I can a list of registry keys to remove as well? I am thinking this is a driver issue with either VB or something crazy going on in Windows.

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 20:42
by scottgus1
I don't know about registry keys, but Virtualbox keeps files left over after an uninstall in C:\Users\{you}\.Virtualbox. (Note the period in the folder name '.Virtualbox'.) The Virtualbox.XML file might have something important in it. Can you please zip and post it using Upload Attachment?

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 21:59
by CyberSpace2948
scottgus1 wrote:I don't know about registry keys, but Virtualbox keeps files left over after an uninstall in C:\Users\{you}\.Virtualbox. (Note the period in the folder name '.Virtualbox'.) The Virtualbox.XML file might have something important in it. Can you please zip and post it using Upload Attachment?
Sure, here you go

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 27. Aug 2020, 23:56
by fth0
Perhaps the following could be an idea to investigate:

There are USB devices with more than one USB function. The USB function to be used is selected at some time around the USB reset, which happens during power on, and which can probably also be initiated from the VirtualBox USB capturing driver. Especially, USB flash drives can be multi-function devices, for example consisting of a HDD function and a CD-ROM function, and they can be recognized as CD-ROM devices without CD inserted.

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 28. Aug 2020, 20:16
by scottgus1
Thanks for the Virtualbox.xml!. The line I was loking for is:
<USBDeviceFilters/>
With the closing /, It appears there are no global USB filters, good.

It is very puzzling how your USB system won't return to normal with Virtualbox removed from the PC.

Let me double-check:
1. you start your PC with a problem USB thumbdrive disconnected.
2. you stick the USB thumbdrive in after the PC has booted.
3. it does not show in the PC's file explorer.
4. you start the main Virtualbox window only, no guests are running.
5. now the USB thumbdrive appears in the host PC's file explorer.

another process:
1. you plug in the USB thumbdrive while your computer is off.
2. You start the PC with the thumbdrive plugged in.
3. When the PC is fully started, the thumbdrive now appears in file explorer without having to start Virtualbox.

And all along, the USB MIDI controller can be plugged and unplugged at random and is always available regardless of boot state or Virtualbox state?

Are these the situation you see?

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 29. Aug 2020, 04:40
by CyberSpace2948
scottgus1 wrote:Let me double-check:
1. you start your PC with a problem USB thumbdrive disconnected.
2. you stick the USB thumbdrive in after the PC has booted.
3. it does not show in the PC's file explorer.
4. you start the main Virtualbox window only, no guests are running.
5. now the USB thumbdrive appears in the host PC's file explorer.
Yep that's right.
scottgus1 wrote:another process:
1. you plug in the USB thumbdrive while your computer is off.
2. You start the PC with the thumbdrive plugged in.
3. When the PC is fully started, the thumbdrive now appears in file explorer without having to start Virtualbox.
I tested this and the flash drive will not work when plugged in before the computer is off. Only the midi controllers, mouse, keyboard, USB DAC and USB audio interface.
scottgus1 wrote:And all along, the USB MIDI controller can be plugged and unplugged at random and is always available regardless of boot state or Virtualbox state?
Also correct.

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 2. Sep 2020, 16:28
by CyberSpace2948
Just an update on this whole situation in case anyone else ever runs into it. Problem has been fixed. I am not 100% sure what fixed it though.

After uninstalling VirtualBox, I used this tool called everything (https://www.voidtools.com/) to search for any file containing the strings "VB" and "VirtualBox", then deleted them from my system. After re-installing, I plugged in a Kindle and it showed up. Began testing flash drives and other devices; all working normally now.

My guess is that there are a few files that VB does not uninstall that were saving a config or driver somewhere. That or my Kindle magically fixed it :lol:

Re: USB Won't Mount to Host OS Until VirtualBox is Launched

Posted: 2. Sep 2020, 16:44
by scottgus1
CyberSpace2948 wrote:My guess is that there are a few files that VB does not uninstall
There are.
scottgus1 wrote:Virtualbox keeps files left over after an uninstall in C:\Users\{you}\.Virtualbox. (Note the period in the folder name '.Virtualbox'.)
Also the individual guests each have a .vbox file which is not deleted. This facilitates version changes without destroying existing guests and main setups.

There could have been a glitch in a USB driver from Virtualbox or other source that did not, or was not allowed to, uninstall.
CyberSpace2948 wrote:I used this tool called everything (https://www.voidtools.com/) to search for any file containing the strings "VB" and "VirtualBox", then deleted them from my system.
A list of what was deleted might be (or might have been) illuminating.

Glad you're up and running again!