VMware and Kernel Extentions

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
This entry was posted in Leopard and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. L
    Posted December 24, 2008 at 12:26 am | Permalink

    Just FYI – your blog software is parsing the two hyphens required for the “- -start” and “- -stop” arguments as one single hyphen/emdash when it should be two separate hyphens. Anyone trying to use the command will get errors if they simply copy/paste it from the blog because of this.

  2. Posted December 24, 2008 at 10:36 am | Permalink

    Yeah I had a problem with that. Kinda confusing. Hopefully if anyone has any problems they at least see your comment heh.

  3. Posted February 23, 2009 at 12:03 pm | Permalink

    Nice job,
    but with a few steps you can just keep launching VMware without having two apps:
    - Open VMware Fusion.app in Finder (show bundle contents)
    - go to Contents/MacOS/
    - rename vmware executable to vmware.real
    - place the sniped of shell code from below in a file called vmware in the current folder
    - make the file executable and you’re done

    — snip here —
    #!/bin/bash
    sudo /Library/Application\ Support/VMware\ Fusion/boot.sh –start
    /Applications/VMWare\ Fusion.app/Contents/MacOS/vmware.real
    sudo /Library/Application\ Support/VMware\ Fusion/boot.sh –stop

    – snip here —

    This has only one drawback: It will be undone on the next vmware update

One Trackback

  1. By VMware Kernel Extensions: Update on January 8, 2009 at 12:49 pm

    [...] you haven’t had a chance to check out my article you can view it here. I apologize for the mistake. This entry was posted in Site News. Bookmark the permalink. Post a [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>