USB is enabled in VBox GUI but not in my VM

Discussions related to using the OSE version of VirtualBox.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

what does lsmod | grep vb show?
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

rvilbig@RicV-M4500:~/vbox/VirtualBox-5.0.6/out/linux.amd64/release/bin$ lsmod | grep vb
vboxdrv 446785 0
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

I would expect to see something closer to mine.

Code: Select all

perry@perry-main ~ $ lsmod | grep vb
vboxpci                24576  0 
vboxnetadp             28672  0 
vboxnetflt             28672  0 
vboxdrv               458752  3 vboxnetadp,vboxnetflt,vboxpci
It looks to me like your build is not completing properly and the modules are not being loaded.
did you build the hardened version? And if so did you do the linking?
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

I disabled hardening. The modules are indeed built. But due to a stupid mistake on my part, they were not loaded. Having fixed that, I now do see all four drivers, but still have the same symptom and still do not have a /dev/vboxusb.

Code: Select all

rvilbig@RicV-M4500:~/vbox/VirtualBox-5.0.6/out/linux.amd64/release/bin$ lsmod | grep vb
vboxpci                23273  0 
vboxnetflt             27880  0 
vboxnetadp             25670  0 
vboxdrv               446785  3 vboxnetadp,vboxnetflt,vboxpci
rvilbig@RicV-M4500:~/vbox/VirtualBox-5.0.6/out/linux.amd64/release/bin$ ls /dev/vb*
/dev/vboxdrv  /dev/vboxdrvu  /dev/vboxnetctl
rvilbig@RicV-M4500:~/vbox/VirtualBox-5.0.6/out/linux.amd64/release/bin$ ./VBoxManage list usbhost
Host USB Devices:

<none>

rvilbig@RicV-M4500:~/vbox/VirtualBox-5.0.6/out/linux.amd64/release/bin$ 
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

It still appears that your build has issues. Hard to tell what but you can verify this by installing the pre-compiled build ".deb" also available from the same location you got the tarball.
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

Is the precompiled deb file still an OSE build? Because as you explained to me a few weeks ago in the "Local VBox build fails, kernel driver not found" thread, the installed version and locally build version are imcompatible.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

No it is not OSE it is PUEL and no they are not compatible in the fact they can not be installed at the same time. One must be removed before the other can be installed/used.
But it is all but impossible to know where your build is failing. I would need to see a lot of different information to be able to hopefully trace this out.

1) the content of the LocalConfig.kmk
2) the exact ./configure line used. ( showing switches )
3) the configure.log
4) the complete build as it is being compiled ( usually tee to file ) start to finish.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

I do have one other question. I didn't pick up on this earlier but you have two extension packs installed. One is the normal one and you also have one that says it is dtrace. Can you explain this?
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

I think I need to set up a different boot partition, then; one for OSE and one for PUEL. I will endeavor to make them the same otherwise. I will have to do that when I get home, as I am on a business trip now and heading to the airport in a few hours. Meanwhile I will try to figure out why I can't build 506 with logging enabled.

The configure command is as follows: configure --disable-hardening

I have attached the configure.log, and the log from kmk all — I assume that is what you mean by #4 above. I wasn't sure which LocalConfig.kmk you wanted, so I included all that I could find.

As for the second extension pack, I really have no idea. I never even heard of VBox extension packs until a couple of days ago when I started trying to access the USB memory stick from my VM. The VBoxManage usage screen doesn't even show it (apart from the list command). So I just installed the one I needed for USB access based on topic(s) found here and/or the Ubuntu forum, and was also surprised to find there were two installed when I tried to see if my installation had been successful.
Attachments
RicV_2015-10-09.tar.gz
(158.66 KiB) Downloaded 33 times
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

OK, I created a separate boot partition with fresh installation of Ubuntu 14, then installed the VBox 5.0.6 distribution along with extension pack and guest additions, then added myself to the vboxusers group. With that, I was indeed able to access the USB stick. But going back to the OSE environment, the problem persists with 5.0.6.

The only thing I could see different in the two environments was the extra extension pack you noticed in the OSE version last week was not there in the PUEL version. I tried just removing that, since neither of us knows what it is, but it made no difference. Not really surprised, but wanted to eliminate variables.

Maybe a build error? I'm not sure how to look into that. I am using OSE 5.0.6 as downloaded, except for commenting out two log statements that cause compile errors when built with LOG_ENABLED=1.

The only other difference I can think of is the dozens and dozens of packages that I had to download to build the OSE version, but skipped in setting up the PUEL version.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

Have a look at my post on how I build. viewtopic.php?f=31&t=70118

I do make it installable but the packages are the same.
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

Thanks, Perry, that was very helpful. I followed the instructions in your other thread verbatim, on the same machine on which I had been building all along (apart from installing all those packages, which I had done before). Then I ran the resultant installer on a fresh new Ubuntu 14 installation, added the extension pack, added myself to vboxusers group, and now I can see the USB stick on the host.

The only differences between what I had been doing and these instructions are, I think, the following:

— SVN checkout (58156) vs. using the OSE bzip2 file downloaded from the web site

— Hardened vs. unhardened build

— I had been building with LOG_ENABLED=1 whereas I did not when following your instructions

— Root directory name in which I did the build (~/virtualbox vs. ~/vbox/ose506)

— Installed on fresh machine vs. run directly from the build directory

I do have one follow up question. I thought from these instructions
https://www.virtualbox.org/wiki/Linux%2 ... structions
that with a hardened build several additional steps would be required to "make sure that the setuid stubs have the correct permissions"; is that what kmk packing does?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

hardened builds are what sets up the setuid, packing builds the binaries for install.

One of the reasons I go through the extra steps to create the hardened build and make it installable is to avoid forgetting to do something that usually bites me in the end. ( pun intended )
Plus I create a script to do it all anyway from start to finish so it all goes really fast. Start to installed in under 5 minutes. I also personalize my builds and include extra must have for me options.
LocalConfig.kmk really is your friend!

Now a word about building from SVN. This is really bleeding edge. At this place in the 5.* tree it isn't so bad but the further in they go they start including new features that will be available with the next major release. Most of the time if there is an issue one of us that builds SVN all the time usually finds it and passes the correction or at least notifies the DEVs that there is an issue. Just a little heads up so you know but don't let that dissuade you from using it. All I use on my DEV unit is SVN and I rarely have an issue. Oh and one of the other reasons for building installable version is I can easily revert to a previous build if the new one fails.
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: USB is enabled in VBox GUI but not in my VM

Post by RicV »

Thanks again. I would prefer to work with the bzip2 version rather than SVN exactly because I want a stable environment for my project, which is about implementing a virtual device to plug in to VBox. And that seems unlikely as a culprit for my problem, so I am expecting to find one of the other points is the culprit.

I agree with you on building the hardened version and installing it properly.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB is enabled in VBox GUI but not in my VM

Post by Perryg »

You can of course use this instruction to build your own using the tarball. This is actually the way I test the tarball for issues, but again I always build hardened and make it installable. You can build unhardened and still make it installable but you have to be careful to not pass that build to anyone due to the access they would have to the host. Just keep it local.
Post Reply