LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB support for virtualbox (https://www.linuxquestions.org/questions/linux-newbie-8/usb-support-for-virtualbox-665471/)

Brian H 08-26-2008 05:50 AM

USB support for virtualbox
 
I am running Windows XP as a virtual machine and everything works great except I don't have access to my flash drives. I have the USB filter turned on but when I click the + sign (on the right side of the list of filters) to configure them to the host devices it shows "no devices available". Any ideas?

jay73 08-26-2008 05:53 AM

The community version of VirtualBox may not support USB - it certainly did not when I last checked.

bitpicker 08-26-2008 07:06 AM

Quote:

Originally Posted by Brian H (Post 3260025)
I am running Windows XP as a virtual machine and everything works great except I don't have access to my flash drives. I have the USB filter turned on but when I click the + sign (on the right side of the list of filters) to configure them to the host devices it shows "no devices available". Any ideas?

An idea for a workaround which I just tested: I am using the OSE edition which does not support USB. However, the surrounding Linux does; so I put in a USB stick, which gets mounted to /media/disk-1 on my Ubuntu system.

Next, in the menu of your VM use devices -> shared folders and set up a shared folder with the directory /media/disk-1 (in my case).

You can connect this directory via Explorer using the 'connect network drive' feature.

Robin

Brian H 08-26-2008 09:36 PM

I'm sure that will work wonderfully . . . now, pretend that I knew nothing about computers. By Explorer, do you mean Internet Explorer? Then, where is the "connect network drive" feature. Sorry, but I need a step-by-step guide here.

pinniped 08-26-2008 09:42 PM

USB support is in the paid-for version. Now that you're hooked, fork over the dough!

bitpicker 08-27-2008 01:24 AM

Quote:

Originally Posted by Brian H (Post 3260898)
I'm sure that will work wonderfully . . . now, pretend that I knew nothing about computers. By Explorer, do you mean Internet Explorer? Then, where is the "connect network drive" feature. Sorry, but I need a step-by-step guide here.

First off, I just discovered there's a snag: this morning when I tried to boot the virtual machine it wouldn't do so unless I put in the USB stick. I guess you could use that effect as a security feature...

OK, you've booted the virtual box Windows, and you have connected a USB stick, so that it is available in Linux.

In Windows, open the Explorer; that's not the Internet Explorer but the file Explorer, the file management tool Windows comes with (it actually is the same program as Internet Explorer more or less, but you don't need the internet features here. Confusing, I know, but I never said Windows was easy.).

The Explorer is either in the Accessories group of programs or you can get at it by right-clicking the start button; you can also open 'My Computer', what you see there is one of the many faces of the Explorer.

