how to purge usb thumb drive attached to guest

Discussions about using Windows guests in VirtualBox.
Post Reply
rm22
Posts: 5
Joined: 2. Apr 2016, 19:22

how to purge usb thumb drive attached to guest

Post by rm22 »

I used a USB thumb drive in the host while a guest was running, but not in use. When I started using the guest again later the usb thumb drive was still showing as attached even though i'd ejected it from the host long before. Now I can't get rid of it... If I try to 'eject' it a 'device is in use' message pops up. How do I forcibly remove the usb drive from the guest? And what is the correct way to remove a thumb drive - eject from guest and then eject from host??

Host: Windows 8.1 64-bit
Guest: Windows 7 64-bit SP!
VB: 4.3.12, extension pack, guest additions

Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: how to purge usb thumb drive attached to guest

Post by mpack »

I wouldn't do either. I would access it as a shared folder, and then none of these issues arises - plus it can be shared by multiple VMs.
Rootman
Posts: 251
Joined: 1. Oct 2012, 18:29

Re: how to purge usb thumb drive attached to guest

Post by Rootman »

I've often had issues ejecting thumb drives, Windows just won't cooperate. It's taken rebooting the guest a few times to get it unmounted, and then even taken rebooting the HOST to get it unmounted from it. This simply seems to be a Windows issue rather than a VB issue. I often have it on my hosts or other PCs without ever running VB at all.

I even use the ejectusb.exe that's found around the internet, it is supposed to flush and close all open files on the device, it too fails regularly. A few times I've killed the EXPLORER process on the PC that has the "stuck" USB drive, more often than not it too will not allow the device to be ejected even after that. I then go ahead and reboot. I've corrupted too many USB sticks by simply yanking them, sometimes even HOURS after trying to eject them.

MOST times when I eject the USB drive from the guest it simply remounts in the host like it should, from there I can unmounted or use it in the host if that's what I need. Bit it seems increasingly it gets "stuck" in either the guest or host.

EDIT: I have to add that locked USB drives are becoming increasingly regular. Windows XP hardly ever did it, Win 7 slightly more and seemingly more so now than years ago. My Windows 10 hosts regularly lock my USB thumdrives and USB HDDs so regular I have to reboot in order to remove them probably 3 out of 5 times nowadays. I am not sure which is more to blame, additional software or the OS.
Post Reply