Page 1 of 1

How can I disconnect a USB device w/o shutting down?

Posted: 21. Nov 2010, 00:50
by KenJackson
I have my Windows XP guest configured to access my Sony eReader when I connect it via USB, which works very well.

But sometimes, I would like to access it from my Fedora 14 Linux host instead. The only that I know of that I can do that is to shutdown the Windows guest and either change the configuration or just leave Windows off until I'm done.

I would love to be able to do this without shutting down the guest.
Can I do it?
I tried pausing it, but that doesn't work.

(I'm using VirtualBox 3.2.10 r66523 (PUEL)).

Re: How can I disconnect a USB device w/o shutting down?

Posted: 21. Nov 2010, 00:53
by Sasquatch
Never thought about right clicking on the USB icon in the status bar and then on the device to release it (or do it from the Devices menu)?

Re: How can I disconnect a USB device w/o shutting down?

Posted: 21. Nov 2010, 01:04
by KenJackson
Sasquatch wrote:Never thought about right clicking on the USB icon in the status bar and then on the device to release it (or do it from the Devices menu)?
Do you mean in the guest? Yes, I did that. and Windows happily pops up it's OK-to-remove note.

But that doesn't make it available to the host.

Re: How can I disconnect a USB device w/o shutting down?

Posted: 21. Nov 2010, 01:45
by Sasquatch
In what way is a status bar the same as the Windows task bar? And do you have a devices menu in Windows? Never seen that.

Re: How can I disconnect a USB device w/o shutting down?

Posted: 21. Nov 2010, 21:00
by KenJackson
Ah! Thank you Sasquatch. Your comments provided enough information for me to figure it out.

I always start my virtual machines like this: VBoxManage startvm $VM --type vrdp
And then I use the linux rdesktop command, either locally or remotely, to display the gui.

I find this to be much more convenient than the default gui window.
But I had forgotten that the default gui window had a status bar at the bottom, since I never see it

So on further investigation, I found this solves my problem, substituting the actual device UUID, of course, and my VM's name is WindowsXP:

Code: Select all

VBoxManage controlvm WindowsXP usbdetach 00000000-0000-0000-0000-000000000000
I have an elaborate shell script named vb on the host and remote machines that handles all these details for me, so I can start and control VMs trivially.