How To Mac VirtualBox

How to Install macOS Sierra on VirtualBox on Windows PC

Written by John

Until now, Apple has introduced around 18 versions of the macOS, and one among them is macOS 10.12 Sierra. It was released on September 20, 2016, with some next-level advancements. One of the highlighting features of the Sierra was unlocking a Mac with Apple Watch. Apple has already released the advanced versions of it, but some users prefer using macOS Sierra as it is fast and stable. In this article, we will show you how to install macOS Sierra on VirtualBox on Windows PC.

Why is Sierra the Fastest macOS on VirtualBox?

macOS 10.12 is an older version of macOS and Apple is releasing new updates to fix bugs, and improve the speed of macOS. One of the reasons to choose the macOS Sierra is its speed and stability. macOS Sierra on VirtualBox is one of the most stable and fastest versions when compared to newer versions of macOS like Ventura and Monterey.

In addition, running macOS 10.12 Sierra on a virtual machine is also a bit complex. But, you don't have to worry, as we have already created a step-by-step guide to help you in this process. This guide also mentions the most common errors you can face and their solutions.

Pros:

  • macOS 10.12 is the best macOS version for students learning the Xcode tool. However, you can’t run the latest version, Xcode 13.
  • You can use macOS Sierra to download newer versions of macOS like Monterey on Ventura.
  • You can also convert macOS Installer to an ISO image
  • You can create a macOS installer on USB on Windows with the help of Sierra on VirtualBox and clean install your Mac system.

Cons:

  • One of the main disadvantages of macOS Sierra is that it doesn’t support the APFS standard. It is a must for hard disk partitioning on macOS, but it doesn't have APFS support.

How To Install macOS 10.12 Sierra on VirtualBox on Windows PC

1. Download Sierra Recovery Image

This guide will walk you through the process of installing macOS Sierra using the Sierra Recovery Mode, which is a simplified mode of macOS with basic features. To do this, we'll be using the Terminal in Recovery mode, which will allow us to easily convert the macOS Sierra installation file (InstallOS.dmg) into an installation package.

To download the Sierra Recovery Image on Windows, we can utilize one of the tools available on OpenCore, which is programmed in Python language. If you haven't heard of OpenCore before, it's a powerful tool that simplifies the process of installing macOS on PC. Python, as a programming language, is widely popular and incredibly versatile in its applications.

To get started, let's download the most recent version of OpenCore from this link, and follow the precise instructions provided in this link to install Python for Windows.

Download Sierra Recovery Image

To proceed, let's open up the Command Prompt or CMD tool using the Windows Search bar. Then, we can use the commands below to navigate to the OpenCore-0.9.1-RELEASE\macrecovery directory. It's essential to note that you may need to adjust the commands below depending on the version of OpenCore you're using, whether it's 0.8.1 or 0.9.1.

Go to Opencore-0.9.1 folder in CMD:
cd %USERPROFILE%\Downloads\OpenCore-0.9.1-RELEASE\Utilities\macrocovery

Download Recovery image:
macrecovery.py -b Mac-77F17D7DA9285301 -m 00000000000J0DX00 download

Your RecoveryImage.dmg will be download in OpenCore-0.x.x-RELEASE\Utilities\macrocovery\ folder.

2. Create Sierra USB Recovery

To proceed, we'll require a USB drive with a storage capacity of approximately 16GB to install macOS Sierra onto VirtualBox. After connecting the USB drive to your computer, we'll use the Transmac software to restore the Recovery Image onto the USB drive.

Let's begin by downloading and installing Transmac using the provided link. After that, right-click on the USB drive and select "Format Disk for Mac." Then, right-click on the USB drive once more and select "Restore with Disk Image."

Restore with Disk Image

To proceed, open the RecoveryImage.dmg file and click OK to initiate the creation of a Sierra Recovery on the USB drive. After the process completes, we can proceed to the following step.

Restore with Sierra Recovery Image

3. Download macOS Sierra Installer

To continue, you can download the macOS Sierra installer from the Apple Support Page here (Right click on Sierra 10.12 and click "Copy link address", then paste it to another tab) . Once downloaded, macOS Sierra will be in the form of an InstallOS.dmg file. We must then move this file to the Virtual Machine to convert it into the installation package "Install macOS Sierra.app". In order to transfer the InstallOS.dmg file to USB Recovery, we can create an additional partition as follows:

Create New Partition with Disk Management

To create a new partition on your USB drive, open Disk Management by searching for "Create and format hard disk partitions" in the Windows search bar. Next, select the unallocated space on your USB drive and click "New Simple Volume." Create a new volume with name: Installer and format it with either NTFS or exFAT.

Copy InstallOS.dmg to New Partition

Next, move the InstallOS.dmg file to the USB Recovery. Now, you have successfully created the installation package. You can proceed to install VirtualBox and begin the installation of macOS Sierra from the basic steps.

4. Install VirtualBox and VirtualBox Extension Pack

Next up, it's time to get your hands on the latest version of VirtualBox, and don't forget to install the all-important VirtualBox Extension Pack! This pack is your key to detecting USB 3.0 on VirtualBox, which is crucial because we'll be using a USB drive to install macOS Sierra. So, make sure to install it to avoid any hiccups during the setup process.

5. Create a New Virtual Machine

To install macOS 10.12 Sierra, you need to create a new virtual machine. After installing the VirtualBox, launch it, and click on the ‘New’ button. Then, follow the mentioned settings. You can see the same in the attached image.

Name: Sierra
Type: select ‘Mac OS X’
Version: select ‘macOS 10.12 Sierra (64-bit)’
Memory Size: 3-4GB

