Page 1 of 1

[SOLVED]Virtualbox 4.0.8 USB problem (BUT not standard env.)

Posted: 26. Jun 2011, 14:27
by fred.lacrima
Hi,

I am new in this Forum, and happy to join the community :D ... I have more experience using Vmware than Virtualbox BUT ...

Context :
I have do job to be able to run virtualbox on a Intel QNAP NAS (with restriction due to NO VT tech. (it's an ATOM multi-core but without VT))
QNAP run a (limited) not modifiable kernel 2.6.33.2 With lib and utility loaded each time from flash without possibility to mod the init shell and so ...
I choice solution to run inside the QNAP Linux a chroot env. based on Debian Squeeze
and INSIDE this chroot using the Virtualbox repository ... I install the Virtualbox 4.0.8 binary ...

After some mod. to compile the modules ... all is OK
Modules are loaded from the chroot ( I change the vbxodrv shell to use insmod in place of modprobe not available) ... the 3 modules load as well
I provide also a lighttpd server with only phpvirtualbox
and minimum X module need for client side (so we also can run GUI with an external X-Server).
also install : VM_VirtualBox_Extension_Pack 4.0.8 to used RDP

ALL run fine, tested with XP, Windows 2008, Ubuntu server 11.04 and some more (Android, etc.)
Shared resource work as well, Guestaddition when possible ... and RDP work fine (we are in NAS so the standard mode is Headless)

Problem ...
I can't use USB device connected to the QNAP in VirtualBox ... neither listed, neither seen after filter entry.

What I test :
1 ) configuration is as recommended, a virtualbox group (vboxusers) exist and is own /dev/vboxusb (this is correct in Native QNAP env. AND in chroot env. )
usbfs is mounted without arg. by QNAP ...
So I test :
add a mount usbfs with devgid and devmode in chroot ... KO
lsusb correct in QNAP and in chroot.
add a remount with gid and mode in QNAP (remember I can't change the initial init.d mount ... it's in flash before I have the hand ...)
then mount -o bind and /or mount usbfs with same value in chroot ... KO
lsusb correct, and we can see that folder in /proc/bus/usb have vboxusers as group ... (devgid) idem in chroot


So my question is :
Do you have any idea ??? test to do, way to search (I have not yet read all the technical docs.)
Do you thinks it's because I load modules in the chroot and not in native Linux ... (no impact on others services and tools)

I have also tested to add some parameters like I/O APIC ... without success ...

I am impress by the possibility of Virtualbox (more and more when as in QNAP we don't have VT ...) so lot of things run ... but at all I will be very happy if I can also have USB management.

Philippe.

Re: Virtualbox 4.0.8 USB problem (BUT not standard env.)

Posted: 27. Jun 2011, 15:24
by fred.lacrima
Hi,

after some test ...
even if lsusb output all the usb device ...
VBoxManage list usbhost ... is empty

So under root I do a test using :
VBOX_USB=usbfs VBoxManage list usbhost

AND ... all my USB devices are listed ...
BUT not under my user vbox (always empty) that manage virtual machine ...

So Is it possible to have the same things under the vbox user, or even If I use phpvirtualbox I can have a solution to force this value in a file ???

Can you help me ? I don't want to try running Virtualbox under root ...

Philippe.

Re: Virtualbox 4.0.8 USB problem (BUT not standard env.)

Posted: 27. Jun 2011, 15:42
by Perryg
Sounds like you have not added your user name to the vboxusers group.

Re: Virtualbox 4.0.8 USB problem (BUT not standard env.)

Posted: 27. Jun 2011, 16:52
by fred.lacrima
Hi,
Perryg wrote:Sounds like you have not added your user name to the vboxusers group.
Thanks for reply ...

Yes I have add my user "vbox" to "vboxusers" group ...

Code: Select all

vbox@NAS459aPhil:~$ grep vbox /etc/group
vboxusers:x:60001:vbox,root
vbox@NAS459aPhil:~$
root is for testing purpose not use in "normal" usage ...

Philippe.

[SOLVED] Virtualbox 4.0.8 USB problem (BUT not standard env.

Posted: 1. Jul 2011, 19:02
by fred.lacrima
Hi, Just for Information ...

I have solved all my problem ... :lol:
In fact other problem can appear in this special (chroot in close Linux box) environment ...
1 USB ... changing env. variable to force usbfs, even with webservice (more problematic due to internal phpvirtualbox management (user))
2 Use root in the chroot (not a "normal" user) ... it's not a security hole, because, no other I.P. port are open except the one use by virtualbox ... and the jail protect the QNAP Linux against all attacks ...
3 root also permit NAT redirect to work and port < 1024

Si even if we have to change multiple shell, then very special mount ...
All QNAP continue to run (USB include) and all virtualbox 4.0.8 run as well.

Thanks to all for your help ...

Philippe.