Use Mountain Lion in VMware Fusion with Tools

Note: As of VMWare Fusion 4.1.2, this hack is no longer necessary. I’ve left it here mainly for those using older versions of Fusion (though you may not be able to install newer Mountain Lion previews on those older versions of Fusion).

If you’re a Mac developer with access to OS X Mountain Lion, you might want to use it in a virtual machine. This is simple in VMware Fusion, but if you try to install VMWare Tools, Mountain Lion will kernel panic. Unfortunately, using virtual OS X without VMware Tools installed is painful—no screen resize, captured and laggy mouse, etc. So here’s a workaround to get Mountain Lion working with VMware Tools (this assumes you have Mountain Lion already running in a virtual machine):

  1. Make a snapshot of your current setup!
  2. Run the VMWare Tools installer, but do not reboot when it’s done. Just leave the installer running onscreen.
  3. Navigate to /Library > Application Support > VMware Tools.
  4. Delete vmmemctl.kext and vmmemctl
  5. Edit (you’ll need root power) services.sh in that same directory.
  6. Comment out these two lines (they’re shown commented out, via the # in front of each):
    #kextload '/Library/Application Support/VMware Tools/vmmemctl.kext'
    #'/Library/Application Support/VMware Tools/vmmemctl'
  7. Save the edited file, quit the editor, and now (via the still-running Installer) reboot the virtual machine.

The initial reboot may take a long time, but it should work. If it doesn’t, you’re on your own, as I’ve now exhausted all my knowledge on the topic.

29 Responses to “Use Mountain Lion in VMware Fusion with Tools”

  1. berad Says:

    Waiting for reboot now. May I ask how you figured this out?

  2. robg Says:

    I did a bit of digging, and spoke with some friends who know lots about virtualization. Please let me know if it works; I did one other thing that I didn’t think was required, so didn’t include it here. If it turns out it doesn’t work for you, I’ll have to add it and hope that’s the missing bit.

    regards,
    -rob.

  3. berad Says:

    Rob it works as far as I can tell, thanks a lot. The curser seems kinda glitchy but that might be the way it is.

  4. robg Says:

    If you resize a window, do you get the new higher resolution? If so, then yea, then it’s working.

    -rob.

  5. Scott Little Says:

    This worked great for me thanks!

  6. Matt Long Says:

    I already installed the tools and then rebooted and got a kernel panic that wouldn’t go away, so I found your post too late. It was still helpful, though. Here’s what I did.

    1. Boot into single user mode by rebooting the VM and quickly giving focus to the screen and holding Command-S. If you don’t do this quick enough, you’ll miss the window of opportunity.

    2. Once you get the root prompt, type: /sbin/mount -uw /
    to mount the drive with write permissions

    3. cd to /Library/Application Support/VMWare Tools

    4. Delete the files you mention and then edit the services.sh file using vi and make the changes you noted.

    I was able to get it to boot and the tools seem to be working correctly.

    Thanks.

  7. Aaron Kulbe Says:

    @Matt Long – this can actually be done easier with just holding the Shift key down during the boot, and going into Safe Boot mode. ;)

  8. hany Says:

    osx 10.8 runs in 32bit kernel mode also..

    macpro:~ hany$ uname -a
    Darwin macpro.local 12.0.0 Darwin Kernel Version 12.0.0: Mon Jan 30 18:40:46 PST 2012; root:xnu-2050.1.12~1/RELEASE_I386 i386

    Tools are ok, thank you Rob :)

  9. dave Says:

    Works great, many thanks Rob!

    Do you need to delete the kext and script even though you commented out the startup lines in services.sh?

  10. Patrick Bailey Says:

    You da man Rob! Works great!

  11. Jan Smit Says:

    Great job, Rob !! Kudo’s from Amsterdam

  12. David Says:

    How does one use command-S in the startup? All I get is a snapshot window.

  13. Rene Says:

    @David. Set the machine in full screen before reboot and direct click after that followed with Command S. You will se direct the single user load mode.

    @Matt Super – you saved my day here.

  14. Ben King Says:

    If you don’t load it you don’t need to unload it…

    In services.sh the line that unloads vmmemctl.kext should also be commented out.

    If you have not already become accustomed to VI and have no intention to memorize VI commands then use nano for these quick tasks. Is easier to pick up and included in the OS.

    I followed your instructions and was able to boot into ML after the tools install.

  15. Tanner Osborn Says:

    Can someone explain step 5 in a bit more detail? When I try to edit services.sh in text edit, it says it’s locked and it makes a duplicate somewhere else instead of changing the original. If I open services.sh in the Console instead of text edit, I can look at the code but I don’t see a way to edit it.

    He says you need “root power” to edit it. I’ve changed the permissions of the file, and I’m administrator, but I still don’t see how to edit services.sh. Any help?

    tl;dr Can’t edit services.sh; how do I get root power?

  16. Samuel Herschbein Says:

    Worked for me, many thanks Rob!

  17. robg Says:

    Tanner:

    The easiest way to do this is to download BareBones’ free TextWrangler; it should be able to edit the file as it exists, saving when you provide your admin password. (I _think_ that’s how it works; it’s been a long time since I tried it.)

    -rob.

  18. Fred Hall Says:

    Thanks man…..this helped immensely!

  19. Raul Rodriguez Abad Says:

    Excelente trabajo Rob!!! ha sido super util… Estaba a punto de abandonar hasta que encontre la informacion en tu Blog… Muchisimas gracias!!!

  20. shurai Says:

    Cheers!
    Just installes Preview3. This cheat save my ass!

    - shurai

  21. Ashish Says:

    Hello,
    i just installed preview 3 and did this suggested tweak. now whenever i recycle mountain Lion i get a garbled login screen. it wont let me even login.

    any suggestions

    ashish

  22. robg Says:

    With Fusion 4.1.2, you shouldn’t need this tweak. With that said, I can’t imagine that the tweak would have any impact on a garbled login screen: I occasionally get that even in 10.7 and 10.6 virtual machines. The fix is to use the menu to change the screen mode to/from full screen and single window; that usually solves the problem for me.

    -rob.

  23. lintile Says:

    The garbled login screen was fixed for me by turning the 3d acceleration on in the VM settings.

    (Unsing VMWare Fusion 4.1.3)

  24. Marcel Says:

    Upgraded a virtual 10.7.4 to 10.8 FINAL and run into kernel panic … Started in Single User Mode, deleted the files (vmmemctl.kext and vmmemctl) and outcommented the two lines inside services.sh and – IT WORKS. :)

    Great guide!

  25. lcc_mactech Says:

    I am not sure if this thread is still relevant, but I was able to successfully run OSX 10.8 in VMFusion 4.1.3 with host version OSX 10.7.4 by performing these steps:

    Matt Long Says:
    February 16th, 2012 at 4:11 pm
    I already installed the tools and then rebooted and got a kernel panic that wouldn’t go away, so I found your post too late. It was still helpful, though. Here’s what I did.

    1. Boot into single user mode by rebooting the VM and quickly giving focus to the screen and holding Command-S. If you don’t do this quick enough, you’ll miss the window of opportunity.

    2. Once you get the root prompt, type: /sbin/mount -uw /
    to mount the drive with write permissions

    3. cd to /Library/Application Support/VMWare Tools

    — I stopped at step 3 as I was not able to successfully edit the .sh file. I rebooted the OSX 10.8 VM and after performing a force restart from VM Fusion I was able to succesfuly launch my 10.8 machine and run the VMWare Tools through the VM Fusion menu. The OSX 10.8 VM is working correctly.

    Good luck!

  26. Pankaj Says:

    Works for me. I don’t see any major delay in startup. Awesome. Thanks a lot.

  27. Travis Says:

    Thanks for this!

    I had a loop of kernel panic on startup. Before this, I had Fusion 4.x and upgraded to Fusion 5.x. And then when I upgraded from Lion to Mountain Lion in my VM, the VM would no longer boot because of the kernel panics. I believe the issue was that I had not updated the VMWare Tools when I’d updated Fusion earlier.

    So, I booted to single user mode and disabled the memory kext as described. That allowed me to boot. Then I was able to install the Fusion 5 VMWare Tools and reboot and all is well since.

  28. DIVAKAR Says:

    sir
    thank you very much
    how I can support you worked fantastic for me

  29. chet Says:

    I think this work for everyone, but me. I deleted the 2 files used sudo su – in termail to edit the .sh file saved and rebooted with panics. I’m on vmware 9 in ubuntu. Van’t get a fix to work. ARG!

Leave a Reply