This article will show you how to install mac os ( include both mac os high sierra & Mojave ) in VirtualBox virtual machine. And the host os is windows 10. Below are the steps, you can follow them.
- First, you should install VirtualBox, this is very straightforward in windows, you can just download VirtualBox and install it.
- Whether you want to install mac os high sierra or Mojave, you should prepare the high sierra or Mojave iso file first, please read the article How To Download MacOS X High Sierra Installer In Mojave, How To Download macOS Mojave Installer And Convert To ISO File. This step needs you to have a mac book pro, if you do not have one, you can search the download link ( for example search the sentence macOS Big Sur iso download ) using google and get one.
2. Install Mac OS On VirtualBox Virtual Machine Steps.
2.1 Create macOS Virtual Machine In VirtualBox.
- Open VirtualBox, click the New button to create a new virtual machine. Input macOS high sierra or macOS Mojave in the Name field, select Mac OS X in the Type drop-down list, select Mac OS X(64-bit) in the Version drop-down list, then click the Next button.
- Set the virtual machine’s memory size in the next wizard window, you had better set a half memory size of your physical memory size. This can make the virtual machine run faster.
- Select Create a virtual hard disk now radio button in the next wizard window. Then click Create button.
- Click the Next button in the following two wizard dialog windows until the File location and size wizard dialog window. Input the hard disk size that you need in this window.
- Click the Create button in the above window to create the hard disk. Then it will go to the virtual machine list window, you can see the newly created virtual machine in the left panel, and it’s status is Powered Off.
2.2 Configure macOS Virtual Machine To Install macOS Mojave Or High Sierra.
Now the macOS virtual machine has been created, and then we need to do some settings for it. The configuration includes system motherboard & processor, display video memory, choose mac os iso file in storage, and network mapping method.
- Select the newly created mac os virtual machine in the left list panel, then click the Settings icon in the top bar to open the virtual machine settings window.
- In the macOS Settings window, click the System item in the left panel, then in the right panel click Motherboard tab —> Boot Order list, uncheck Floppy checkbox.
- In System —> Processor tab, select the processor number that you assign to the mac os virtual machine.
- Select Display in the left panel, assign all physical memory to this mac os virtual machine’s Video Memory in the right panel Screen tab.
- Click Storage in the left panel, then click Empty laser disk in right panel Storage Devices area, then click the Optical Drive icon, and click Choose Virtual Optical Disk File… menu item to open select file dialog, choose the Mojave or high sierra iso file just created or downloaded. Click the Open button in the file select dialog.
- Click Network on the left panel, then click the Adapter 1 tab on the right panel and select Bridged Adapter in the Attached to drop-down list. Click the OK button to close the virtual machine Settings dialog.
2.3 Run VBoxManage Command Before Start Mac OS Virtual Machine.
Before starting the macOS virtual machine, you need to run the VBoxManage command tool to configure some settings. This action is very important to install macOS on a virtual machine. So please be patient to follow the below steps to do it.
- Right-click Windows 10 start button, click Run menu item, then input cmd, click enter key to open dos window.
- Input below command one by one in dos window to configure VBoxManage settings for mac os Mojave. Please use your mac os virtual machine name to replace Your-Mac-OS-VM-Name.
cd "C:\Program Files\Oracle\VirtualBox\" VBoxManage.exe modifyvm "Your-Mac-OS-VM-Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
- If you want to install macOS high sierra, then run the below command in the dos window one by one, use your mac os virtual machine name to replace Your-Mac-OS-VM-Name.
cd "C:\Program Files\Oracle\VirtualBox\" VBoxManage.exe modifyvm "Your-Mac-OS-VM-Name" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "Your-Mac-OS-VM-Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
- Please remember your VirtualBox virtual machine’s name carefully, otherwise, you will get the below error message. In the below command line, I misspell “macOS Mojave” to “macOS mojava”, then it will through error.
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyvm "macOS mojava" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff VBoxManage.exe: error: Could not find a registered machine named 'macOS mojava' 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).raw(), machine.asOutParam())" at line 522 of file VBoxManageModifyVM.cpp
2.4 Start Mac OS Virtual Machine.
Now it is time to start the mac os virtual machine to complete mac os installation.
- Select the mac os virtual machine in the VirtualBox manager left panel, then click the green Start button to start it.
- When the virtual machine started, select os language, then click the Continue button.
- Now the macOS Utilities window will pop up, you can install mac os from a time machine backup, reinstall macOS, or you can use Disk Utility to create the first partition for the mac os virtual machine. I recommend you to use Disk Utility to create a partition on the virtual disk, otherwise, you may encounter no disk to select issue during the installation process. You can read the article How To Fix No Disk To Select Issue When Install Mac OS On Virtual Machine to learn more.
- After creating a virtual disk partition, you will go back to the macOS Utilities window, click Reinstall macOS item to start to install it. The setup wizard window is straightforward. After you select the virtual disk and click the Continue button, you will see a window to notify you of the installation process ( remaining time, etc ).
- If you meet the below error message during mac os installation progress. Installation of macOS could not continue, installation requires downloading important content. That content cannot be downloaded at this time. Try again later. Just wait for some time to reinstall again, this is because of the network issue.
- When the above installation process completes, all the files needed have been copied to the virtual disk, the mac os virtual machine will be restarted automatically, but it still boots from the installer iso file again, and you just see the macOS Utilities window again. So you need more actions to make this virtual machine boot from the virtual hard disk.
2.5 Make Mac OS Virtual Machine Boot From Virtual Hard Disk And Continue Install.
- Shut down the mac os virtual machine by clicking the virtual machine’s close button, and select Power off the machine radio button, then click OK.
- Right-click the mac os virtual machine, then click Settings menu item in the popup menu list.
- In the macOS Settings window, click Storage —> MoJave.iso (or high-sierra.iso ) —> Optical Drive, select Remove Disk from Virtual Drive menu item in the list to remove the Mojave (or High Sierra ) iso file, so the virtual machine will not boot from the iso file again when restart. Click the OK button to save the changes.
- Now start the mac os virtual machine again, you will enter a command-line shell which is called UEFI Interactive Shell like below.
UEFI Interactive Shell v2.1 EDK II UEFI v2.40 (EDK II. 0x00010000) Mapping table FS0: Alias(s):HD7a0a1:;BLK1: PciRoot(0x0)/Pci(0x1F.0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,B7FA76E7—9D69—40B3—9759—D44AA269151D.0x2B.0x64000) FS1: Alias(s):HD7a0a2:;BLK2: PciRoot(0x0)/Pci(0x1F.0x2)/Sata(0x0,0x0,0x0)/HD(2,GPT,C80B4F68—E146—430F—AC21—C08C8B36D706.0x6402B.0x2575BFB0) BLK0: Alias(s): PciRoot(0x0)/Pci(0x1F.0x2)/Sata(0x0,0x0,0x0) BLK3: Alias(s): PciRoot(0x0)/Pci(0x1F.0x2)/Sata(0x0,0x0,0x0) Press ESC in 1 seconds to skip startup.nsh or any other key to continue. Shell> _
FS1:in the above shell command line, then click enter key, it will switch to FS1 virtual disk, this disk will save all the mac os install files. You can run the ls command to list all the files in the FS1 virtual disk.
Shell> FS1: FS1:\> _
- Now run the below shell command to go to the boot folder in the virtual hard disk. The boot.efi file is the boot file that will start the rest of the mac os installation process.
FS1:\> cd "macOS Install Data" FS1:\macOS Install Data\> cd "Locked Files" FS1:\macOS Install Data\Locked Files\> cd "Boot Files" FS1:\macOS Install Data\Locked Files\Boot Files\> ls Directory of: FS1:\macOS Install Data\Locked Files\Boot Files\ 06/05/2019 11:20 893 .disk_label 06/05/2019 11:20 15 .disk_label.contentDetails 06/05/2019 11:20 3,557 .disk_label_2x 06/05/2019 11:20 592,440 boot.efi 06/05/2019 11:20 488 com.apple.Boot.plist 06/05/2019 11:20 4,500 PlatformSupport.plist 06/05/2019 11:20 26,190,241 prelinkedkernel 06/05/2019 11:20 534 SystemVersion.plist 8 File(s) 26,792,66B bytes 1 Dir(s) FS1:\macOS Install Data\Locked Files\Boot Files\> boot.efi
- When you run the boot.efi file, it will show some command line in the screen, after some while, you will see the mac os installing dialog window, it will display how much time is left to install the macOS.
- When the above installation process completes, your virtual machine will restart, if you are installing mac os high sierra, you will enter the mac os setup interface Welcome dialog window. Just follow the instruction in the setup wizard, it is straightforward to finish configuring it.
- But if you are installing the macOS Mojave, you may enter the UEFI Interactive Shell command interface again. To fix this issue, you should first install macOS high sierra, then upgrade your os to macOS Mojave.