Author Topic: usb access in virtualbox  (Read 776 times)

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2229
usb access in virtualbox
« on: December 31, 2012, 03:22:32 PM »
I know I have seen posts about this, but a search turns up nothing pertinent.

Anyway, I am running PCLOS KDE, fully updated, with Windows XP Pro running in the latest version of Oracle virtualbox , on a Compaq laptop.  I made sure I am in both the vboxusers and usb groups, but nothing I do seems to make XP (Windows Explorer or any other program) 'see' any of my usb thumb drives.

I'm sure this has been solved somewhere, I just can't find it.

The CD drive and two shared folders on my hard drive can be seen just fine, it's just thumb drives that seem to go missing.

Does the user name have to be the same in PCLOS and the OS running in the VM?  Or does that matter?  I've tried it both ways.

Does anyone have a hint?

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1474
  • In theory, theory=practice, in practice ???
Re: usb access in virtualbox
« Reply #1 on: December 31, 2012, 03:37:40 PM »

The CD drive and two shared folders on my hard drive can be seen just fine, it's just thumb drives that seem to go missing.


Are the thumb's NTFS, they should show up.    At the library I
plug in NTFS thumb's OK, but ext4's on a thumb there with
W-XP they never do.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline kaptain_zero

  • Full Member
  • ***
  • Posts: 139
Re: usb access in virtualbox
« Reply #2 on: December 31, 2012, 03:39:48 PM »
If you have installed Guest Additions, all you should have to do is go to the Vbox toolbar at the top, select "devices" then 'usb devices" and check the port/device you have connected. It should then pass this device through to the Guest OS.  If you want a device to be persistent, as in, every time you start the Guest OS, you also want a particular usb device to be made available to it, you would do this under "machine" then "settings" then "usbdevices" and place the check mark next to the desired device. Note, you are enabling specific USB devices, NOT usb ports....  I find it works well, but I did run into a device that would cause problems if it was made persistent, but wasn't actually connected when I started the Guest OS.... So, I just ended up manually making it available when I needed it.

Hope this helps
Asus M4A78-EM
Phenom II X4 940 Black Edition Quad Core Processor AM2+  OC'd to 3.3GHZ
GeForce 8800 GT
Samsung SCX-4623F all in one monochrome laser

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2229
Re: usb access in virtualbox
« Reply #3 on: January 02, 2013, 04:55:34 PM »
If you have installed Guest Additions, all you should have to do is go to the Vbox toolbar at the top, select "devices" then 'usb devices" and check the port/device you have connected. It should then pass this device through to the Guest OS.  If you want a device to be persistent, as in, every time you start the Guest OS, you also want a particular usb device to be made available to it, you would do this under "machine" then "settings" then "usbdevices" and place the check mark next to the desired device. Note, you are enabling specific USB devices, NOT usb ports....  I find it works well, but I did run into a device that would cause problems if it was made persistent, but wasn't actually connected when I started the Guest OS.... So, I just ended up manually making it available when I needed it.

Hope this helps
Not so much.  I have Guest Additions installed, and I've done all the settings stuff.  By default, the device shows up in the VM's list, with a check  mark next to it,  but I cannot see it in Windows Explorer or any other file dialog.  True for any thumb drive.

Should it be mounted?  Before the VM is started?  Once the VM starts, it is no longer visible in the Device Notifications, even if I shut down the VM.

I have one that I keep plugged in and auto-mounting on boot up (used to keep a daily backup of my email folder).  It isn't visible either.

I've tried it both ways - same, same.  Also tried it with and without the check mark by it - same, same.

It just doesn't seem to want to recognize  thumb drives.

Is there something I can do that might provide more information?

Hmm...  Maybe these are of the type that shouldn't be made persistent - I'll try that....  OK - that didn't make any difference (I didn't restart PCLOS, but I did restart the VM and Win XP).

I can work around it by copying to/from a shared folder, but that's a  pain in the a**.

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline pupthai

  • Hero Member
  • *****
  • Posts: 1424
  • PCLinuxOS 2011 2 - KDE4
Re: usb access in virtualbox
« Reply #4 on: January 02, 2013, 07:31:50 PM »
I don't understand this because mine all work fine. 

All the flash drives should be fat32 by default. 

