Hello everybody!
This video will show you how to install MacOS on an Oracle VirtualBox virtual machine.
The Apple policy is that MacOS should not be used with hardware from other manufacturers.
However, what can you do if you need to use MacOS?
In this video, I’m going to tell you how to install MacOS High Sierra operating system
on a VirtualBox virtual machine.
Which means that an Apple operating system will work as an add-in, or simultaneously
with Microsoft Windows.
To install MacOS on a Windows computer, you will need to:
• Download and install a virtual machine - Oracle VirtualBox.
This software if free.
I will give the download link in the description: You have to download and install the Windows
Hosts software package.
By the way, in our channel there is a detailed video about creating an Oracle VirtualBox
virtual machine, and recovering data from VDI, a virtual disk of such machine.
I will give the link in the description: • And find an offical .iso image of MacOS
installation disk to install the operating system of the version you want.
In my case, that is MacOS High Sierra.
While things are more or less clear when it comes to installing VirtualBox, there’s
a question: where can you get a MacOS image?
You can create it yourself by using a computer where such operating system is installed,
or you can ask anyone using iMac or MacBook to create such disk for you.
Of course, there are many web resources where you can download ready-made MacOS High Sierra
images but I can’t recommend this way.
Now let’s find out how to create an official .iso image of MacOS High Sierra and how to
use it for installation of the operating system to VirtualBox.
Please note: I will show how it’s done with the example of this particular system, MacOS
High Sierra.
In case with Sierra, the previous version, the methods to create an image and install
the operating system will be quite different.
To create an .iso image of the MacOS High Sierra installation disk, do the following:
• Go to App Store • Find MacOS High Sierra there
• Click Download and wait until the download
process is complete.
• When MacOS High Sierra installation files are downloaded, close the installation window.
• and the App Store window too.
Now go to Finder / Applications Find the completed download of MacOS High Sierra to make sure
it was successful.
You can say it’s successful only if there is a completely downloaded system image file
of about 5 Gb.
In this case, you can go straight to the Terminal and run commands to convert the downloaded
MacOS High Sierra installation files into the .iso format.
The matter is that sometimes the system doesn’t let you download the entire installation kit
for MacOS High Sierra.
Instead, you only download a 20 Mb installer application which then downloads the full
version during the installation process.
This is the installer that I have just downloaded.
I don’t need it because I can’t use it to create an .iso image of High Sierra.
So I delete it.
In this case, you can download the full installation kit for MacOS High Sierra with MacOS High
Sierra Patcher Tool: • Go to the kit webpage and download it.
I will give the link in the description:
• Wait for the download to finish.
• Double-click on the downloaded file to begin installation.
• After the installation is over, the MacOS High Sierra Patcher window will open.
Drag the tool to the Applications menu •
Now run it.
• Confirm your decision to open it.
• Ok • After that, the MacOS High Sierra Patcher
menu will appear in the system menu above.
• Click on Tools.
• Select “Download MacOS High Sierra.”
• Confirm your decision to download the 5 Gb distribution package.
• Specify the download location, the Applications menu.
• Start the download.
After you have downloaded the full installation package of MacOS High Sierra:
• Open the Utilities folder.
• and start the Terminal.
In the Terminal, enter the commands to convert the MacOS High Sierra installation kit into
the .iso disk.
For convenience, I’ve copied them into a text file, and now I’ll paste them one by
one into the Terminal.
Let’s create an empty disk image: hdiutil create -o /tmp/HighSierra.cdr -size
7316m -layout SPUD -fs HFS+J
Mount it: hdiutil attach /tmp/HighSierra.cdr.dmg -noverify
-nobrowse -mountpoint /Volumes/install_build
Now expand disk image file BaseSystem.dmg from the system installation files into a
freshly mounted disk image: asr restore -source /Applications/Install\
macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify
–erase
Dismount the disk image: hdiutil detach /Volumes/OS\ X\ Base\ System
Convert the .dmg MacOS image file into a Windows-compatible .iso file:
hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso
And move it to the Desktop: mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso
As you can see, the .iso image file of the MacOS High Sierra installation disk is created
and now located in the Desktop.
Now let’s connect a flash drive or an external hard disk to your Mac device and transfer
the created MacOS High Sierra installation disk image to a computer with VirtualBox.
Don’t forget that MacOS is incompatible with NTFS file system.
To make sure the media is recognized in MacOS, format it in exFAT beforehand.
Now let’s go to the computer where you need to install MacOS on VirtualBox.
So, let’s begin.
• Use the link in the description of this video to download and install VirtualBox.
• Start VirtualBox and create a new virtual machine.
For convenience, I choose Expert mode, but it’s not a must.
• Assign a name to the new virtual machine • Select the type and version of the operating
system • Allocate the random-access memory for
the virtual operating system.
I choose 4 GB, and if you can’t afford that, give it at least 2 GB.
There’s no point in having a virtual machine with memory less than that.
• I select “Create a new virtual hard disk”
• Next.
• Choose the preferred size, type and format of the virtual hard disk.
I will stick to default options.
It doesn’t affect MacOS installation at all.
• Next.
The virtual machine has been created, now let’s move on to settings:
• Right-click on it and select Settings.
• I will leave general settings without changes.
• System / Motherboard.
• Uncheck the box next to Floppy Drive and move it down.
• ICH9 Chipset, enable EFI mode.
• Processor.
Set the number of processors for the system we’re creating.
If 4 are available, you can allocate 2 for the virtual machine.
It’s only for the better.
• Acceleration.
By default.
• Dispay / Screen.
• Set the video memory to maximum and uncheck the acceleration boxes.
• Don’t change the rest.
• Storage.
• Here, we can see a freshly created virtual hard disk and an empty disk.
• Let’s connect the MacOS .iso image to that disk.
• To do it, click on the empty disk.
• In the attributes, click on the laser disk symbol / Choose virtual optical disk
file.
• Select the MacOS .iso image / Open.
• Leave other settings at defaut and save the settings.
Now, an important aspect.
There are some more things to be done to this virtual machine.
Close VirtualBox, start the command prompt and enter the following commands:
I’ll paste them from a text file I’ve prepared in advance, for my convenience.
I’d like to point out that in all commands “MacOS” should be replaced with the name
of your virtual machine.
Go to the Oracle VirtualBox folder: cd "C:\Program Files\Oracle\VirtualBox\"
Type in: VBoxManage.exe modifyvm "MacOS" --cpuidset
00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
After that: • run VirtualBox
• start the virtual machine • and it starts the installation process
for MacOS.
The virtual machine for MacOS will start booting.
You will see many lines with information that sometimes looks like errors.
Hoever, if you did everything right, the installer graphical interface will start soon.
• In the first window, choose the system language.
• In the next window, select Disk Utility from the list of tools.
The matter is that this virtual disk has to be prepared for MacOS installation.
• In the left column, you’ll see the list of available disks.
Choose the virtual disk you have created when creating the virtual machine.
• And click Erase.
• Enter the partition name.
• Leave the other two settings without changes and start the cleaning.
• After it’s over, close the Disk Utility.
• In the tool window that appears, select Reinstall MacOS / Continue / Continue.
• Accept the license agreement.
• Select the disk we have created for installation before and click Install.
It starts copying of the files from the installation disk image to the virtual machine disk, followed
by the system installation.
At some moment, all necessary files will be copied to the virtualo machine’s hard disk.
The system will reboot and it will need to boot from the virtual hard disk.
But it’s not going to happen.
VirtualBox will start the installation from MacOS High Sierra .iso image again.
And that’s the way it should be.
• At this stage, power off the virtual machine.
• Go to its Settings / Storage menu.
• Click on the .iso image of MacOS High Sierra.
Click on the disk icon in the attributes.
And select “Remove disk from virtual drive.”
This way, you disconnect the installation disk from the virtual machine.
• Now start the virtual machine again.
This time, the virtual machine will boot the internal EFI window of the system which is
installed.
Enter the following commands, one by one: Fs1:
cd "macOS Install Data" cd "Locked Files"
cd "Boot Files" boot.efi
As a result, the MacOS High Sierra installation graphical interface should boot, this time
from the hard disk of the virtual machine.
Wait until the process is over.
It will take some time.
After that, the virtual machine will reboot and the standard process of MacOS installation
and configuration will start: • Select the country
• Keyboard layout
• Decide if you need to transfer information to this computer.
I don’t need it.
• Also, I won’t be using Apple ID to sign in.
I confirm my decision to skip it.
• Accept the license agreement.
• Enter user name and password for the system you are installing.
Continue.
• Here, leave default settings.
Continue.
• Configure the keyboard with the Setup Assistant.
• That’s all.
MacOS High Sierra has been installed to VirtualBox.
One more time, I’d like to point out that the methods shown in this video to create
an .iso image and install MacOS on VirtualBox are only good for High Sierra.
For the previous version of the operating system, Sierra, the methos to create the image
and instal the operating system on a virtual machine will differ a bit.
One more note.
As you can see, the default screen resolution for the virtual MacOS machine is 1024 х 768.
You can’t change it with system settings.
However, you can change the resolution with the command prompt: To do it:
• Power off and close the virtual machine.
• Run the command prompt.
• Enter the following commands:
Go to the Oracle VirtualBox folder: cd C:\Program Files\Oracle\Virtualbox
Change the horizontal screen size: VBoxManage setextradata “MacOS” VBoxInternal2/EfiHorizontalResolution
1440
And the vertical size: VBoxManage setextradata “MacOS” VBoxInternal2/EfiVerticalResolution
900
Close the Command Prompt and start the virtual machine.
As you can see, the screen resolution for the virtual machine has changed to the settings
we used.
This way, you can change the resolution to any standard value: 800×600, 1024×768, 1280×1024,
1440×900, 1920×1080, 1920×1200.
That is all for now.
If you find this video useful, click the Like button below and subscribe to Hetman Software
channel.
Leave comments to ask questions.
Thank you for watching.
Good luck.