Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Virtual Box USB tips

  1. #1
    caf4926's Avatar
    caf4926 is offline Administrator
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    32,791
    Blog Entries
    11

    Default Virtual Box USB tips

    Adding USB Devices in Virtual Box


    USB support is currently only available in the .rpm downloaded from Sun. Downloads - VirtualBox


    Once Virtual Box is installed, make sure you are in vboxusers. Either with the following in konsole:
    Code:
    groupmod --add-user <login_name> vboxusers
    OR: Or open YaST -> Security and Users -> UserManagement, and edit your user and add them to the vboxusers group.



    I am editing this post because USB now works 'Out of the Box'.
    Adding yourself to the vboxusers as quoted above remains true.

    To use a USB device - Simply plug it in, launch Virtual Box but not the machine. Select the machine and then it's USB settings and add. When you click add it will show you a list of available devices on your SUSE host, select what you require and proceed to start the Virtual Machine.
    Last edited by caf4926; 27-Mar-2010 at 21:25. Reason: Remove old info on USB
    Box: 12.1 | KDE 4.8.2 | AMD 64 X2 5200+ | nVidia 8500GT | 4GB RAM
    Lap #1: 12.1 | Duo T4300 | KDE4.8.2 | Intel M4 Graphics | Lenovo G550 | 3GB RAM
    Lap#2: 12.1 | KDE 4.8.2 | Celeron 550 | Intel 965GM | Lenovo R61 | +EeePC | 12.1 | KDE T'Weed
    My_Guides

  2. #2
    malcolmlewis's Avatar
    malcolmlewis is online now Global Moderator
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    11,613
    Blog Entries
    13

    Default Re: Virtual Box USB tips

    Hi
    Excellent howto I do have one question with regard to the usbfs
    entry. Does it not work by just changing the noatuo to auto?

    The reason I ask as I use my GPS and to get it to work in nema mode
    with gpsd, I just change this rather than deleting. I was wondering
    of the impact with other similar devices and using virtualbox.

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
    up 1 day 17:47, 1 user, load average: 0.16, 0.14, 0.13
    ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME


  3. #3
    caf4926's Avatar
    caf4926 is offline Administrator
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    32,791
    Blog Entries
    11

    Default Re: Virtual Box USB tips

    @malcolmlewis
    I'll look in to it, but it may be tomorrow before I can try.
    Box: 12.1 | KDE 4.8.2 | AMD 64 X2 5200+ | nVidia 8500GT | 4GB RAM
    Lap #1: 12.1 | Duo T4300 | KDE4.8.2 | Intel M4 Graphics | Lenovo G550 | 3GB RAM
    Lap#2: 12.1 | KDE 4.8.2 | Celeron 550 | Intel 965GM | Lenovo R61 | +EeePC | 12.1 | KDE T'Weed
    My_Guides

  4. #4
    consused is offline Omniscient Penguin
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    3,418

    Default Re: Virtual Box USB tips

    as user root
    For VirtualBox 2.2.0 on OpenSUSE 11.1 you should add the following to /etc/fstab and delete any other lines with usb:
    Place your user ID in place: eg;devgid=112
    Code:

    /sys/bus/usb/drivers /proc/bus/usb usbfs devgid=XXX,devmode=664 0 0
    Nice howto. Where in the VirtualBox stuff does it state this step is required? For 11.0 maybe, but it shouldn't have been needed since version 2.1.4 and I have installed that and 2.2.0 on 11.1 without any mod to fstab and so have others. It should work with the default usbfs statement. Maybe you know of a particular usb device it's needed for?

  5. #5
    thisoldman is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    57

    Default Re: Virtual Box USB tips

    The HOWTO is very nice but many people have tried the above solution and USB still wouldn't work for them. I do not have the fstab edits that are recommended and USB just works in VirtualBox 2.2.0 (and 2.1.4) for me.

    The thread, Sun Virtual Machine - openSUSE Forums, has a long discussion about this problem. The solution might have been found by hank_se, and clarified for me by consused, if you read well into that series of posts. The files /etc/udev/rules.d/60-vboxdrv.rules and /etc/udev/rules.d/10-vboxdrv.rules are the bad actors, apparently, particularly if both files are present.

    I only have the 10-vboxdrv.rules file. As I said, USB just works.

    I hope someone will find this helpful.

  6. #6
    thisoldman is offline Student Penguin
    Join Date
    Jan 2009
    Posts
    57

    Default Re: Virtual Box USB tips

    I forgot to post the only usb related line, from my fstab.

    Code:
    usbfs  /proc/bus/usb  usbfs  noauto  0  0

  7. #7
    caf4926's Avatar
    caf4926 is offline Administrator
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    32,791
    Blog Entries
    11

    Default Re: Virtual Box USB tips

    I would like to than everyone for their comments so far. It does seem that there are differing experiences and levels of success with USB support. The HowTo can and will be edited if required. Actually my intention was to focus on the steps of adding the device to the VM and the need to have the device removed when actually starting the machine, connecting it only when the VM is up and running. That is my experience anyway. I find the VM locks up at startup if the USB device is connected already.

    All comments and criticisum welcome. Thank you.
    Box: 12.1 | KDE 4.8.2 | AMD 64 X2 5200+ | nVidia 8500GT | 4GB RAM
    Lap #1: 12.1 | Duo T4300 | KDE4.8.2 | Intel M4 Graphics | Lenovo G550 | 3GB RAM
    Lap#2: 12.1 | KDE 4.8.2 | Celeron 550 | Intel 965GM | Lenovo R61 | +EeePC | 12.1 | KDE T'Weed
    My_Guides

  8. #8
    malcolmlewis's Avatar
    malcolmlewis is online now Global Moderator
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    11,613
    Blog Entries
    13

    Default Re: Virtual Box USB tips

    Quote Originally Posted by thisoldman
    The HOWTO is very nice but many people have tried the above solution and
    USB still wouldn't work for them. I do not have the fstab edits that
    are recommended and USB just works in VirtualBox 2.2.0 (and 2.1.4) for
    me.

    The thread, 'Sun Virtual Machine - openSUSE Forums'
    (http://tinyurl.com/cfl9sw), has a long discussion about this problem.
    The solution might have been found by hank_se, and clarified for me by
    consused, if you read well into that series of posts. The files
    /etc/udev/rules.d/60-vboxdrv.rules and
    /etc/udev/rules.d/10-vboxdrv.rules are the bad actors, apparently,
    particularly if both files are present.

    I only have the 10-vboxdrv.rules file. As I said, USB just works.

    I hope someone will find this helpful.

    Hi
    Very true about udev rules, positioning is a big issue. In getting the
    barry utilities (blackberry) to work as a user I needed to move the
    default rule to 65 as it was at 10 as well as some rule tweaks....

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
    up 1 day 22:23, 2 users, load average: 0.07, 0.10, 0.03
    ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME


  9. #9
    consused is offline Omniscient Penguin
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    3,418

    Default Re: Virtual Box USB tips

    Quote Originally Posted by caf4926 View Post
    ...Actually my intention was to focus on the steps of adding the device to the VM and the need to have the device removed when actually starting the machine, connecting it only when the VM is up and running. That is my experience anyway. I find the VM locks up at startup if the USB device is connected already...
    I'm sure I read about that problem with some device or other, but luckily I haven't experienced it with usb sticks. On 11.1/kde 3.5, I plug it in before starting virtualbox, pick it up with the vm's usb filter setting, start up the vm that captures it, and finally the guest os (openSUSE 11.1 gnome) mounts it. On shutting down the vm, 11.1 gets it back with the normal pop-up requesting action - all very smooth. And I've repeated the test hundreds of times over the last couple of weeks. I have also had success with a Zoom guitar effects processor, but no printers where trouble has been reported. Good luck, you could end up with a big howto and lots of comments.

  10. #10
    ikurtram is offline Newcomer
    Join Date
    Oct 2008
    Posts
    33

    Default Re: Virtual Box USB tips

    Good How-To. Appreciate your effort. I've been able to use USB with virtualbox for quite a while now. However, the only issue I have is, usbfs is not being mounted automatically at boot-up. So, after boot-up, if I run mount -a as root and then run VirtualBox (as user), usb support is enabled. If I forget to execute mount -a manually, usb support is disabled.

    Here is the line from my fstab. Anyone know how to change it so that it is automatically mounted at boot-up?

    Code:
    /sys/bus/usb/drivers   /proc/bus/usb   usbfs    auto,devmode=664,devgid=119   0 0
    Thank you

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO 3.5.2