How to Install macOS in VirtualBox

Mac Setup Featured Image

Apple has always made it hard to install its operating system on non-Apple hardware, making it hard to take advantage of the benefits of this refined OS. Here we will show you how to install macOS in a virtual machine. You will need a compatible set of hardware, along with a system with powerful enough components to run both Windows and macOS. 

What You’ll Need

First, you’ll need to download a copy of Oracle VM VirtualBox. You’ll also need an ISO image of the macOS version you want to install.

Getting hold of an ISO is actually more difficult than you might expect. Even if you have access to a Mac, you won’t be able to download a copy of the OS you already have installed. Regardless of the macOS version your Mac is running, open the App Store page of the latest macOS version – Monterey – and download the installer from there. You will still need to convert this APP file to a DMG and then convert it from a DMG to an ISO in order to be able to install it in VirtualBox.

An easier but also less secure option is to search for an ISO of your desired version of macOS online. There are plenty of sites that have them, but downloading an ISO from an unofficial site does come with a level of risk. However, the amount of technical knowledge you need for this is way less. This is an easier, and hence preferred, method for getting access to Apple software.

How to Create Your macOS Virtual Machine

  1. Install VirtualBox on your Windows PC by following the instructions in the installation wizard. Click “New” to create your new virtual machine.
Macos Virtualbox New Vm
  1. Use the name of your macOS version to name your virtual machine – for example, Monterey. Then, switch the Type drop-down option to “Mac OS X” and Version to “Mac OS X (64-bit).”
Macos Virtualbox Operating System
  1. Select the amount of RAM to be allocated to your virtual machine. Allocating more RAM will help to speed up your virtual machine, but make sure you leave enough for your host OS. Even though macOS Monterey requires a minimum of 8GB RAM, it’s recommended that you have at least 16GB RAM in your system to run both macOS and Windows comfortably.
Macos Virtualbox Memory Adjustment
  1. Choose “Create a virtual hard disk now,” and click on the “Create” button.
Create Virtual Hard Disk
  1. Leave the default setting of “VDI” checked, and click “Next.”
Macos Virtualbox Set Hard Disk Type
  1. Decide whether you want a dynamically allocated or fixed-size virtual hard drive. A dynamically allocated drive will start small and grow in size as more space is needed. A fixed-size drive will immediately take up the set amount of space on your physical hard drive.
Macos Virtualbox Synamic Orfixed Storage Type
  1. Choose the size of your virtual hard disk. Click on “Create” to finish creating your virtual machine.
Macos Virtualbox Installation Directory

Final Configuration

  1. With your virtual machine highlighted, click on the “Settings” cog. Select “System” from the side menu and make sure that “Floppy” is unchecked in the “Boot Order” settings. This will ensure that your virtual machine boots from your Monterey disc image. Make sure you set “Base Memory” to a suitable level – 2048MB at a minimum.
Macos Virtualbox Motherboard Setup
  1. While you’re in the “System” menu, click on the “Processor” tab. Set the number of CPUs to at least two, and ensure “Enable PAE/NX” is enabled.
Macos Virtualbox Processor Setup
  1. Select the “Storage” menu from the sidebar. Under Storage Devices, click on “Empty.” Click on the icon of an optical disk in the top-right corner of the screen, and select your Monterey ISO file, ensuring that “Use Host I/O cache” is enabled. Click “OK” to save the changes.
Macos Virtualbox Set Storage Type
  1. Proceed to the “Display” section and set “Video Memory” to 128MB, and then click “OK” to save.
Adjust Screens Virtual Box
  1. Next, move to the audio section and turn on both “Audio Output” and “Audio Input.”
Macos Virtualbox Audio Setup
  1. Before you can run macOS on a virtual machine, you’ll need to run the following commands from a command line or PowerShell with admin privileges on Windows or a terminal on Linux. Make sure VirtualBox is closed before you attempt this.

For Windows users, the following should work as provided. Linux users will need to add “sudo” to the start of each VBoxManage command and replace the location on the first line with the location of VirtualBox, as installed on your Linux distribution.

cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "Type Your Virtual Machine Name Here" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Type Your Virtual Machine Name Here" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Type Your Virtual Machine Name Here" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Type Your Virtual Machine Name Here" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Type Your Virtual Machine Name Here" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Type Your Virtual Machine Name Here" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
  1. Finally, reopen VirtualBox, click on the “Start” arrow to launch your virtual machine, and then follow the instructions to install macOS.
Macos Virtualbox Launching

macOS should now be installed in VirtualBox. Any time you want to use it, simply launch VirtualBox, and start your virtual machine. When you’re done, you can either close VirtualBox or shut down through your macOS virtual machine. You can also transfer the VM as an OVA file and import it on to another machine.

Frequently Asked Questions

What kind of specifications do I need on my computer to run macOS Monterey?

You will need a fair amount of power on your Windows PC to be able to run macOS Monterey. A Mac can run it with lesser processing power because it runs macOS natively. Your PC will need significantly more juice. Consider installing macOS Monterey only if you have a powerful quad-core processor, with at least 16GB of RAM.

Is it legal to run macOS on Windows using VirtualBox?

According to Apple’s legal terms and conditions, their operating systems are branded to be used only on Apple hardware. This means that running macOS on Windows is technically illegal even if you are using your own Mac’s ISO image. However, you can legally run macOS on VirtualBox on a Mac.

Are there any compatibility issues with running macOS on VirtualBox?

The problem with running macOS on a PC is that there are a vast number of possible system configurations, and not all of them may be compatible with macOS. The most ideal processor series for running macOS on a Windows PC is the Intel 10th Gen chipset. Other chipsets will also run, but they might have issues with Bluetooth, Wi-Fi, and other system features and peripherals.

Image credit: Pixabay

Ojash Yadav
Ojash Yadav

Ojash has been writing about tech back since Symbian-based Nokia was the closest thing to a smartphone. He spends most of his time writing, researching, or ranting about bitcoin.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox