restarting VirtualBox kernel module

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
thorn101
Posts: 2
Joined: 27. Jan 2012, 13:54
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu

restarting VirtualBox kernel module

Post by thorn101 »

Hi,
I have setup VirtualBox (4.1.8 with extension pack) so that it catches my external usb harddisk (jmicron samsung story station).
The success of this is very intermittent. When my Mac (Lion 10.7.2) is freshly booted it works, other times it does not and my Mac keeps catching the usb port.
I do not reboot often and would not like to start either.
So, how do I unload the VB kernel module and reload it again, or more precisely what do I need to reload for usb to work in VB again so I don't have to reboot Mac OS X.

My guest OS is ubuntu 11.10 server.

Thanks for your understanding and patience.

Alex
rpmurray
Volunteer
Posts: 918
Joined: 3. Mar 2009, 00:29
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, Mac OS X (various flavors)
Location: Between Heaven and Hell

Re: restarting VirtualBox kernel module

Post by rpmurray »

To keep the Mac host from grabbing the USB storage device use:

Code: Select all

sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext
This will disable all USB storage media temporarily!

When you are finished using the USB storage device in VirtualBox, shut it down, and then do a

Code: Select all

sudo kextload /System/Library/Extensions/IOUSBMassStorageClass.kext
to restore the USB storage functionality in the host.
thorn101
Posts: 2
Joined: 27. Jan 2012, 13:54
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu

Re: restarting VirtualBox kernel module

Post by thorn101 »

Thank you, that did the trick partially. In addition to doing this I also had to reinstall VirtualBox with the extension pack, now it works.
Any idea how I can manually unload and load the VBox.kext's. I can unload,
but when I try to load as per

Code: Select all

sudo kextload -b org.virtualbox.kext.VBoxUSB
for example, it won't.
Also loading the kext directly from

Code: Select all

/Library/Extensions/
with

Code: Select all

sudo kextload VBoxUSB.kext
gives errors about dependency problems.

Anyway I guess I could just keep reinstalling VBox every time it flakes out.

Thanks for your help.
Alex
Post Reply