Home > Mac administration, macOS, VMware > Setting a macOS VM to automatically boot to Recovery HD using VMware Fusion

Setting a macOS VM to automatically boot to Recovery HD using VMware Fusion

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.

Screen Shot 2017 07 31 at 10 26 39 PM

3. Add the following line to the end of the .vmx configuration file:

macosguest.forceRecoveryModeInstall = "TRUE"

Screen Shot 2017 07 31 at 10 29 57 PM

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.

Screen Shot 2017 07 31 at 10 52 18 PM

  1. September 2, 2017 at 10:31 am

    After reboot even though i removed the command string .vmx configuration file the MAC always resumes in recovery mode. What do I do now?

  2. September 2, 2017 at 10:33 am

    After reboot even though i removed the command string .vmx configuration file the MAC always resumes in recovery mode. What do I do now? have I lost everything?

    • Ngo Duc Anh
      December 17, 2018 at 3:33 pm

      You have to open .vmx again and delete macosguest.forceRecoveryModeInstall = “TRUE”. After that, find the .nvram file in the VM folder and delete it!

  3. September 8, 2017 at 5:23 pm

    Delete .nvram

    • foo
      February 10, 2018 at 10:28 am

      it worked thanks

  4. November 20, 2017 at 10:55 pm

    I try to disable SIP. When I boot into Recovery mode I can disable SIP. If I delete the .nvram file to boot into normal mode, then the SIP is active again. Any idea how to fix that?

  5. November 21, 2017 at 2:23 pm

    Solution: I had to use a real Mac for that. On the Mac I could boot my 10.13 vm image into Recovery Mode and disable SIP. This created the appropriate “macOS 10.13.nvram” small file which could then be copied to non-Mac hosts. So all the 10.13 vm images are in “sip-disabled” mode.

  6. November 21, 2017 at 3:36 pm

    Solution addendum #1: Pay attention to the file permission of the copied .nvram file. On some systems (eg. Win10) it’s blocked by default if it’s coming from a different system. In this case a freshly created nvram file will have SIP activated again. Check if there has been a new file created in the VM directory. You may have to “unblock” the copied .nvram file by right-clicking on the file – and then choose permissions etc.

  7. February 10, 2018 at 2:53 am

    I just discovered that if my VM uses APFS, I can’t start in macOS Recovery. I can with HFS. I’ve been using vfuse from Joe Chilcote with an AutoDMG dmg with the –recovery flag.

  8. David
    February 12, 2018 at 2:19 pm

    sudo nvram “recovery-boot-mode=unused”
    sudo reboot

    source: http://anandmpandit.blogspot.ch/2017/09/how-to-boot-into-recovery-mode-on-mac.html

    • Joe Pillow & The Dancing Fools
      September 14, 2019 at 12:28 pm

      nvram -d recovery-boot-mode

  9. Nathan
    January 29, 2019 at 5:21 pm

    If you are stuck in a recovery loop try setting the Startup Disk in recovery mode.

  10. jensm
    January 27, 2020 at 1:11 pm

    To boot the VM normally again, you have to:
    1. Shutdown the VM. (don’t simply restart)
    2. remove macosguest.forceRecoveryModeInstall = “TRUE” in the .vmx file
    3. delete the .nvram file
    4. boot normally

    so, a normal boot will only work if macosguest.forceRecoveryModeInstall = “TRUE” in .vmx is removed and the nvram file is deleted with the power off.

  11. Rokko69
    November 22, 2020 at 3:19 pm

    Thanks for this tip from Catalina it works I have to try with Big Sur no need to delete the string just select the startup disk while you are using the recovery

  12. mallej
    September 20, 2021 at 6:34 pm

    Has anyone been able to get this working with Big Sur on Fusion 12? The old tricks don’t work for me.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: