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 Sierra. It was released on September 20, 2016, with some next-level advancements. One of the highlighting features of the macOS 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. We have drafted a step-by-step guide that will guide you from the first step to the last step of installing macOS Sierra on VirtualBox on Windows PC.

Continue reading and ahead and check how to install macOS Sierra on VirtualBox on Windows PC.

Why is Sierra the Fastest macOS on VirtualBox?

macOS Sierra is an older version of macOS and Apple is releasing new updates to fix bugs, and improve the speed of macOS Sierra. 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 Monterey and Big Sur.

In addition, running macOS 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 of macOS Sierra:

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

Cons of macOS Sierra:

  1. 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 APF support.

These are some of the pros and cons of macOS Sierra. Read the next section to know how to install macOS Sierra on VirtualBox on Windows PC.

How To Install macOS Sierra on VirtualBox on Windows PC

1. Download macOS Sierra from the Apple Support Page

We won’t be creating the macOS Sierra ISO Image or vmdk image file in this tutorial. We will download the macOS Sierra (InstallOS.dmg) file direct from the Apple Support Page.

You can visit the Apple Support page then right click on macOS Sierra and select "Open Link in new Windows" to download InstallOS.dmg file.

2. Install New VirtualBox

First, download and install the VirtualBox on your Windows PC. Also, make sure that you are using the latest version of VirtualBox.

Install New VirtualBox

3. Extract BaseSystem.dmg File

Next step, you need install 7Zip. Then, you can open InstallOS.dmg with 7zip. Go to this folder: InstallOS.dmg > Install macOS > Right click on "InstallOS.pkg" and select "Open Inside *"

Next, go to InstallOS.pkg > InstallESD.dmg > OS X Install ESD, then Extract "Basesystem.dmg" file on your Desktop.

4. Convert DMG File to VDI VirtualBox Disk

You will now need to convert the dmg file to img then convert img to vdi image. To do this, you can use a tool called dmg2img. This tool will help you convert the Basesystem.dmg file to img image and we use VirtualBox to convert img to VDI image.

Convert Basesystem.dmg to img

cd %USERPROFILE%\Downloads\dmg2img-1.6.7-win32

dmg2img %USERPROFILE%\Desktop\BaseSystem.dmg %USERPROFILE%\Desktop\BaseSystem.img

Convert DMG to img Image

Convert Basesystem.img to vdi VirtualBox Disk

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

VBoxManage convertfromraw --format VDI %USERPROFILE%\Desktop\BaseSystem.img %USERPROFILE%\Desktop\BaseSystem.vdi

Convert img to vdi image

Once you convert the InstallOS.dmg file to vdi image. You can jump to the next step of installing macOS Sierra on VirtualBox.

5. Move InstallOS.dmg to Virtual Disk

To run InstallOS.dmg file with VirtualBox, you can use VHD Virtual Disk. Create a VHD Virtual Disk on Windows then copy InstallOS.dmg to this Virtual Disk and you can use it with VirtualBox.

Create 10GB VHD Virtual Disk:
To create VHD Virtual Disk for Windows and VirtualBox, we will use DiskPart Tool. Open Command Prompt in your Windows search (CMD) and type: Diskpart

Diskpart

create vdisk file=%USERPROFILE%\Desktop\Installer.vhd maximum=10240 type=expandable
attach vdisk
create part primary
format quick label="Installer"
assign letter=W
exit

Create VHD Virtual Disk for Windows and VirtualBox

Copy InstallOS.dmg to Installer Disk (W:), then right click on this Volume and select "eject"

Copy InstallOS Dmg to Installer Disk

6. Create a New Virtual Machine for macOS Sierra

To install macOS Sierra on VirtualBox, 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.

7. Add Basesystem.vdi and Installer.vhd to VirtualBox

Click on the ‘Settings’ option, head to the ‘Storage’, then on the ‘Disk Icon,’ and in the end, select your basesystem.vdi file and Installer.vhd Virtual Disk. After that, click on the ‘OK’ button.

Add Basesystem Disk and Installer Disk

8. Configure VirtualBox to fix gIOScreenLockState 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. Run Sierra Virtual Machine on VirtualBox

After that, re-open the VirtualBox, and click on the ‘Start’ button to boot your newly created virtual machine. You will now see a process running on your window in Command Prompt. Wait for the process to complete.

Once it 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.

9. Install macOS Sierra on VirtualBox

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

These are the correct steps to install macOS Sierra on VirtualBox on Windows PC. We hope you also followed the steps properly and successfully Installed macOS Sierra on VirtualBox. 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.

Featured Posts

Leave a Comment