Skip to Content

Can You Run macOS on a Windows PC Legally and How Do You Do It?

Is Installing macOS on Windows with VirtualBox a Good Idea for Beginners?

Exploring how to run macOS on a Windows computer can be an interesting project. It allows you to experience the Apple ecosystem without purchasing new hardware. While setting up a Linux or even a Windows virtual machine is often a simple task, creating a macOS virtual machine (VM) on a Windows PC is a more involved process. This guide provides a detailed walkthrough, explaining each step to help you succeed.

The journey involves using specific software versions, preparing your Windows system, and running several command-line instructions. The final result may not offer the seamless performance of a genuine Mac, but it provides a functional environment for exploration, testing, or familiarizing yourself with macOS. This method is a practical way to dip your toes into Apple’s operating system.

You will need a capable computer to handle this task. A powerful PC with sufficient memory and storage is essential for a smooth experience. Be prepared to dedicate time and patience to the setup, as it involves large downloads and careful configuration.

Before You Begin: Gathering Your Tools

To ensure a successful installation, you must first gather all the necessary components. Preparation is key, as using the wrong versions of software is a common point of failure. This process requires a specific combination of tools that are known to work well together.

  • A Capable Host PC: Your Windows computer should have adequate resources to share with the virtual machine. A multi-core processor (Intel or AMD), at least 16 GB of RAM, and a modern graphics card are recommended. You will be dedicating a portion of these resources to the VM.
  • Sufficient Storage Space: You will need a significant amount of free storage. The macOS installation file itself is over 13 GB, and the virtual machine requires at least 80 GB of disk space to operate correctly. An SSD (Solid-State Drive) is highly recommended for both your main Windows system and the VM storage, as it drastically improves performance.
  • VirtualBox Software: This is the virtualization software that will host your macOS VM. Experience shows that older versions are often more reliable for this specific task. This guide is based on using VirtualBox 7.0, as newer versions can introduce compatibility issues. You may need to search for older builds of the software online.
  • VirtualBox Extension Pack: This companion software for VirtualBox adds support for USB 2.0 and 3.0 devices, among other features. It is important to match the version of the Extension Pack to your VirtualBox installation. If you install VirtualBox 7.0, you must use the Extension Pack for version 7.0.
  • A macOS ISO File: You need a bootable installation file for macOS. This guide uses macOS Big Sur, as it is a relatively modern version that has proven to be compatible with this method. You can often find these files on internet archive websites. Be prepared for a lengthy download, as the file is large.
  • Patience and Time: This is not a quick, five-minute installation. The downloads can take time, and the installation process itself can last for a couple of hours. Rushing through the steps can lead to errors, so it is best to set aside an afternoon for this project.

Part 1: Preparing Your Windows PC

Before you can install VirtualBox and create the macOS virtual machine, you need to configure a few settings within Windows. These adjustments prevent conflicts between Windows features and the VirtualBox virtualization engine. You can safely re-enable these features after the macOS installation is complete.

First, you need to disable a Windows Security feature called Core Isolation. This feature provides added protection against malware but can interfere with virtualization software like VirtualBox.

  1. Open the Start Menu and type “Core Isolation” then press Enter.
  2. In the Windows Security window, find the toggle for Memory Integrity.
  3. If it is on, turn it off.
  4. You will be prompted to restart your computer. Do so for the change to take effect.

Next, you must disable Hyper-V, which is Microsoft’s own virtualization platform. VirtualBox and Hyper-V cannot run at the same time, as they both try to control the virtualization hardware in your computer’s processor. If you have used features like Windows Subsystem for Linux (WSL 2) or Windows Sandbox, Hyper-V is likely enabled.

  1. Open the Start Menu, type “cmd,” right-click on “Command Prompt,” and select “Run as administrator.”
  2. In the Command Prompt window, type the following command and press Enter:
    bcdedit /set hypervisorlaunchtype off
  3. This command tells Windows not to start Hyper-V when the computer boots.
  4. After the command completes successfully, you must restart your PC again.

With these two settings adjusted, your Windows PC is now ready for VirtualBox.

