When testing various security functions, like System Integrity Protection or High Sierra’s new kernel extension functionality, it’s often useful to be able to boot a macOS virtual machine (VM) into the Recovery environment. However, it can be challenging to select the VM and hold down Command+R in time to boot to the Recovery environment. This can result in having to try several or more times before you can successfully boot the VM to Recovery HD.
Fortunately, VMware has a setting that enables a forced boot to Recovery HD. For more details, please see below the jump.
My colleague mosen discovered that you could add the following setting to a macOS VM’s .vmx configuration file:
macosguest.forceRecoveryModeInstall = "TRUE"
Once this setting has been added to the .vmx configuration file, the VM will automatically boot to Recovery HD the next time it is started.
To add the macosguest.forceRecoveryModeInstall setting to a macOS VM:
1. Shut down the relevant VM.
2. Open the VM’s .vmx file for editing.
3. Add the following line to the end of the .vmx configuration file:
macosguest.forceRecoveryModeInstall = "TRUE"
4. Save the changes to the .vmx configuration file.
5. Start the VM.
The VM should boot from the macOS VM’s Recovery HD partition automatically, and will continue to boot to Recovery until the setting is removed from the VM’s .vmx file.