Page 1 of 1

restarting VirtualBox kernel module

Posted: 27. Jan 2012, 14:16
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

Re: restarting VirtualBox kernel module

Posted: 27. Jan 2012, 15:30
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.

Re: restarting VirtualBox kernel module

Posted: 27. Jan 2012, 19:59
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