Connecting USB Disk to Virtual Box

Discussions related to using VirtualBox on Windows hosts.
freedom4life
Posts: 11
Joined: 16. Jan 2023, 19:34

Connecting USB Disk to Virtual Box

Post by freedom4life »

I am trying out some Linux distros before I dual boot and test out all the needed functionality that one would get in Windows. I plugged a USB Disk (USB 3.0) on my computer and on Virtual Box, went on Devices then USB then the USB Name, and it gives me the following errors:

E_INVALIDARG 0x80070057

USB device ' USB SanDisk 3.2Gen1' with UUID {46ebf7fb-74d8-4a8c-8703-db123e5f8096} is busy with a previous request. Please try again later.

How do I solve this issue?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connecting USB Disk to Virtual Box

Post by scottgus1 »

Carefully go through USB basics and troubleshooting. If you finish all the steps 1-7 and cannot get your USB device into the guest OS, carefully post the outputs of the commands in step 8 as text, not screenshots. Zip and post the logs step 8 call for, using the forum's Upload Attachment tab.
freedom4life
Posts: 11
Joined: 16. Jan 2023, 19:34

Re: Connecting USB Disk to Virtual Box

Post by freedom4life »

Where do I find the Vendor and Product ID from for step #4?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connecting USB Disk to Virtual Box

Post by mpack »

I don't know why people persist in doing this the difficult way.

Why not just map a shared folder to the host drive? That way the host and all VMs can use this drive at the same time.

And it means that you don't have a virtual machine having intimate control of physical hardware - this rarely works well, so should always be your last resort, not your first.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connecting USB Disk to Virtual Box

Post by scottgus1 »

mpack wrote:Why not just map a shared folder to the host drive?
I may be wrong, but from this from the OP:
freedom4life wrote:I am trying out some Linux distros
I think the intent is to boot to the USB stick, not read files off it. But if freedom4life's intent is to read files in a VM booted normally from an ISO, yes, a shared folder would be tons easier.

freedom4life, please clarify: are you attempting to read files from the stick in a normal ISO-booted VM? Or are you booting the VM from the stick?
freedom4life wrote:Where do I find the Vendor and Product ID from for step #4?
USB Basics and Troubleshooting wrote:Under VM Settings » USB, create a USB filter in your guest settings while the device is plugged in the host.
If you do what this said: Make a filter in the USB filters pointing at the stick, then all info including Vendor and Product IDs will be pre-populated for you.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connecting USB Disk to Virtual Box

Post by mpack »

In his OP he talks about accessing the drive using the "Devices" menu of a running VM. He may also be running the VM from there, but he doesn't appear to say so.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connecting USB Disk to Virtual Box

Post by scottgus1 »

mpack wrote:he talks about accessing the drive using the "Devices" menu of a running VM
Ah, yes, sure enough! :lol:
freedom4life
Posts: 11
Joined: 16. Jan 2023, 19:34

Re: Connecting USB Disk to Virtual Box

Post by freedom4life »

I think the intent is to boot to the USB stick, not read files off it. But if freedom4life's intent is to read files in a VM booted normally from an ISO, yes, a shared folder would be tons easier.

freedom4life, please clarify: are you attempting to read files from the stick in a normal ISO-booted VM? Or are you booting the VM from the stick?
@scottgus1 The intent is to put files and docs in and out of a USB stick/external hard drive, not read-only
If you do what this said: Make a filter in the USB filters pointing at the stick, then all info including Vendor and Product IDs will be pre-populated for you.
@scottgus1 I see. Will get back to you on this.
In his OP he talks about accessing the drive using the "Devices" menu of a running VM. He may also be running the VM from there, but he doesn't appear to say so.
@mpack Yes I am running Virtual Box, and I plug the USB stick to my computer which is Windows. I then try on the VM to access the USB Stick and insert/remove files on there to test that it works.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connecting USB Disk to Virtual Box

Post by scottgus1 »

freedom4life wrote:The intent is to put files and docs in and out of a USB stick/external hard drive
Well, I definitely read this one wrong! :lol:

OK, if your intent is merely to get files into and out of the VM, a standard host-OS-generated shared folder through a Bridged or Host-Only network can be used, as Mpack said, and you can skip the USB stick altogether.
freedom4life
Posts: 11
Joined: 16. Jan 2023, 19:34

Re: Connecting USB Disk to Virtual Box

Post by freedom4life »

I am not understanding
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connecting USB Disk to Virtual Box

Post by mpack »

It's very simple: just because it's a USB drive doesn't mean that the guest OS has to be in charge of the USB aspect. Leave the host in charge of the drive, treat it like you would any other shared folder. Yes, you can have shared folders on removable drives.

Make sure you don't still have that USB filter in the VM settings, as it will cause the VM to steal ownership of the drive anyway, preventing the shared folder from working.
Ninad
Posts: 16
Joined: 29. Feb 2016, 15:58

Re: Connecting USB Disk to Virtual Box

Post by Ninad »

mpack wrote:I don't know why people persist in doing this the difficult way.

Why not just map a shared folder to the host drive? That way the host and all VMs can use this drive at the same time.

And it means that you don't have a virtual machine having intimate control of physical hardware - this rarely works well, so should always be your last resort, not your first.
---- Extraneous Info ----

Well ! My use case is different. I use Ubuntu guest on Win 10 host to access my Apple iDevices. I plug them in the host socket and use usb filters to propogate the access to my Ubuntu guest. I just follow the guide scottgus1 mentioned above. The filters work extremely well. For a single iDevice ther are 3 filters depending on its state ( Normal Boot, Device Firmware Upgrade Boot and Recovery Boot). I really appreciate how stable and reliable usb connections are. I have been using them for years. Absolutely no problem. And they work on macOS guests ( a.k.a. The Forbidden Fruit ) as well.

Thanks for a fantastic software :-)

-Ninad
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Connecting USB Disk to Virtual Box

Post by scottgus1 »

Ninad wrote: My use case is different.
That's true. Which makes Mpack's suggestion to use a shared folder not what your use case needs.

If mere file transfer is all that is needed, shared folders from the host OS or Virtualbox Shared Folders through Guest Additions are tons easier than setting up a USB filter.

But other USB usages, like your iThings, or old printers for which drivers aren't available for the host OS anymore, or other USB things, do need the Virtualbox USB Filters.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Connecting USB Disk to Virtual Box

Post by mpack »

Ninad wrote: Well ! My use case is different.
Then please start your own topic. This topic exists to discuss the OPs use case.
freedom4life
Posts: 11
Joined: 16. Jan 2023, 19:34

Re: Connecting USB Disk to Virtual Box

Post by freedom4life »

mpack wrote:It's very simple: just because it's a USB drive doesn't mean that the guest OS has to be in charge of the USB aspect. Leave the host in charge of the drive, treat it like you would any other shared folder. Yes, you can have shared folders on removable drives.

Make sure you don't still have that USB filter in the VM settings, as it will cause the VM to steal ownership of the drive anyway, preventing the shared folder from working.
Okay. So enable shared folders to work on both Windows and Zorin OS on VM?
Post Reply