In the menu of Virtual Box itself there should be an entry called 'Device' (I'm translating from my German version here, so what I tell you might not exactly match your situation). The device menu has entries such as add / remove CD ROM etc. One entry should say 'shared folders' or something like that; it is the second from the bottom, just above 'install guest additions' (which is something you might have to do first: install the guest additions).

Click 'shared folders', and you'll see a directory structure with not much in it. There is an 'add' button (folder with a green plus sign). Click that, and you can choose any directory on your regular computer (the Linux system) to be listed here. You can do that for any folder, including the folder where your USB stick got mounted.

Once you have included that folder and clicked OK, you can add the folder to Explorer using the Explorer menu entry 'Extras' (it's the second from the right, next to the question mark) and in that drop down menu 'add network drive'. Choose any free drive letter such as Z:, then use 'browse' to find the USB drive. It is in 'Virtual Box Shared Folders' in the network environment you're presented with.

Afterwards you can access this folder just like any other. You should take care to disconnect the network drive and remove it from the shared folders list in Virtual Box before powering it down, or else you end up like I did with no access to your virtual machine unless you stick that USB stick back in.

Robin

keratos 08-30-2008 04:31 AM

Brian, hi! me again...

We got so far on your previous thread http://www.linuxquestions.org/questi...kernel-664401/ remember we were discussing "lsusb".

You need to clarify to this forum that you have the VB binaries (i.e. not OSE Virtual Box) installed and that you want access to all USB devices, not just MSD (Memory Sotrage Devices).

I dont run ubuntu but the steps you might want to follow are:

1. Identify if the kernel has recognised a USB device (I thought the command was lsusb on ubuntu). This should basically print out the device info stored in the USB chips.

2. Identify if a suitable kernel module has been loaded to act as a driver to the device (lsmod)

3. If your system has HAL running , check to see if the daemon has detected and connected the USB device.

4. As root user, start VB and see if you can connect to the USB filters.

5. If you cannot do this as a "normal" user you probably need the devfs usb fix that mounts the USB filesystem so that users can access USB devices. Its probably worth trying this anyway Brian. Simply add the following to your /etc/fstab file and reboot
Code:

none            /proc/bus/usb            usbdevfs        defaults  0  0
Check out this link Brian.

http://www.linux-usb.org/USB-guide/c122.html

Brian H 08-31-2008 01:13 PM

Thanks to everyone. I'm going to try to boot windows as the OS and VM ubuntu. I already have the program and know people who are doing it that way so they can actually come over if I have a problem. Needless to say, don't worry about still trying to get me usb support. I promise I still won't be a stranger to this site.

keratos 09-01-2008 03:13 PM

not sure what that means to the original problem.

is it fixed or not?

axelfc 09-01-2008 03:37 PM

Quote:

Originally Posted by Brian H (Post 3265385)
Thanks to everyone. I'm going to try to boot windows as the OS and VM ubuntu. I already have the program and know people who are doing it that way so they can actually come over if I have a problem. Needless to say, don't worry about still trying to get me usb support. I promise I still won't be a stranger to this site.

This should help you.

How to install Linux on Windows using VirtualBox

Chatin 02-12-2010 02:07 PM

Thank you!!!
 
Thank you bitpicker!

I was never able to figure out how to get the 'shared folders' in VB to work on my Win 7 guest before but this did it. Thanks a lot for taking the time to write out the process.

(sorry for bumping such an old thread but I had to register just to thank you :)


Quote:

Originally Posted by bitpicker (Post 3261034)
First off, I just discovered there's a snag: this morning when I tried to boot the virtual machine it wouldn't do so unless I put in the USB stick. I guess you could use that effect as a security feature...

OK, you've booted the virtual box Windows, and you have connected a USB stick, so that it is available in Linux.

In Windows, open the Explorer; that's not the Internet Explorer but the file Explorer, the file management tool Windows comes with (it actually is the same program as Internet Explorer more or less, but you don't need the internet features here. Confusing, I know, but I never said Windows was easy.).

The Explorer is either in the Accessories group of programs or you can get at it by right-clicking the start button; you can also open 'My Computer', what you see there is one of the many faces of the Explorer.

In the menu of Virtual Box itself there should be an entry called 'Device' (I'm translating from my German version here, so what I tell you might not exactly match your situation). The device menu has entries such as add / remove CD ROM etc. One entry should say 'shared folders' or something like that; it is the second from the bottom, just above 'install guest additions' (which is something you might have to do first: install the guest additions).

Click 'shared folders', and you'll see a directory structure with not much in it. There is an 'add' button (folder with a green plus sign). Click that, and you can choose any directory on your regular computer (the Linux system) to be listed here. You can do that for any folder, including the folder where your USB stick got mounted.

Once you have included that folder and clicked OK, you can add the folder to Explorer using the Explorer menu entry 'Extras' (it's the second from the right, next to the question mark) and in that drop down menu 'add network drive'. Choose any free drive letter such as Z:, then use 'browse' to find the USB drive. It is in 'Virtual Box Shared Folders' in the network environment you're presented with.

Afterwards you can access this folder just like any other. You should take care to disconnect the network drive and remove it from the shared folders list in Virtual Box before powering it down, or else you end up like I did with no access to your virtual machine unless you stick that USB stick back in.

Robin



All times are GMT -5. The time now is 03:00 AM.