Upgrading a VM from macOS 10.12 Sierra to macOS 10.13 High Sierra in VirtualBox

For testing purposes, I have a VM in VirtualBox currently runnning macOS 10.12 Sierra. Now that macOS 10.13 High Sierra is in Beta, I wanted to upgrade my VM to this new release. However, this proved to be difficult with the usual ways. This blog post will describe how to upgrade a Sierra VM to High Sierra.

The problem preventing the upgrade appears to be the boot sequence in VirtualBox. It looks like the EFI implementation of VirtualBox does not honor the way macOS wants to select the startup disk/volume/startup script or in whatever way that is actually supposed to work. The result is that you can click through “Install macOS 10.13 Beta.app”, but after the restart the old system comes up as if nothing happened.

Follow these steps to get around this problem:

  1. Boot the VM normally in VirtualBox.
  2. Open “Install macOS 10.13 Beta.app”, click through until you get to “Restart”.
  3. As soon as the screen turns black, start to hammer the F12 key. Make sure your keyboard is grabbed by the VM.
  4. If you managed to hit F12 at the right time, the VirtualBox EFI should pop up. If the VM starts up normally, go back to step 2.
  5. Now use your arrow keys to select Boot Manager and hit Return, then launch the EFI Internal Shell from there.
  6. Inside the shell, type the following commands:
    Shell> fs1:
    FS1:\> cd "macOS Install Data"
    FS1:\macOS Install Data\> cd "Locked Files"
    FS1:\macOS Install Data\Locked Files\> cd "Boot Files"
    FS1:\macOS Install Data\Locked Files\Boot Files\> boot.efi
    

With the last command, the system should continue booting. After a short moment, the installer will turn up and begin to upgrade your system from macOS 10.12 Sierra to macOS 10.13 High Sierra. Now you will have to wait for the macOS Installer to finish, which may take a while.

In case VirtualBox crashes with “Guru Meditation: VERR_IEM_INSTR_NOT_IMPLEMENTED” on the login screen when booting the new system, update to the latest VirtualBox test build, which implements the missing instruction.

This post was inspired by another blog post documenting similar instructions on how to enter the macOS Recovery in VirtualBox. For completeness and archival purposes, you can use the following EFI commands to boot macOS Recovery:

Shell> fs2:
FS2:\> cd com.apple.recovery.boot
FS2:\com.apple.recovery.boot\> boot.efi

9 thoughts on “Upgrading a VM from macOS 10.12 Sierra to macOS 10.13 High Sierra in VirtualBox

  1. Lars

    I tried this (without success) and noted the following:

    I had to hold fn-F8 to get into the boot manager.

    Although using the latest test build of VBox (5.1.x revision 116680) I get this message after entering the commands:

    Read error 0xe
    Error loading kernel cache (0xe)

  2. Charlie

    I am getting the same issue as Lars is with the VM ending in

    Read error 0xe
    Error loading kernel cache (0xe)

    After I execute the commands listed above.

    Any idea on the fix?
    VirtualBox 5.1.22 r115126 (Qt5.6.2) on macOS 10.12.5 host

  3. UncleBob

    Just a note to confirm that this is working perfectly for me: Virtualbox 5.1.26
    Thanks!!

  4. Eduardo Bonato

    I tried using latests Virtual Box (5.1.28) and current high sierra public release.
    Now, there is no Locked Files folder inside of macOS Install Data, so i am not able to to boot to the new installer. Any clues?

  5. Jason White

    Thanks for this blog entry. This was the smoking gun preventing me from upgrading my VirtualBox Sierra VM.

  6. Jeff

    This worked great for me and allowed to create a new High Sierra VM. I was not upgrading. I had to make sure SSD was not enabled in VirtualBox preferences otherwise High Sierra would automatically want to migrate to APFS.

Leave a Reply

Your email address will not be published. Required fields are marked *

*