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

50 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.

  7. Barry de Graaff

    Great how-to, worked for me, but hitting F12 at the right time is very hard, so I made a snap-shot of the VM right before the reboot. That way you can avoid having to re-download the upgrade a couple of times.

    I still needed to ram the F12 as fast as I could to make the EFI shell option appear.

    `VBoxManage modifyvm OSX –bioslogodisplaytime 10000` –> Does not seem to work

  8. Babak Vandad

    I’m stuck here…
    I had a OS X 10.12 on VMWare and started to upgraded to 10.13. When I cam back I saw the blue screen (boot menu). And failed to use your instructions, since there is no fs1 reachable in the internal shell. fs0 and blk0 to blk3. And it seems they are empty! What can I do here?

  9. Rainer Müller Post author

    These instructions were written for VirtualBox and macOS 10.13 Developer Beta before APFS became mandatory. As far as I know, the VirtualBox EFI BIOS still does not support APFS. Personally I switched to VMWare Fusion due to this.

    One thing you could try in VIrtualBox is to remove the checkbox on “Solid-state drive” in the storage settings of the VM. Then the High Sierra installer should no longer try to upgrade the disk to APFS, but leave it as HFS.

  10. Pedro

    hello,

    Following these steps, a message appears when run boot.efi –> “does prinf works??” and back to command line.
    after that I type reboot and nothing happens, I’m in the same version.

  11. Heinz Z

    Hello,

    I have the same problem as Pedro – “does printf works???” and hangs…Any Idea what to do?

  12. Luke Lone

    -I manually downloaded the combo update package 10.13.3 from Apple and launched it in the VM.
    -The first part of update completed successfully, than it asked for restart.
    -I restarted, entered the VirtualBox EFI Shell and launched boot.efi manually from the indicated path.
    -After some work, message appears “macOS could not be installed on your computer – The path […]\OSInstall.mpkg appears to be missing or damaged” (e.g. https://user-images.githubusercontent.com/192271/27255121-5811f2b4-538f-11e7-8117-9401bc9a7a80.png)
    -I pressed Restart and the VM rebooted to High Sierra 10.13 (no update).

    I think we are close to target, but some details are still missing to complete the update successfully.

  13. sanshigo

    first try I got kernel error like others. Tried second time and it worked don’t know what exaclty the reason for it. thanks

  14. Wilhsy86

    This was the solution I needed to upgrade from high sierra 10.13 to 10.13.4 using Virtual Box 5.2.8
    Worked great! Thanks

  15. Filman

    The error
    “Read error 0xe
    Error loading kernel cache (0xe)”
    can be solved by upgrading to the latest version of the Virtual box.

  16. jively

    Thanks! This worked for me on VirtualBox going from 10.12 to 10.13 not in the Beta.

  17. Aleksandr Skobeltcyn

    Thank you!
    It works, even it’s not worked from the first attempt.
    The main cause of the fault was an old version of virtual box. With new Virtual Box (v 5.2.10) all goes well

    My way of reaching 10.13.4 of Mac OS Sierra (probably you need last because of Xcode requirements)

    upgrade Virtual Box to 5.2.10
    do MacOs Recover
    do Upgrade -> F2 …

  18. Ghost

    I got this working.

    Virtual Box – 5.2.12

    Sierra 10.12.6

    I followed the guide provided in the blog – https://raimue.blog/2017/06/09/upgrading-a-vm-from-macos-10-12-sierra-to-macos-10-13-high-sierra-in-virtualbox/

    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

    Every time I tried the above I could not get it to work and I received the error – error loading kernel cache 0x9 VirtualBox.

    I did a bit of research and others were having the same issue, however, no one could get it to work.

    What I did then was the following

    Ran the update, reboot the machine and F12’ed into the boot manager.

    I turned off the Virtual Machine and closed VBox

    I then tried the following.

    Opened CMD as admin and ran the following commands, these were the same commands needed when originally installed the Mac onto Vbox

    VBoxManage.exe modifyvm “Mac” –cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff

    VBoxManage setextradata “Mac” “VBoxInternal/Devices/efi/0/Config/DmiSystemProduct” “MacBookPro11,3”

    VBoxManage setextradata “Mac” “VBoxInternal/Devices/efi/0/Config/DmiSystemVersion” “1.0”

    VBoxManage setextradata “Mac” “VBoxInternal/Devices/efi/0/Config/DmiBoardProduct” “Mac-2BD1B31983FE1663”

    VBoxManage setextradata “Mac” “VBoxInternal/Devices/smc/0/Config/DeviceKey” “ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc”

    VBoxManage setextradata “Mac” “VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC” 1

    Once the commands complete, I started the VM on VBox and F12’ed into boot managed and followed the same procedure

    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

    This time it worked and boot into the install/update – Took about 45 min +-

    Hope that helps anyone.

  19. Joel

    I tried @Ghost’s solution and I got the “does printf work?” message.
    Then I tried @Pedro’s “I found the solution to does printf work” and I *still* got the “does printf work?”

    Then, I restored form snapshot, booted into the old version, started the install again, On bootup I tried Pedro’s solution to boot from file and this time it worked!

  20. Andrea

    Thanks a lot to Ghost (2018-05-12 at 12:29) it worked for me with VB 5.2.12

  21. Andrea

    The right first command is
    VBoxManage.exe modifyvm “Mac” –cpuid-set 00000001 000306a9 04100800 7fbae3ff bfebfbff

  22. aone

    Thanks a lot, worked with 10.14 beta. Not finished the installation yet, but the installer is up and running 👍🏼

  23. Steve

    I struggled to update macOS but finally worked it out.

    You will find that any updates you apply will disappear after reboot as if they didn’t apply. You have to do the following as the update only completes after a reboot done in a certain way.

    1) Download the update from the Apple website or apply from the App store.
    2) When promoted to re-boot, press the F12 immediately after the restart, make sure the keyboard is captured in Virtualbox.
    3) Press ESC key to stop the auto boot before the countdown finishes. You only have a few seconds to do this.
    4) In the BOOT MANAGER option choose EFI Internal Shell.
    5) Do the following at the shell command line:
    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

    The system should then boot and continue the install and you are done. It is very important that you do all this on the first re-boot after applying the initial update as the update files are copied ready to complete the process. Miss the first boot and you will have to start again.

  24. kundan

    To update mac os follow the below steps. If you will try to upgrade it normaly it would be locked by Apple and you will get the old version that you are currently running. To upgrade use the bellow steps:

    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 window+r key. Make sure your keyboard is grabbed by the VM.
    4. If you managed to hit window+r 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

  25. Mohammad Kanan

    Thanks Rainer Müller. This worked for me just fine. I even was surprised didn’t get first “restart” .. system just restarted, I didn’t repeat from step (2) , I just restarted again and hit F12, followed procedure and in aout 90 minutes system rebooted to High Sierra … !! fantastic.

  26. Perry Kappetein

    Updating from High Sierra 10.x to the latest update through the store, it won’t boot anymore.
    tried F12 and the folder is not there, since it was a 2.6 Gb update.

    Anyway to get this update to work?

  27. atc98092

    Using VirtualBox 5.2.18. I had High Sierra 10.13.4 installed and working well, but 10.13.6 would not install from the App Store. I found this post when searching, and the steps listed worked first time. Thanks for the post!

  28. gyha

    F12 just won’t work. Don’t know what I’m doing wrong… :/

    Windows+R does nothing either. I guess @kundan meant HOST+F12 so i tried that (restarting the machine upon restart). I have to press ESC right after that to enter the boot menu but after launching boot.efi i end up getting a kernel cache error.

  29. steven

    thank you @kundan this worked perfectly. F12 is the key that I used to get in.

  30. Harvinder

    Has anyone got this working with Mojave?

    Im getting this error:

    ERROR!!! Load prelinked with status 0x800000000000000e
    Error loading kernel cache (0xe)

    Kind Regards.

  31. Matt B

    I tried to upgrade to Mojave from Sierra via the appstore and it crashed my partition. EFI manager did not recognize FS1 or FS2.

  32. Fiat Terminator

    I was getting the Error!!! Load prelinked kernel with status 0x800000000000000e while trying to upgrade to Mojave MacOs on a VirtualBox virtual machine. Turns out I had the older USB 2 compatibility in the settings for VirtualBox.

    If you run into this issue turn off the VM, go into VirtualBox settings USB and select USB 3.0 controller. Restart the VM and issue should be solved.

  33. Sahid

    me stuck with 10.13.2
    Upgrade to mojave by following the step above leaves with
    ERROR!!! Load prelinked with status 0x800000000000000e
    Error loading kernel cache (0xe)

    Has anybody been able to upgrade to Mojave yet ?

  34. Ed

    This is great, you can also get to it from “Boot Maintenance” > “Boot From File” and navigating to the boot.ini visually if that’s easier.

    Ed

  35. Feli_

    I finally managed to get beyond “Error loading kernel cache (0xe)”.
    The solution was to entirely delete the “macOS Install Data” Folder and simply restart the update in sierra.
    But this folder isn’t to delete easily.

    I did:
    1. Boot into macOS Recovery Mode as describled in this blog post
    2. Open a Termial (Menubar: Utilities->Terminal)
    3. run “csrutil disable”
    4. run “rm -rf “macOS Install Data”
    5. run “csrutil enable”

    reboot normally, run Mojave installer again, on first reboot follow the instructions in this blog post

  36. Kaiser

    Thanks for this post.
    I tried it like described above.

    First time i ran into
    “Read error 0xe
    Error loading kernel cache (0xe)”

    But just tried it again and second time it worked.

  37. Pingback: Upgrade Sierra VM to High Sierra – Yellow! GNU

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.