How to Quickly Create a macOS VM on Your Windows PC

Vivek RatheeVivek Rathee
3 min read

Windows is the most user-friendly operating system for PCs and laptops, at least in my personal opinion, but iPhones are better than Android when it comes to smooth user interaction.

To create smooth and vibrant iOS apps, and use software that is OS-bound like Xcode, a Windows user will need to create a VM running macOS.

First, let's start with a few prerequisites before we begin creating our VM:

  • Disable Memory Integrity: Go to Windows Security > In Device Security, click Go to Settings > Turn off*Memory Integrity*.

    (You can turn it on again later)

  • Disable Hyper-V: Open Command Prompt with "Run as administrator" and run this command: 'bcdedit /set hypervisorlaunchtype off'.

  • Download and Install VirtualBox:

    • Go to this link: "https://www.virtualbox.org/wiki/Downloads".

    • From the VirtualBox platform packages, download Windows hosts.

    • Also, download the VirtualBox Extension Pack.

    • First, install Windows hosts followed by the Extension Pack.

  • Download .iso for macOS

With this, we are ready to build our VM that will run macOS.

  1. Open VirtualBox.

  2. Click on "New" to create a new VM.

  3. Configure the following:

    • Name - Name your VM whatever you want; I am going to use "MacOS".

    • Folder - Choose where you want to store your VM (Make sure the disk you are using to store your VM has 100GB of space available).

    • ISO Image - Use the ISO downloaded in the prerequisites.

    • Type - Select "Mac OS X".

    • Version - Select "Mac OS X (64-bit)".

  1. Click Next.

  2. Configure the Hardware:

    • Base Memory - Minimum 6GB is recommended.

    • Processors - Minimum 4 are recommended.

  3. Click Next.

  4. Select "Create a Virtual Hard Disc Now" - 100GB is recommended.

  5. Click Next.

  6. Review and click Finish.

  7. Close VirtualBox completely (Make sure with Task Manager that it is not running in the background).

  8. Open Command Prompt with "Run as administrator" and run the commands to patch your VM.

    You can find the Patch Virtual Machine commands here (Make sure you change the name of "VM Name" to whatever you named it in Step 3)(Use commands suitable for your processor be it Intel or AMD).

  9. Restart your Windows host.

  10. Open VirtualBox, and open your VM Settings.

  11. In the System Tab under Boot Order uncheck "Floppy".

  12. In Display Tab change Video Memory to 128MB and check "Enable 3D Acceleration" button.

  13. In the Network Tab under Adapter 2: Enable Network Adapter, Attached to: Bridged Adapter, Name: Your wireless adapter.

  14. Start your VM.

  15. After initial boot up process, Select your desired language.

  16. Select Disc Utility. Select VBOX HARDDISC Media.

  17. Click Erase, Give your disc a name like "Virtual Mac HardDisc" and Erase disc.

  18. Close Disc Utility.

  19. Select "Install MacOS Big Sur" and click continue.

  20. Proceed with the usual Mac installation.

  21. Voilà! You have your macOS on your Windows host.

    However, it will still have an odd-looking Display Resolution. To change it, close your VM, open Command Prompt with "Run as administrator," and run the following commands:

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

    • 'VBoxManage setextradata “VM Name” VBoxInternal2/EfiGraphicsResolution 1920x1080" (Make sure to change "VM Name" to your own VM name).

0
Subscribe to my newsletter

Read articles from Vivek Rathee directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vivek Rathee
Vivek Rathee