macOS 10.12 Sierra and Memory

The next screen will ask you to select the memory size. We would recommend you make it at least ‘4096MB.’ If you have enough space free on your Windows PC, you can select more. In the next step, select the ‘Create a Virtual Hard Disk Now’ option and click ‘Create.’

Create Sierra VirtualBox Disk Image

Then, it will ask you to choose VDI for the hard disk type. Select ‘Dynamically Allocated’ size. After that, click on the ‘Next’ button.

6. Add USB Recovery to VirtualBox

Once you've created a virtual machine, the next vital step is to add the USB Recovery to your VirtualBox. Head over to the 'Settings' section and select 'USB', where you can choose USB 3.0 as your preferred type. Click on the 'Add' button to include the previously crafted USB Recovery from the guide's first part.

Add USB Installer to VirtualBox

7. Configure VirtualBox to fix Boot Problem

You have already made a few changes to your new virtual machine. But it still requires some more changes to run properly. So, follow the given steps. First, run the ‘Command Prompt’ as ‘Administrator.’

Open Command Prompt

Now, run the below mentioned commands in the ‘Command Prompt.’ The ‘Sierra’ you see is our Virtual Machine name . You need to enter your correct Virtual Machine name (VM Name) here. Otherwise, it won’t work.

cd "C:\Program Files\Oracle\VirtualBox\"

VBoxManage.exe modifyvm "VM Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff

VBoxManage setextradata "VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac19,1"

VBoxManage setextradata "VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"

VBoxManage setextradata "VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-F22589C8"

VBoxManage setextradata "VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"

VBoxManage setextradata "VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

VBoxManage modifyvm "VM Name" --paravirtprovider none

Run Commnads to fix gIOScreen Problem

The last command to disable paravirtprovider in VirtualBox and fix freeze problem with "IOConsoleUsers: gIOScreenLockStae". Now, close the Command Prompt.

8. Boot to Sierra USB Recovery

Next, open your Virtual Machine and proceed to install macOS Sierra on VirtualBox. Once you open the Virtual Machine, you will see the UEFI screen because VirtualBox cannot recognize the boot disk. Don't panic, just stay calm and type "Exit" to exit the UEFI screen.

UEFI Mode in VirtualBox

Once you restart VirtualBox, you'll be greeted with the Boot Manager screen. From there, select your trusty USB drive to enter the macOS Sierra Recovery mode and embark on the journey of installing the operating system on your virtual machine.

Select UEFI USB Installer

9. Format Virtual Machine Disk for macOS

Once Boot finishes, you will need to follow some basic steps, such as selecting the language, etc. After that, select the ‘Disk Utility’ option from the visible options, and then click on the ‘Continue’ option.

Format Mac OS Disk with Disk Utility

Select VBOX HardDisk. Then, click on the ‘Erase’ option. Then, rename the drive to ‘macOS’ and leave the other two settings as they are. Click on the ‘Erase’ button, and close the ‘Disk Utility’ window when the process completes.

10. Install macOS 10.12 Sierra on Virtual Disk

First, close your Disk Utility then open Terminal, , click on Utilities > Terminal. Then, use this commands to Mount InstallOS.dmg image and convert to Install macOS Sierra.app.

Open Terminal in Sierra Virtual Machine

Mount InstallOS.dmg to macOS

cd /Volumes/Installer

hdiutil attach InstallOS.dmg

Attach InstallOS dmg to macOS

Convert InstallOS.dmg to Install macOS Sierra.app with Terminal

cd /Volumes/Install\ macOS

Installer -pkg InstallOS.pkg -target /Volumes/macOS

Convert InstallOS.dmg to Install macOS Sierra.app

Install macOS 10.12.3 Sierra with InstallAssistant

/Volumes/macOS/Applications/Install\ macOS\ Sierra.app/Contents/MacOS/InstallAssistant

Install macOS 10.12 Sierra on VirtualBox with InstallAssitant

Now, you will see the GUI installer. Select macOS Disk to install Sierra. Just wait for a while to install the macOS, and create a new macOS account.

You have now finally installed the macOS Sierra on VirtualBox on Windows PC. If you want to install the Guest Tool on VirtualBox to improve your macOS performance. You can check this detailed tutorial on installing Guest Tool on macOS on VirtualBox. On the other hand, if you want to make some tweaks to your machine, such as changing resolution, entering full screen mode etc. You can learn to do this with the help of the tutorial links attached.

If you love running macOS in Virtual Machine on Windows, then leave a comment on what you want to do next. We will make a more detailed tutorial to help you. That’s all for this tutorial.

5 Comments

  • Hi, for peoples who facing issues like “Guru Meditation error or Black Screen”
    while installing macOS High Sierra or Sierra follow the below instruction:

    For people with the black screen problem or Guro Meditation error, change operating system version from macOS 10.13 High Sierra (64-bit) or macOS 10.12 Sierra (64-bit) to just the Mac OS X (64-bit) and If didn’t work then settle the Video Memory Size to 128 MB from Virtual machine settings. It should work this time without any issue.

  • Hi,
    Have you had the issue “installer: error trying to locate volume at /Volumes/macOS” while running “Installer -pkg InstallOS.pkg -target /Volumes/macOS”?
    Thanks!

  • Hi John. Please disregard my previous comment. Just a typo (case sensitive) in the terminal command. This tut is so helpful. Thank you very much!

  • Hello, i keep getting a “Critic error” when i first start the vm, i followed all the steps twice and the second time i got to a “UEFI Interactive Shell” and tried to boot the boot.efi in ” System\Library\CoreServices\” but keep getting the same critic error

Leave a Comment