Table of contents:
- 1. Check PC compatibility
- 2. Prepare the macOS image
- 3. Select and install virtualization software
- 4. Create a virtual machine
- 5. Configure the virtual machine
- 6. Configure additional parameters
- 7. Install macOS in a virtual machine
- 8. Check the operation of the virtual machine
2024 Author: Malcolm Clapton | [email protected]. Last modified: 2023-12-17 03:44
Detailed instructions for those who need Xcode or just want to try Apple's proprietary OS.
1. Check PC compatibility
You need a relatively modern computer to run macOS. For more or less comfortable work, you need a quad-core processor, 8 GB of RAM and discrete graphics.
In addition, the processor must support virtualization technologies at the hardware level. For Intel chips, this is VT-x or VT-d, for AMD - AMD-V. Almost all modern processors have it, but it will not be superfluous to check.
This can be clarified in the description of a specific chip model on the manufacturer's website or using the free CPU-Z utility.
- application from the official website and install.
- Start CPU-Z and take a look at the Instructions line.
- If there are the above markings, then everything is in order.
- If not, you can use software virtualization, but in this case the performance will be noticeably lower.
2. Prepare the macOS image
MacOS installation images are not freely available, and Apple prohibits the use of its OS on computers from other manufacturers. To get an image of a bootable disk, you can try to find it on the Internet or borrow a Mac from a friend.
We will use the second option.
- On a Mac, go to and click Open App Store.
- Click "Download", wait for the installer to download and close it.
- Open the Applications folder → Utilities and launch Terminal.
-
Create a disk image container by copying the command
hdiutil convert ~ / Desktop / InstallSystem.dmg -format UDTO -o ~ / Desktop / HighSierra.iso
-
Mount it with the command
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint / Volumes / install_build
-
Expand the system installer to the created image with the command
sudo / Applications / Install / macOS / High / Sierra.app/Contents/Resources/createinstallmedia --volume / Volumes / install_build
- Enter the administrator password and confirm by pressing Y and Enter.
-
Move the image to the desktop with the command
mv /tmp/HighSierra.cdr.dmg ~ / Desktop / InstallSystem.dmg
-
Unmount the installer with the command
hdiutil detach / Volumes / Install / macOS / High / Sierra
-
Convert macOS image to ISO format with the command
hdiutil convert ~ / Desktop / InstallSystem.dmg -format UDTO -o ~ / Desktop / HighSierra.iso
- Change the extension of the image file to ISO and transfer it using a flash drive to the PC where the virtual machine will be installed.
3. Select and install virtualization software
There are many free and paid virtual machines out there. VmWare, Parallels, VirtualBox are suitable for installing macOS. For our example, take the latter: it is freely available and well known.
- to the official VirtualBox website and click on the Windows hosts link.
- Open the downloaded file and follow the instructions of the installation wizard.
- Confirm the installation of additional components in the process.
4. Create a virtual machine
Now in VirtualBox, we need to create our virtual computer, on which we will later install macOS.
- Run the utility, click the "Create" button and enter a name for the machine.
- Specify the type and version of the OS, in our case - Mac OS X and macOS 10.13 High Sierra.
- Enter the amount of RAM. The more, the better, but it is better not to go beyond the green zone.
- Select "Create a new virtual disk" and the VDI type.
- Specify the format "Dynamic" and set the desired size. Recommended from 30 GB, depending on the amount of software that you plan to use.
5. Configure the virtual machine
To start the guest OS correctly, you need to allocate the optimal amount of resources on the main computer, configure some settings and select the macOS image as the boot disk.
- Select the virtual machine and click Configure in the toolbar.
- Go to the "System" section and on the "Motherboard" tab, uncheck the "Floppy disk" item, and then move it down using the arrow. Leave the rest unchanged.
- On the "Processor" tab, specify the number of cores. Better not to leave the green area.
- In the "Display" section, set the maximum amount of video memory and make sure that both acceleration checkboxes are unchecked.
- In the "Media" section, click on the "Empty" line, and then on the disk icon and select the ISO image that we prepared in the second step.
- Click OK to save the settings and close VirtualBox.
6. Configure additional parameters
Due to the limitations mentioned above, macOS only runs on branded Apple computers. In order for the system to be installed in VirtualBox, you have to tinker a little in the console and pretend to be an iMac.
- Open search, enter cmd and run Command Prompt.
- Copy the following commands one by one, replacing mac with the name of your virtual machine.
cd "C: / Program Files / Oracle / VirtualBox \"
VBoxManage.exe modifyvm "mac" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal / Devices / efi / 0 / Config / DmiSystemProduct" "iMac11, 3"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal / Devices / efi / 0 / Config / DmiSystemVersion" "1.0"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal / Devices / efi / 0 / Config / DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal / Devices / smc / 0 / Config / DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal (c) AppleComputerInc"
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal / Devices / smc / 0 / Config / GetKeyFromRealSMC" 1
7. Install macOS in a virtual machine
Now you can proceed to the installation of macOS itself. This procedure is divided into several stages and takes about an hour. In the process, you will have to tinker with the command line again, but this time for the last time.
First step
- Open VirtualBox and start the virtual machine.
- The system will begin to preload. A lot of text will be displayed on the screen, among which there may be information about errors. Pay no attention to this.
- After a few minutes, the apple logo will appear and the graphical interface will load.
- Select your system language and run Disk Utility from the menu.
- Specify the virtual disk that we created in the fourth step and click the "Erase" button.
- Give the name and leave the rest of the options as they are. Confirm erasing.
- Select Install macOS from the Utilities window and click Continue.
- Accept the license agreement and click on the created disc.
- Wait while the installation files are copied to disk and the system reboots.
- When the macOS Utilities window reappears, go to the Apple menu and click Shut Down.
Second phase
- Select the virtual machine in VirtualBox and open its settings.
- Go to the "Media" section and click on the HighSierra.iso line, and then on the disk icon and click on "Remove disk from drive".
- Click OK and start the virtual machine again.
- After booting, a UEFI shell with a command line appears, into which you need to manually enter the following commands one by one:
Fs1:
cd "macOS Install Data"
cd "Locked Files"
cd "Boot Files"
boot.efi
Stage Three
- This will launch the graphical interface and continue with the installation.
- After a few minutes, the virtual machine will reboot and the initial system configuration interface will open.
- Specify the country and keyboard layout.
- Select Don’t transfer any information now to set up the system as new.
- Skip signing in to your Apple ID by clicking Setup later and Skip.
- Accept the terms of the license agreement, and then enter your username and password.
- Click Continue and follow the prompts to customize your keyboard.
8. Check the operation of the virtual machine
MacOS installation is complete. The operating system runs in a separate window that can be minimized or moved to another monitor.
To turn on the virtual machine, open VirtualBox and click the Start button. Shutdown and reboot can be done both from the utility and through the macOS system menu.
Recommended:
What can't you do to get through the breakup?
Casual sex and blackmail won't help. This question was submitted by our reader. You also ask your question to Lifehacker - if it is interesting, we will definitely answer. What in no case should you do to get through the breakup normally?
How to issue a tax deduction through the FTS website: step-by-step instructions
How to apply for a tax deduction? Now you don't even have to go to the Federal Tax Service - everything can be done online. Here's a simple and straightforward instruction
How to install a font on Windows and macOS
We will tell you how to install a font in Windows and macOS so that later it can be used in Word, PowerPoint, Photoshop and other programs
How to enable virtual keyboard on Windows and macOS
If the batteries run out, the keys get stuck, the keyboard is not recognized or there is none at all, an on-screen analog will help you. It can be turned on in a couple of clicks
How to install macOS Catalina now
If for some reason you need a beta version of macOS Catalina, you can try it out right now. Lifehacker tells how to do it