Part 2: Setting Up the Virtual Machine in VirtualBox

With your Windows system prepared, the next step is to create and configure the virtual machine that will become your Mac. This involves telling VirtualBox what kind of computer you want to create, how much memory it should have, and how large its hard drive should be.

Launch VirtualBox and click the “New” button to start the virtual machine creation wizard.

Name and Operating System

Name your virtual machine something easy to remember, like “macOS Big Sur.” VirtualBox may automatically detect the OS type. If not, manually select “Mac OS X” for the Type and “Mac OS X (64-bit)” for the Version.

ISO Image

In the same screen, select the macOS Big Sur ISO file you downloaded earlier. This tells VirtualBox which installation disc to use.

Hardware Allocation

The next screen asks for hardware resources. You are essentially lending parts of your physical PC to the virtual one. A good rule of thumb is to allocate up to half of your system’s resources.

Base Memory

This is the RAM for your VM. While the minimum is 4 GB (4096 MB), macOS will run much better with more. If your PC has 16 GB of RAM, allocating 8 GB (8192 MB) is a good starting point. If you have 32 GB, you can allocate 16 GB (16384 MB).

Processors

This is the number of CPU cores for the VM. For the installation process, it is critical to set this to 1 core. Setting it higher at this stage often causes the installation to freeze. You can increase the core count after macOS is fully installed.

Virtual Hard Disk

This is the storage for your macOS. The wizard will ask you to create a virtual hard disk.

Set the disk size to at least 80 GB. A size of 100 GB is even better if you have the space, as it provides more room for apps and files.

Click “Create” to finish the initial wizard.

After the wizard closes, your new VM will appear in the list on the left side of the VirtualBox window. However, more configuration is needed before you can start it. Select your new macOS VM and click the “Settings” button.

System > Motherboard

Ensure the “Enable EFI (special OSes only)” box is checked. This is necessary for modern operating systems like macOS to boot.

Display > Screen

Go to the Display section. Set the “Video Memory” slider to its maximum value, which is 128 MB. Check the box for “Enable 3D Acceleration.” In some cases, you may need to come back and disable this feature if you experience graphical issues after installation, but it is best to start with it enabled.

Once you have confirmed these settings, click “OK” to save your changes and close the Settings window. Do not start the VM yet. The next step is the most technical part of the process.

Part 3: Applying Essential Command-Line Code

This is the most crucial part of the setup. macOS is designed to run only on Apple hardware. To make it run in VirtualBox on a Windows PC, you must use a series of commands to modify your VM’s configuration. These commands essentially disguise the virtual machine, making it look like a real Mac to the macOS installer.

  1. First, ensure VirtualBox is completely closed. The commands will not work if the program is running.
  2. Next, open Command Prompt as an administrator again, just as you did when disabling Hyper-V.
  3. You will need to navigate to the VirtualBox installation directory. For most users, this command will work:
    cd "C:\Program Files\Oracle\VirtualBox\"
  4. Now you will run a block of commands. These commands must be run one by one. The phrase “VM Name” in the commands must be replaced with the exact name you gave your virtual machine in VirtualBox. If you named it “macOS Big Sur,” then you must use that name in the commands, enclosed in quotes.

The commands differ slightly depending on whether your PC has an Intel or an AMD processor.

For Intel Processors

Copy and paste each line below into the Command Prompt, replacing “VM Name” with your VM’s name, and press Enter after each one.

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-AA95B1DDAB278B95"
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 0

For AMD Processors

If your PC has an AMD processor, the commands are slightly different. You need an extra command that helps the VM handle instructions meant for an Intel CPU.

VBoxManage.exe modifyvm "VM Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMacPro1,1"
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-7BA5B2D9E42DDD94"
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 0
VBoxManage modifyvm "VM Name" --cpu-profile "Intel Core i7-6700K"

After you have run all the appropriate commands for your processor, you can close the Command Prompt. Your virtual machine is now configured and ready for the macOS installation.

Part 4: Installing macOS Big Sur

This stage requires the most patience. The installation process is slow and can take up to two hours. It is important not to interrupt it.

  1. Open VirtualBox and click the “Start” button for your macOS VM. A black screen with white text will appear, followed by the Apple logo. This boot process can take several minutes. Eventually, you will arrive at the macOS Recovery screen.
  2. Choose Your Language: Select your preferred language and click the arrow to continue.
  3. Use Disk Utility: Before you can install macOS, you must prepare the virtual hard disk. From the list of options, select Disk Utility and click “Continue.”
  4. Erase the Disk: Inside Disk Utility, you will see a drive named “VBOX HARDDISK Media” on the left. Select it. Click the “Erase” button at the top. A dialog box will appear.
    • Name: Give the disk a name, such as “Macintosh HD.”
    • Format: Ensure the format is set to “APFS.”
    • Click the “Erase” button. The process is quick. Once it is done, close Disk Utility by clicking the red circle in the top-left corner.
  5. Install macOS: You will return to the main Recovery screen. This time, select “Install macOS Big Sur” and click “Continue.”
  6. Follow the Prompts: The installer will guide you through several screens. You will need to agree to the software license agreement and then select the disk you just formatted (“Macintosh HD”) as the destination for the installation.

The installation will now begin. The VM will show a progress bar and an estimated time remaining. This estimate is often inaccurate. The VM will restart several times during this process. Do not be alarmed; this is normal. Just let it run until you see the welcome screen for setting up your Mac.

Once the installation is complete, you will be guided through the standard macOS setup process. Here you will select your country, set up a user account and password, and configure other basic settings. After finishing this setup, you will arrive at the macOS desktop.

Part 5: Post-Installation Adjustments

You now have a running macOS virtual machine, but there are a few final adjustments to improve the experience.

Adjusting Screen Resolution

The default screen resolution is likely to be small and not fit your monitor correctly. Changing it is not as simple as using the System Preferences menu in macOS. You must use another command-line instruction.

  1. First, shut down your macOS VM completely from within macOS (Apple Menu > Shut Down).
  2. Close VirtualBox.
  3. Open Command Prompt as an administrator one more time.
  4. Navigate to the VirtualBox directory again:
    cd "C:\Program Files\Oracle\VirtualBox\"
  5. Now, run the following command, replacing “VM Name” with your VM’s name and “1920×1080” with your desired resolution.
    VBoxManage setextradata "VM Name" VBoxInternal2/EfiGraphicsResolution 1920x1080
  6. You can use other standard resolutions like 1280×720, 1600×900, or even 2560×1440 if your monitor supports it.
  7. Close the Command Prompt, open VirtualBox, and start your macOS VM. It should now boot into your chosen resolution.

Increasing CPU Cores

During the setup, you limited the VM to one CPU core. Now that the installation is finished, you can safely increase this number to improve performance.

  1. Shut down your macOS VM.
  2. In VirtualBox, select the VM and go to Settings > System > Processor.
  3. Move the slider to assign more CPU cores. A good practice is to use up to half of your physical CPU cores. For example, if you have an 8-core processor, assign 4 cores to the VM.
  4. Click “OK” and restart the VM. You should notice a significant improvement in responsiveness.

Understanding the Experience

Running macOS in a virtual machine on Windows is a technical achievement, but it is important to have realistic expectations. The performance will not match a real Mac. You may notice some graphical lag, and features that rely on specific Apple hardware, like iMessage or FaceTime, will not work.

However, for many purposes, this setup is more than adequate. It is an excellent environment for:

  • Learning macOS: If you are new to the Mac platform, a VM is a free way to get familiar with the interface, menus, and core applications before committing to a purchase.
  • Software Development: Developers can use a macOS VM to compile and test applications for the Apple ecosystem without needing a dedicated Mac.
  • Accessing Mac-Only Apps: If there is a specific lightweight application you need that only runs on macOS, a VM can provide access.

While this guide focuses on a reliable method using older software, the world of virtualization is always evolving. Other tools like VMware Workstation Pro or more advanced setups like OpenCore can offer different performance characteristics. However, for a first attempt, this VirtualBox method provides a clear and tested path to getting macOS up and running on your Windows PC.