How to Install macOS in VirtualBox

Install Macos Virtualbox Featured

As a Windows user, there may be times when you need to use macOS but don’t have the money to invest in your own Mac computer. Apple has always made it hard to install their operating system on non-Apple hardware, making it hard to take advantage of the benefits of this refined OS.

With VirtualBox, however, it is possible to install macOS on your Windows PC. Let’s run through how to go about this.

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. If you have access to a Mac, you won’t be able to download a copy of the OS you already have installed. If the Mac is running macOS Mojave, open the macOS High Sierra page in the App Store and download the installer from there.

You will need to convert this APP file to a DMG and then convert from a DMG to an ISO in order to be able to install it in VirtualBox. A less complicated, 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.

How to Create Your macOS Virtual Machine

1. Install VirtualBox on your Windows PC by following the instructions. Click “New” to create your new virtual machine.

Macos Virtualbox New Virtual Machine

2. Use the name of your macOS version to name your virtual machine. For example, High Sierra or Mojave. The type and version should autofill with the correct settings.

macOs Virtualbox Operating System

3. 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 (whether that’s Windows or Linux).

Macos Virtualbox Memory Size

4. Choose “Create a virtual hard disk now,” and click on the “Create” button. Leave the default setting of “VDI” checked, and click “Next.”

Macos Virtualbox Create Virtual Hard Disk

5. 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 Storage Options

7. Choose the size of your virtual hard disk. Click on “Create” to finish creating your virtual machine.

Macos Virtualbox Hard Disk Size

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 unticked in the “Boot Order” settings. This will ensure that your virtual machine boots from your High Sierra disc image. Make sure you set “Base Memory” to a suitable level – 2048MB at a minimum.

Macos Virtualbox Boot Order

2. 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 CPU Selection

3. 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 High Sierra ISO file, ensuring “Use Host I/O cache” is enabled. Click “OK” to save the changes.

Macos Virtualbox Storage Devices Options

4. Proceed to the “Display” section and set “Video Memory” to 128MB, then click “OK” to save.

Macos Virtualbox Display Memory

5. Before you can run macOS in 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.

6. Finally, reopen VirtualBox, click on the green “Start” arrow to launch your Virtual Machine, then follow the instructions to install macOS.

Macos Virtualbox Installation Menu

Running macOS without the Mac

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.

If you want to continue dabbling in virtual machines, here’s how to convert VM files between Virtualbox and VMWare. Also check out our list of the best free virtualisation software for Windows 10.

Ben Stockton Ben Stockton

Ben is a UK based tech writer with a passion for gadgets, gaming, and general geekiness.

34 comments

  1. It’s definitely worth mentioning you need an Intel CPU to do this. AMD CPUs don’t play nice with Apple OS X

  2. Ha! Now I can put Manjaro Linux on this unsupported 17″ MBP and run the latest OS X in VB.

    1. or you could go to dosdude1’s website and download his patched installer…. that’s how i’m running mojave on this unsupported 2010MB

  3. Hello Everyone,
    I’ve tried to Install macOS in VirtualBox in Windows using the steps above but I’ve got anomalies in step 5 &6. Can someone provide more details for step 5 &6 to help rectify these anomalies.

    1. Step 5: Case is important when running the commands in DOS. macos does not = MacOS.

      Step 6: When installing, when the installer asks What drive to install to you must run the Disk utility and format the VDI drive. Then exit the utility and the VDI will be listed as an install location.

    1. yes it is, but they cant sue evyone who does this. plus they are still going to make money from the vms from ads and the app store so i don’t think they really care

  4. In the last section, in the sentence “macOS should not be installed in VirtualBox.”, “should not” should be “should now”.

    Re: Muhubi: osx86 can run on non-Intel x86 CPUs even if vanilla Mac OS X cannot.

    Re: Joe: Yes, it may violate a licence agreement from Apple but I am not aware of Apple suing an individual Hackintosh user as opposed to a business such as Psystar.

  5. Hi, in the first step when I select the OS system (Mac OS X), in version only appear:
    – Mac OS X(32bits)
    – Mac OS X 10.6 Snow Leopard (32-bits)

    I need something else?

  6. So one thing you might want to add to this is that when you go to install the OS you will need to open the disk utility and “erase” the VBOX disk in order to be able to install on to the virtual disk. Otherwise you will not be able to see it.

  7. “VBoxManage: error: Could not find a registered machine named ‘macos'”
    I can’t run the commands, they always fail. I trieed “macos”, “MacOS”, and the actual name I gave to my virtual machine on the first step of setup. Nada.

      1. I think the problem was that virtual box cli tools don’t work right if you have a space in the name. I tried it repeatedly, exactly correctly, when the name of my virtual machine was “NetBoot Server”. Never worked. Using quotes every time. Another day, I tried again from scratch and this time named it “NetBooter” and the cli tools were able to “see” the virtual machine no problem.

        Of course now I have a whole new problem. The installer won’t run. Every time I try to install El Capitan, it boots into the installer just fine, it tries to start the installation, then gives me an error message:

        “No packages were eligible for install. Contact the software manufacturer for assistance.”

  8. I haven’t quite gotten MacOS running under VirtualBox, but I came close I think. My computer froze during the process because I think I ran out of memory, but I’m upgrading from 8GB to 16GB so that should help. But my issue is that I initially wanted to use VirtualBox to run a virtual Windows environment. Apparently when I do those Command Prompt commands to allow MacOS to work it makes my Windows virtual machines stop working. Is there a set of commands to undo the MacOS commands so that I could switch back and forth between MacOS and Windows? It’s not very practical to do System Restore, which is what I did to get my Windows virtual machines to work again.

  9. I am doing this on Linux Mint. Having same error macos not found. Yes, I am
    using sudo and am in my Virtualbox VMs location

      1. In linux, don’t execute these commands with sudo (as root), but as normal user. Otherwise, it won’t work.

  10. I am borderline desperate to get Mac OS running on my high-end PC. A tech support acquaintance friend says running MacOS in a box on a PC can’t be done. I read your article with high hopes but no third party ever said they ever got a Mac app to run in the VirtualBox. Do you have some testimonials from third-parties saying they got it to work?

  11. I tried to install HighSierra 10.13 from and .iso file and got the error saying that “The copy of the install High Sierra application is damaged, and can’t be used to install macOS

    Then I downloaded .iso of Sierra 10.12 and for some reason I can’t select the virtual hard drive for the installation. It only shows DVD disk (OS X Base System), which is full.

    Any suggestions?

    1. I was able to install Sierra by going to the disk utility and erasing the virtual hard drive with the default settings.

    2. You should use terminal to set the date before 24 October 2019, since it’s the date the security patch expired. You can use command like this to set date: date 030300002019 MM/DD/HH/MM/YYYY. I successfully installed it after I’ve changed my time.

  12. I was hoping to find information about installing osx in virtualbox in general or on Linux.
    Pity this manual only applies to older outdated platforms
    “1. Install VirtualBox on your Windows PC by following the instructions. Click “New” to create your new virtual machine.”

  13. Javier Araujo you need to activate virtual technology while pc in boot. google for it.
    and disable EFI IN VIRTUAL MACHINE SETTINGS

  14. I m trying to install high Sierra on a virtual box on a Catalina host
    Did all things, but when i click the START button i got a black window with shell command…..
    I don t understand what to do next

    https://imgur.com/a/4Su9yXc

    1. I also had this issue with ending up in a shell. It seems like the problem in the image – I’ve tried two diff utils (AnyBurn and dmg2img) for converting DMG to ISO and seems like a bootable image should be converted in a diff way (or maybe I need to try to download another dmg and try again). Anyway, I took this image https://www.mediafire.com/folder/6p5rv8jd50cua/macOS_Catalina_10.15.3_by_Geekrar_(One_Full), (from these guys www.geekrar.com) and everything went okay, I could finally reach the installation screen.

  15. How do I Install graphic/video driver for the Mac OS? On Windows Virtual Machine, it is easy enough.

  16. It just boots into the UEFI shell. Doesn’t even look at the ISO.

    I can’t find anyway to get it to boot the image. Just drops into the shell….

    WTF?

  17. THERE YOU GO
    it does not work for me

    VBoxManage modifyvm “macos” –cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
    VBoxManage.exe: error: Could not find a registered machine named ‘macos’
    VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown
    VBoxManage.exe: error: Context: “FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())” at line 547 of file VBoxManageModifyVM.cpp

  18. Ive installed a couple of times with different methods and system ran but network always failed found yours and tried, but failed to boot to install section with Failed to open a session for the virtual machine Mac OS X , name is correct, so could you point me in a direction to cure this?
    thanks

Comments are closed.