• Jim Carter

VMWare Fusion Start-Up Issues Solved!

Updated: Sep 21, 2018



TL;DR


Sometimes, the VMWare Fusion app will start fine but when you try to run a VM you get the message:


"Cannot find a valid peer process to connect to"

This can be very frustrating and depending on how you use your Mac, the solution is not always obvious. Below are a couple of possibilities that I have found useful in my experience.



So many apps ...


At Media Systems, serving the media and publishing industry means you have to be flexible on which technologies you use. VMWare Fusion is a great desktop virtualisation solution for the Mac (VMWare Workstation being the Windows equivalent) which allows us to run Mac OS, Windows and Linux virtual machines side-by-side. To me, it's an indispensable day-to-day program.


But I also need VirtualBox installed, and SnagIt, Tuxera NTFS, Docker and so on. There's where you can hit a 'limitation' of Mac OS X - the number of kernel extensions is finite.


Kernel extensions or "kexts" are effectively hooks directly into Mac OS X and are used mainly because certain apps (like those mentioned above) require low-level access to the operating system to either function seamlessly or at all.


However, Mac OS X only has a limited number of 'slots' available for kernel extensions and Apple uses a lot of them for the OS itself. This doesn't leave too many free for "third-party" apps. I have to admit I cannot find any hard and fast numbers on this (so happy to hear from anyone that does) but if you're a power user you can hit it fairly easily.


Added to this, the more you use your Mac during the day, the more slots tend to get used up. This is because some apps reserve slots when they or the Mac start but don't release them when they quit (heh, VirtualBox, I'm talking to you). Fusion, plays nicer and only uses it's slots when it's actually running. So, in some ways Fusion is more vulnerable to this as it doesn't "put it's towels on the sun lounger" to start with.


A lot of the time this issue can be "solved" purely by restarting your Mac, effectively clearing out the slots for other apps. Sometimes, though this is not practical or doesn't even fix the issue, so here's where the rest of this post comes in.


Gatecrasher?


Firstly though, do check Gatekeeper, especially if you having the issue with a newly installed app. Introduced in OS 10.13 "High Sierra", Gatekeeper is a security feature that only allows kernel extensions to load after manual authorisation by the user, from within


System Preferences->Security & Privacy->General


Here is a good article from planetvm.net which gives a step-by-step walk through for allowing kernel extension to load in High Sierra:



Quit It!


Secondly, do try to quit any apps you are not using - including those in the menu bar. Some will play nicely and if they use kext slots will free them up. Worth a try before you get the command line out ...


The Great Kernel Slot Lottery (Slottery?)


As alluded to above, the kernel can simply run out of "slots" by the time you come to start Fusion. Currently, Fusion needs 4 slots to function. If it can't load all four then you will get the dreaded "Cannot find a valid peer process to connect to" error message when you try and start a VM.


To see all of the kexts that are currently installed you can open a Terminal window and use the command:


The full list of kexts can be quite long ...

This will give you quite a long list, so to just find out how many kexts are installed, use the following:

(The 'tail -n +2' strips out the first header line from the kextstat command, thus 'wc -l' will report the correct number of kexts loaded, rather than being one out all the time)


If the number gets above 180 or so then you'll start hitting this issue.


To check which third-part kexts are installed you can use:

This command (by combining the kextstat command with the grep, filters out all of Apple's own kexts) should give you something similar but not identical to the output below. Note the four Fusion kexts (highlighted) are loaded successfully in this case. Like this, Fusion should work correctly.

All VMWare Fusion kexts loaded successfully

So, how do we get Fusion going without restarting the Mac? Well, we need to free up some of the slots manually. Remember that a lot of apps don't do this automatically. Say, for example we also have VirtualBox loaded and we don't need that for the moment.


Here's a screen shot of the kextstat command showing the VirtualBox kexts highlighted in yellow (luckily VirtualBox uses four kext slots also):


VirtualBox kernel extensions highlighted in yellow

Mac OS X has another command, kextunload, to allow us to unload these extensions manually. It needs elevated privileges on the Mac, so you do need to use it in conjunction with sudo, so you'll need to have the credentials for a admin user on the Mac.


Take a look at the the yellow highlighted parts in the screenshot. These are "bundle id's", which we will use to identify the kernel extension to kextunload.


NOTE: As kexts can have dependencies on each other, you won't be able to unload the VBoxDrv until the other three are unloaded, so do those three first:

Don't forget to use the '-b' option which tells kextunload to use that Bundle ID (i.e. the org.virtualbox.kext.VBoxDrv)


Finally unload the VBoxDrv:

Assuming you got no errors, that's four slots freed up. Now, startup VMWare Fusion and run a VM. All should be well, without restarting your Mac! Be aware that VirtualBox (because it loads it's kexts at system start up and never touches them again) will not function until you restart your Mac.


I'm still stuck!


Of course, you might not have Virtual Box installed and still get this far without being able to get Fusion working. In which case, look at the kext list again and see if there is anything else you could quit or unload. In my case Duet is a candidate and also Techsmith points to Snagit or Camtasia for example.


VMWare has an article in here in which a couple more options are discussed, including re-installing Fusion.


Ultimately, you may need to look at uninstalling some software if the problem can't be solved using a restart or kextunload as Apple provide no way to increase the number of kext slots.

52 views
CALL US

Tel. +44 (0) 1992 563390

EMAIL US
OPENING HOURS

Mon - Fri: 9am - 5:30pm

25 YEARS EXPERIENCE
OUR SOLUTIONS
REGISTERED ADDRESS

Let us help you reach your publishing potential.

  • LinkedIn Social Icon
  • Facebook Social Icon
  • Twitter Social Icon
  • YouTube Social  Icon
  • Instagram Social Icon

- Advertising

- Publishing

- Consultancy

1 Town Quay Wharf, Abbey Road, Barking, Essex, IG11 7BZ 

© 2020 Media Systems Ltd.