"Failed to attach the USB device" "USB device busy.."

Discussions related to using VirtualBox on Windows hosts.
elias
Posts: 4
Joined: 19. Aug 2010, 03:58
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Linux, ????

"Failed to attach the USB device" "USB device busy.."

Post by elias »

Hello everybody:
I am running VirtualBox 4.1.4 (the last version at this time) in a an Intel i7 / 4GB ram notebook with Windows 7 Profesional 64 bit
I can not attach usb devices, the following error message is for an USB-3 external disk, but the same happens with a usb 3 usb memory stick.

Failed to attach the USB device ADATA NH13 to the virtual machine Ubuntu 64 10.04
USB device 'ADATA NH13' with UUID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} is busy with a previous request. Please try again later.
Result Code: E_INVALIDARG (0x80070057)
Component: HostUSBDevice
Interface: IHostUSBDevice {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx}
Callee: IConsole {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx}

There are similar errors in the forum but some are not solved or for other Windows versions.
Nothing has worked.

Is this a bug? or am I doing something wrong? any Idea?


I tried to unmount the device under windows, but that did not work.
I also tried to leave the disk mounted, but stopping antivirus scan, to be sure that no program is accessing files in the device.

I see the device in the filters, but I can not select in the devices/usb window.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: "Failed to attach the USB device" "USB device busy.."

Post by mpack »

The message means that the host OS is grabbing the device when you plug it in, preempting the VM.

Create a blank filter in your USB settings. Wait until VM is running before plugging in the external drive. The "New hardware found" wizard should pop up, this is VirtualBox wanting to install a USB filter driver on your host for that device - allow it to do so. Then unplug the device and plug it in again. This time the filter driver should grab the device and it should work in the VM.

The same procedure may work with a non-blank USB filter. I.e. with VM not running, go to VM settings, create a blank USB filter, plug in device, then edit the filter, selecting the correct device details from the list of active USB connections shown.
ElQuia
Posts: 155
Joined: 30. May 2008, 23:31

Re: "Failed to attach the USB device" "USB device busy.."

Post by ElQuia »

Don't bother. I upgraded to 4.1.6 yesterday. I have been having BSOD caused by vbox usb since 4.0 o 3.8 (see my other posts) 4.16: usb is still broken.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: "Failed to attach the USB device" "USB device busy.."

Post by mpack »

What does that have to do with the OPs question? He mentioned nothing about a BSOD. Please don't hijack someone elses thread.
ElQuia
Posts: 155
Joined: 30. May 2008, 23:31

Re: "Failed to attach the USB device" "USB device busy.."

Post by ElQuia »

mpack wrote:What does that have to do with the OPs question? He mentioned nothing about a BSOD. Please don't hijack someone elses thread.
It´s part of the problem, read my other post, the one that you commented on with out fully reading it.
Please read before giving an opinion.
elias
Posts: 4
Joined: 19. Aug 2010, 03:58
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Linux, ????

Re: "Failed to attach the USB device" "USB device busy.."

Post by elias »

mpack wrote:The message means that the host OS is grabbing the device when you plug it in, preempting the VM.

Create a blank filter in your USB settings. Wait until VM is running before plugging in the external drive. The "New hardware found" wizard should pop up, this is VirtualBox wanting to install a USB filter driver on your host for that device - allow it to do so. Then unplug the device and plug it in again. This time the filter driver should grab the device and it should work in the VM.

The same procedure may work with a non-blank USB filter. I.e. with VM not running, go to VM settings, create a blank USB filter, plug in device, then edit the filter, selecting the correct device details from the list of active USB connections shown.
mpack, thanks for answering, I tried this procedure, but it does not work.
I erased the filter and created an empty one as described, but the wizard did not appeared. Although the usb-hdd is shown (unmarked) in the usb-devices menu in the ubuntu-vm as if I did not do anything. when I try to select it, the same message appears. This also happens with no filter for the usb-hdd and no empty filter.
I have not tried the new version yet as suggested by ElQuia.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: "Failed to attach the USB device" "USB device busy.."

Post by mpack »

elias wrote:I erased the filter and created an empty one as described, but the wizard did not appeared
I assume you realise that the wizard will not appear until you plug in the USB flash drive, though the wording of the quoted sentence can be read otherwise.

If the device fails to identify itself properly to the USB controller then lots of things will not work, including this. Was this a really cheap device, or was it something from a reputable manufacturer? Anyway, I suggest you try the procedure with other devices. Maybe try a different USB port too, in case its something like a bad connector.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: "Failed to attach the USB device" "USB device busy.."

Post by mpack »

You may also want to check out this other thread, in case it is relevant.
elias
Posts: 4
Joined: 19. Aug 2010, 03:58
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Linux, ????

Re: "Failed to attach the USB device" "USB device busy.."

Post by elias »

mpack wrote:
elias wrote:I erased the filter and created an empty one as described, but the wizard did not appeared
I assume you realise that the wizard will not appear until you plug in the USB flash drive, though the wording of the quoted sentence can be read otherwise.

If the device fails to identify itself properly to the USB controller then lots of things will not work, including this. Was this a really cheap device, or was it something from a reputable manufacturer? Anyway, I suggest you try the procedure with other devices. Maybe try a different USB port too, in case its something like a bad connector.
Thank's again,

1) There is no connection problem, the devices are visible for windows 7. Anyway, I connected usb3 and usb2 devices ADATA, Transend, WD, Kingston, Sandisk, Lexar, HP, Sony ...
2) I tried to mount the device different slots, and it was surprising that by this way it was possible to mount a ADATA USB 3 portable disk in the virtual machine (ubuntu) by just right-clicking it on the usb devices icon.
No wizard was launched, it was just mounted as a fuse-block device in the /media directory, as it happens in a non virtual ubuntu.
3) What is strange is that it did not work in the other usb slots. Even being visible for the Wind7 host.

By now I am mounting the device as shared folder, but some times I need to see the raw partitions. (some times I backup the raw partition), a not optimal solution is to mount the disk (/dev/sdX#)in an ubuntu computer. Then sharing the raw device (smb.conf should be modified for that).
Other not satisfactory solution is to start up the computer from a linux live disk, but some configuration should be done each time.

I do not know how the REGISTRY is structured, it seems to me, however, that some information is recorded in the registry maybe a lock flag that prevents vbox to mount an usb device in some conditions.
The last time I messed the REGISTRY in WindXP, I needed to re-install it, for that reason I nave not tried the solutions pointed by you and ElQuia where it is needed to edit the REGISTRY.

Maybe you know if there is something similar to /var/lock in Wind7, or maybe some way to delete the information of a device, in such way that the next time that I introduce the device that record is "fresh" written.
I also noticed that the devices are identified as fuseblk in linux (for mounted devices) and Virtual Box USB (for a transend memory that I can see in windows but can't mount in the vbox ubuntu virtual machine)
Is there any way to prevent auto mount of a device in Wind7? I want to try this, because it is possible that wind7 leaves a lock turned on, signaling as busy the device.

Thank's again for your interest in this problem.
elias
Posts: 4
Joined: 19. Aug 2010, 03:58
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Linux, ????

Re: "Failed to attach the USB device" "USB device busy.."

Post by elias »

ElQuia wrote:Don't bother. I upgraded to 4.1.6 yesterday. I have been having BSOD caused by vbox usb since 4.0 o 3.8 (see my other posts) 4.16: usb is still broken.
Thank's for your answer,

What is BSOD, and what thread do you refer to?
I browsed some of your threads, but I just found some that involve a REGISTRY edition, something that seems to cryptic for me (I had bad experience messing the REGISTRY in other computer),
because I do not know almost nothing on how to administer Windows 7. I neither understand all the technical argot in English.

I searched BSOD, but I only found that it stands for Blue (or Black) Screen Of Dead, something that seems nothing to do with USB storage devices.

I upgraded to the last version, but, instead to fix the problem (as you mentioned) an old problem returned. In full screen mode, the menu is hidden, one needs to type <right-ctrl>-F to exit full screen, where the menu is available.
ElQuia
Posts: 155
Joined: 30. May 2008, 23:31

Re: "Failed to attach the USB device" "USB device busy.."

Post by ElQuia »

You got that right: BSOD Blue Screen Of Death, PC freezes totally. and shows a blue screen with white letters describing the event. Can be because of various causes, but normally it is caused by a misbehaved driver, in this case the vbox usb driver that windows must install to "interface" with the guest.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: "Failed to attach the USB device" "USB device busy.."

Post by Perryg »

ElQuia wrote:You got that right: BSOD Blue Screen Of Death, PC freezes totally. and shows a blue screen with white letters describing the event. Can be because of various causes, but normally it is caused by a misbehaved driver, in this case the vbox usb driver that windows must install to "interface" with the guest.
Or a conflict with another driver. Which seems to be the case most of the time.

If you really want to find out what the problem is you need to disable all USB devices and drivers and bring them up one at a time to see where the failure really is.
ElQuia
Posts: 155
Joined: 30. May 2008, 23:31

Re: "Failed to attach the USB device" "USB device busy.."

Post by ElQuia »

Perryg wrote: If you really want to find out what the problem is you need to disable all USB devices and drivers and bring them up one at a time to see where the failure really is.
Yep. Perryg is right. the only problem with that for us end users is that everything is usb nowadays, I, for exapmple on my three pc's have both keyboard AND mouse as wireless usb. It IS rather hard to get a pc working withOUT keyboard and mouse...
Add to that: webcam, external usb drivers, aka pen drives, external usb hdds, bla, bla, bla.

And also ... it aint a new problem..... :evil:
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: "Failed to attach the USB device" "USB device busy.."

Post by Perryg »

@ElQuia,

You can eliminate the mouse and keyboard as they are shared resources. For the most part you can eliminate pen drives and just about anything USB that does not have a driver. Like I said it will be a conflict with a driver. I know first hand that the HP printers that have memory card slots driver is a major cause of problems. HP likes to take total control and does not play well with others. Another issue is being caused by an AMD USB driver (search for it) all hypervisors have issue with that one.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: "Failed to attach the USB device" "USB device busy.."

Post by mpack »

Perryg wrote:Another issue is being caused by an AMD USB driver (search for it)
No need to search, I provided a link in one of my replies to the OP.
Post Reply