If I have the PC running and plug in the drive it shows in notifier first but I just ignore it.  If the drive was checked in the list before I start the VB by using the usb set up in VB manager then it just shows up in windows when I start it - use it all the time.  It can then be selected and deselected from the menu bar when VB is running.

When running VB I can eject it and pull it out and the icon in windows Mycomputer goes away and if I plug it back in the icon shows back up and the drive is there and working.

Without it selected in the manager does it pop up the notifier in linux when you plug the drive in?  Don't auto mount it or mount it from notifier that might be the difference I have not done that.  If it is showing the contains in file Dolphin it is busy and can't mount in windows I would think, eject it from dolphin?

I am using the same linux with VB 4.2.4 and Windows XP pro guest.

User names etc should not be related as it is mounting the drive the same way it would a webcam or keyboard.  Have they ever worked for you in the past?

I also have full file shares working with samba between guest and host which makes life easier then dealing with VB shares, but need to be in bridged network adapter mode in the guest to see both internet and host shares.
PCLinuxOS 2011 2 - KDE4
Intel 2 core duo @3.22gig, Asus P5G41/M, DDR2/1066 4gig, ENGT220 DDR3/1gig, 2x Seagate 250gig.

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2229
Re: usb access in virtualbox
« Reply #5 on: January 03, 2013, 12:20:41 PM »
Without it selected in the manager does it pop up the notifier in linux when you plug the drive in?  Don't auto mount it or mount it from notifier that might be the difference I have not done that.  If it is showing the contains in file Dolphin it is busy and can't mount in windows I would think, eject it from dolphin?
Yes, as long as I haven't attempted to mount it in the VM, everything works fine in PCLOS.  It doesn't seem to make any difference whether it is mounted or not before the VM is started.

It's starting to bug me, since  others seem to have solved it.

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline kaptain_zero

  • Full Member
  • ***
  • Posts: 139
Re: usb access in virtualbox
« Reply #6 on: January 03, 2013, 04:52:05 PM »
Sorry, I have not had much time at the console lately, but I just had a few seconds and I tested one of my Kingston DataTraveler 4 GB thumb drive/USB memory stick and I can mount it just fine in my copy of XP. I do not have to have it mounted in PClos... but even if I do, I can still attach it in Vbox/XP. I just did a one time enable a couple of times. When I enable access, I get the "Doing" from XP, but the popup does not come up asking me if I want to go through the files or whatever. Instead I have to open the "My Computer"  icon and then I see the USB drive and can open it from there.

I do have a multicard reader that I regularly read an SD card with some data on it into a windows based program running in Vbox and it has no trouble finding the card in the USB based reader.

Not sure what's up...
Asus M4A78-EM
Phenom II X4 940 Black Edition Quad Core Processor AM2+  OC'd to 3.3GHZ
GeForce 8800 GT
Samsung SCX-4623F all in one monochrome laser

Offline GermanTux

  • Hero Member
  • *****
  • Posts: 693
Re: usb access in virtualbox
« Reply #7 on: January 04, 2013, 06:43:28 AM »

Should it be mounted?  Before the VM is started?  Once the VM starts, it is no longer visible in the Device Notifications, even if I shut down the VM.

I have one that I keep plugged in and auto-mounting on boot up (used to keep a daily backup of my email folder).  It isn't visible either.



Yes, the USB drives should be connected when the VM boots. 

I've seen this issue before, but on a Windows host and Linux guest.  I fixed it by re-installing the guest additions to the guest system (VM).  Also, as said the thumb drive should be formatted with a FAT32 filesystem. 

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2229
Re: usb access in virtualbox
« Reply #8 on: January 04, 2013, 09:07:46 AM »

Should it be mounted?  Before the VM is started?  Once the VM starts, it is no longer visible in the Device Notifications, even if I shut down the VM.

I have one that I keep plugged in and auto-mounting on boot up (used to keep a daily backup of my email folder).  It isn't visible either.



Yes, the USB drives should be connected when the VM boots. 
I  usually do that - I meant logically mounted.

Quote
I've seen this issue before, but on a Windows host and Linux guest.  I fixed it by re-installing the guest additions to the guest system (VM). 
Hmmm...  I'll try that - never crossed my mind.

Retired Senior Chief, Retired Software Engineer, Active GrandPa