VMware and Kernel Extentions

by postbreak

If you own an Intel Mac you probably have a virtualization application of some sort for the rare instances you need to run Windows or even linux. I am a fan of VMware Fusion for it’s correct handling of linux operating systems and better USB passthrough support. One of the few problems with VMware is the need for its complex kernel extensions. These kernel extensions allow for shared folders between OS’s, great networking, and faster virtual machines. In theory these kernel extensions would be loaded at the boot up of VMware Fusion but that’s not the case. VMware starts these extensions at boot up and doesn’t unload them until you shutdown your Mac.

That drives me insane.

Starting up my Mac in verbose mode showed just how long it took for VMware to load it’s precious kernel extensions and at one point shutdown skyrocketed to an amazing 2 minutes 6 seconds. Enough is enough.

After a few online searches I found a great article detailing how to automatically load and unload the kernel extensions when you launch VMware and so far it has worked wonders for my boot, sleep, and shutdown time.

Basically what you need to do is remove the com.plist file that VMware launches on startup. Launch terminal and enter these commands.

cd /Library/LaunchDaemons

cp com.vmware.launchd.vmware.plist /Users/YOURUSERNAME/Desktop/

sudo rm com.vmware.launchd.vmware.plist

Now with those commands you have backed up your plist to your desktop and removed the currently running one. Reboot your computer and fire up Automator.

In Automator create a custom workflow.

  • Add “Run Shell Script”
  • type “sudo /Library/Application\ Support/VMware\ Fusion/boot.sh – -start”
  • Add Launch Application
  • Select VMware
  • Save as an Application with a name of your choice.
Click New
  • Add Quit Application
  • Select VMware
  • Add “Run Shell Script”
  • type “sudo /Library/Application\ Support/VMware\ Fusion/boot.sh – -stop”
  • Save it as an Application with a name of your choice
You’re not done yet. It turns out that these Automator applications barf because they do not prompt for your administrator password. Well you can circumvent this with a little UNIX tweak.

Open your Terminal and type:

“EDITOR=/usr/bin/nano sudo visudo”

Go to the bottom of this file and type this out exactly:

ALL ALL= NOPASSWD: /Library/Application\ Support/VMware\ Fusion/boot.sh

Double check your typing and hit control-o. Congratulations, you’re finally done. Now enjoy your mac without those kernel extensions slowing every aspect of your Mac down. Many thanks to Fishman to fixing my sudoers line so it actually works.

Source – Koos Kaspers