WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Latest Virtualbox doesn't detect USB devices  (Read 18236 times)

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Latest Virtualbox doesn't detect USB devices
« on: May 27, 2011, 03:11:16 AM »
I updated to the latest virtualbox-ose.tcz (4.0.8) and now no USB devices are detected.

When trying to edit settings I get an error:

Failed to access the USB subsystem

Could not load the Host USB Proxy Service
(VERR_FILE_NOT_FOUND). The service might not be installed on the host computer.

/U
« Last Edit: May 27, 2011, 03:33:05 AM by uggla »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Latest Virtualbox doesn't detect USB devices
« Reply #1 on: May 27, 2011, 11:39:15 PM »
Same here.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Latest Virtualbox doesn't detect USB devices
« Reply #2 on: May 28, 2011, 09:18:20 AM »
i can confirm that, too.

the 4.0.4-version works fine... with the same configuration.
... so it should be the 4.0.8-version.
« Last Edit: May 28, 2011, 09:42:40 AM by netnomad »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Latest Virtualbox doesn't detect USB devices
« Reply #3 on: May 29, 2011, 12:47:43 AM »
Well, this was a bit a tricky one to nail as I did not have any older version of the 'virtualbox-ose.tcz' extension for comparison. So I had to use the generic 32-bit builds from the VirtualBox download page (like this one here) and compare it against it's older versions. As it turns out the reported USB issue had already started in v4.0.6 and could be reduced down to the problem that VBoxManage list usbhost (when executed as user 'tc') reported '<none>' whilst running it as 'root' (or as user 'tc' in v4.0.4 and presumably beforehand) produced a meaningful output. The changelog mentioned several USB related bug fixes since v4.0.4 so there was any chance that one of those would have caused this regression.

I therefore embarked on a series of more tests and further careful comparison of the three packages lead to the following code snippet from a file called 'vboxdrv.sh'. These few lines were first added in v4.0.6 and received a minor correction in v.4.0.8:
Code: [Select]
    # Create the /dev/vboxusb directory if the host supports that method
    # of USB access.  The USB code checks for the existance of that path.
    if grep -q usb_device /proc/devices; then
        mkdir -p -m 0750 /dev/vboxusb 2>/dev/null
        chown root:vboxusers /dev/vboxusb 2>/dev/null
    fi
And indeed replicating those commands with 'virtualbox-ose.tcz' installed and manually creating a '/dev/vboxusb' directory (with the correct permission and ownership) required just a logout/login sequence (to pick up the 'vboxusers' group membership for user 'tc') for the VBoxManage list usbhost command to succeed. Not only that, but the tested USB devices were indeed afterwards available in the VM and working as expected.

I guess it is for the extension maintainer to decide whether these additional commands should be included in the extension startup file (i.e. '/usr/local/tce.installed/virtualbox-ose') or in the "vbox driver" startup script (i.e. /usr/local/etc/init.d/vboxdrv').

Over the course of this investigation I encountered a few things that might be worth sharing as it could help other users in the future:
  • The installation of the VirtualBox Extension Pack (e.g. to be able to test USB 2.0 devices) failed for me initially. I then had to fix the complaint by FILE=/usr/local/lib/virtualbox/VBoxExtPackHelperApp ; sudo cp -a /tmp/tcloop/virtualbox-ose${FILE} $FILE and was then able to install it (as user 'root') either through the GUI or the CLI (e.g. via sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.8-71778.vbox-extpack).
    I believe this means that this particular file needs to be added to those that are already being copied in the extension startup script.
  • There are ways to avoid the mildly annoying logout/login sequence to pick up the added group membership (i.e. 'vboxusers') when installing the extension for the first time: for me su -p -c sh tc worked. But this is more for users who actually understand what this command does (as all other shells are still running without the added group, and one would need to also execute 'wbar.sh' for the WBAR to pick up the change which would only then allow clicking the VBox icon and expecting that the resulting 'VirtualBox' GUI process to have picked up the added group as well). Therefore it looks to me that the advice to logout and login when installing 'virtualbox-ose.tcz' for the first time (or after manually adding the '/dev/vboxusb' directory until the extension is fixed) remains valid for the majority of users.
  • Here are the steps that I undertook to use a generic Linux build from the VirtualBox download page (apart from downloading said file):
    tce-load -wi compiletc linux-headers-$(uname -r) as during the installation the kernel modules will have to be build from source,
    tce-load -wi Xorg-7.5 SDL glib2 OSS to satisfy the applications dependencies (note: 'glib2' is not required if one does not need the 'VirtualBox' GUI and is happy to just use 'VBoxManage' to define and control VMs and 'VBoxSDL' to start them, 'OSS' is only needed if one wants to use sound in the VMs and one then needs to select it in the VM  configuration, 'alsa' can be used as an alternative on the host instead of 'OSS', BUT do not install both!!),
    sudo chown root:root /opt to work around an otherwise fatal problem with the application as ownership of 'root:staff' won't do it,
    one could then install the pre-build application (e.g. via sudo sh VirtualBox-4.0.8-71778-Linux_x86.run) into '/opt' and would have to add the group membership (e.g. via sudo addgroup -S vboxusers ; sudo addgroup ${USER} vboxusers) and fix the '/dev/vboxusb' problem (e.g. via sudo chown -R root:vboxusers /dev/vboxusb) to be able to undertake some testing.
    BTW, it appears that several of the last few commands are required as an installation script uses the possibly less frequently used 'groupadd' command instead of the 'addgroup' command that BusyBox supports. I'll try to raise a bug report with VBox about this, but it is certainly not a high priority one.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Latest Virtualbox doesn't detect USB devices
« Reply #4 on: June 02, 2011, 04:34:42 AM »
i made a few changes which should fix usb devices support in tiny core host
you need to download and install oracle's extension pack as stated in virtualbox-ose.tcz.info

also oracle's extension pack needs to be installed for windows hosts too, it is too easy just download and double click

test pls

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Latest Virtualbox doesn't detect USB devices
« Reply #5 on: June 02, 2011, 05:56:25 AM »
hi arslan,

all previous versions ran just perfect for me, but i don't have luck with the 4.0.8, although i followed your advices.

i use your newest tc-updates of virtualbox and oracle's extensions.
i installed the oracle's extension pack without any errors and the started virtualmachine shows the usb-info-ballon with the message that no usb-devices are attached (there are two usb-sticks inserted).
without the extension pack no usb-message-window appears.

... so probably the usb-system of the tinycore-host offers not the right permissions for the virtualmachine?

thanks for your help.

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Latest Virtualbox doesn't detect USB devices
« Reply #6 on: June 02, 2011, 09:46:11 AM »
Trying to install the extension pack I get:

/home/tc/downloads# sudo VBoxManage extpack install Oracle_VM_VirtualBox_Ext
ension_Pack-4.0.8-71778.vbox-extpack
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/home/tc/downloads/Oracle_VM_VirtualBox_Extension_Pack-4.0.8-71778.vbox-extpack": The installer failed with exit code 1: VBoxExtPackHelperApp: error: The owner is not root: '/usr'

Should I change permissions for something?

/U

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Latest Virtualbox doesn't detect USB devices
« Reply #7 on: June 03, 2011, 07:15:56 AM »
the last update works fine!
is there a way to install the extension-pack per script, when i load virtualbox ondemand?
is it possible to put it in the dep-file?

there is a further inconveniece:
if i start virtualbox without the extension-pack, and start a win-machine on the tc-host, the usb-devices are detected, but not to use.
after the installation of the extension-pack, new inserted usb-sticks are not refreshed or hotplugged that i can mount them.

so i see the only way:
after booting tinycore the extension-pack has to be installed before i start the virtual-machine.

thanks for your help.
« Last Edit: June 03, 2011, 07:34:51 AM by netnomad »

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Latest Virtualbox doesn't detect USB devices
« Reply #8 on: June 03, 2011, 07:37:32 AM »
oracle extension pack can be tcz extension but only if license permits
http://www.virtualbox.org/wiki/VirtualBox_PUEL

also isn't it enough to install extension pack once every vbox update ?

Edit: the answer is no, see #7
http://www.virtualbox.org/wiki/Licensing_FAQ

« Last Edit: June 03, 2011, 07:42:22 AM by Arslan S. »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Latest Virtualbox doesn't detect USB devices
« Reply #9 on: June 05, 2011, 02:44:56 AM »
Code: [Select]
tc@box:~$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack.vb
ox-extpack
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/home/tc/Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack": The installer failed with exit code 1: VBoxExtPackHelperApp: error: argv[0] does not match the executable image path: '/usr/local/lib/virtualbox/VBoxExtPackHelperApp' != '/tmp/tcloop/virtualbox-ose/usr/local/lib/virtualbox/VBoxExtPackHelperApp'
tc@box:~$

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Latest Virtualbox doesn't detect USB devices
« Reply #10 on: June 05, 2011, 09:38:41 AM »
Code: [Select]
tc@box:~$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack.vb
ox-extpack
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/home/tc/Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack": The installer failed with exit code 1: VBoxExtPackHelperApp: error: argv[0] does not match the executable image path: '/usr/local/lib/virtualbox/VBoxExtPackHelperApp' != '/tmp/tcloop/virtualbox-ose/usr/local/lib/virtualbox/VBoxExtPackHelperApp'
tc@box:~$

did you update your copy of virtualbox-ose.tcz ?
tce.installed script copies those files to root file system
check
Code: [Select]
ls -l /usr/local/lib/virtualbox/VBoxExtPackHelperAppit shouldn't be a symlink

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Latest Virtualbox doesn't detect USB devices
« Reply #11 on: June 05, 2011, 08:02:58 PM »
Oops you are right. After updating, install proceeds.

But it still reports no access to the usb system? I did the extra lines ion bootlocal, and also tried onboot, but no difference. I wonder if you could post some step-by-step instructions that I could replicate to try again?

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Latest Virtualbox doesn't detect USB devices
« Reply #12 on: June 06, 2011, 04:16:39 AM »
Oops you are right. After updating, install proceeds.

But it still reports no access to the usb system? I did the extra lines ion bootlocal, and also tried onboot, but no difference. I wonder if you could post some step-by-step instructions that I could replicate to try again?

steps are in virtualbox-ose.tcz.info file

1-) download and install oracle's extension pack
2-) put virtualbox-ose.tcz in your onboot.lst and reboot

you should have access to /dev/vboxusb
try changing directory to that folder if fails make sure you are in vboxusers group


Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Latest Virtualbox doesn't detect USB devices
« Reply #13 on: June 06, 2011, 06:15:14 AM »
OK thanks it now works.

New propblem: When in OnBoot mode, no icon gets installed in wbar. But it does in OnDemand.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Latest Virtualbox doesn't detect USB devices
« Reply #14 on: June 06, 2011, 07:15:09 AM »
OK thanks it now works.

New propblem: When in OnBoot mode, no icon gets installed in wbar. But it does in OnDemand.

it is a simple issue, i have recently changed icon name from VBox.png to virtualbox.png which is not reflected in .desktop entry yet