dj_9dw
Last Updated: February 25, 2016
·
3.213K
· fardjad
User

How to fix VirtualBox error "Failed to open /dev/vboxnetctl: No such file or directory" on OSX Mavericks

Update:
This issue has already been addressed in version 4.3+

I was trying to start a Vagrant VirtualBox VM on OS X Mavericks (Developer Preview) and got the following error message:

Failed to open /dev/vboxnetctl: No such file or directory

After some research, I found this issue on VirtualBox bug tracker.

Startup Items are deprecated since OSX 10.4 and Apple dropped support for them in Mavericks. VirtualBox still uses Startup Items to load its kernel extensions and that's why they can't be loaded at startup.

As a workaround I:

1- Moved /Library/StartupItems/VirtualBox to /opt/VirtualBox/ (actually you can place it wherever you like)

2- Wrote a launchd script and placed it in /Library/LaunchDaemons/org.virtualbox.startupscript.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.virtualbox.startupscript</string>
    <key>ProgramArguments</key>
    <array>
      <string>/opt/virtualbox/VirtualBox</string>
      <string>start</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

3- Loaded the script with:

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startupscript.plist

Hope this helps.

Say Thanks
Respond