0% found this document useful (0 votes)
9 views

How to Install macOS on a Virtual Machine_ Step-by-Step Guide

This document is a step-by-step guide on how to install macOS on a virtual machine using VirtualBox. It covers the necessary preparations, including creating a macOS installer, installing VirtualBox, setting up a virtual machine, and patching it for proper functionality. The guide is aimed at users who want to try macOS without purchasing a new computer.

Uploaded by

freddy mabou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

How to Install macOS on a Virtual Machine_ Step-by-Step Guide

This document is a step-by-step guide on how to install macOS on a virtual machine using VirtualBox. It covers the necessary preparations, including creating a macOS installer, installing VirtualBox, setting up a virtual machine, and patching it for proper functionality. The guide is aimed at users who want to try macOS without purchasing a new computer.

Uploaded by

freddy mabou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

How to Install MacOS on a Virtual Machine


Using VirtualBox
Learn how to create a macOS virtual machine using Virtual Box
Written by Nicole Levine, MFA
Last Updated: April 6, 2024 Fact Checked

Creating a macOS Installer | Installing VirtualBox | Creating a Virtual Machine | Virtual Machine Settings
| Patching the Virtual Machine | Installing macOS | Video

Are you in the market for a new computer and want to try macOS to see if you like it? Or
you may want to use Mac-specific apps but only have a Windows PC. Installing macOS on
a virtual machine on a PC is a great way to play with macOS without buying a new
expensive computer. This wikiHow guide will teach you how to install macOS on a virtual
machine using VirtualBox.

Things You Should Know

You will need an ISO file of the macOS installer. Starting with Big Sur, you can only
create that file on a Mac.
Once you create the installer, copy it to your PC. You can then install VirtualBox and
its extensions.
Create a new virtual machine in VirtualBox, patch it with our instructions, and get
macOS running in no time.

Part
1 Creating a macOS Installer

Download macOS from the Mac App Store. You'll need the installer to
1 install the latest version of macOS on a virtual machine. Unlike previous
macOS versions, Sonoma (and all of its predecessors beginning with Big Sur,
including Ventura) is only downloadable from the Mac App Store. If you're using a

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 1/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

Mac, this is easy. On Windows and Linux, you'll need to find someone with a Mac
to create the file for you.
On a Mac, launch the App Store, search for maco s sonoma , (or Ventura),
click Get, and then click Download.[1]
The remaining steps in this part of the process will walk you through creating
the macOS Sonoma or Ventura installer on a Mac to use for your VM.

Open a Terminal. Open the Launchpad, type term i nal , and select
2 Terminal.
Advertisement

Create an empty disk image. To do this, type the following command and
3 press Return:
hdiu t il create -o /tmp/S o n o m a - s i z e 1 6 3 8 4 m - v o ln a m e
Sono m a -layout SPUD -fs H F S + J
If you're using Ventura, you can replace Sonoma with Ventura in all of these
steps.

Mount the empty disk image. To do this, you'll need to run another
4 command:
hdiu t il attach /tmp/Sono m a . d m g - n o v e r i f y - m o u n tp o i n t
/Vol u mes/Sonoma

Create install media from the image. Run this command to do so:
5
sudo /Applications/Insta l l \ m a c O S \
Sono m a.app/Contents/Reso u r c e s / c r e a t e i n s t a l l m e d ia - -
volu m e /Volumes/Sonoma – n o i n t e r a c t i o n
Because you used the sudo command, you'll be prompted to type your Mac
user password. Type your password (you won't see any characters while
doing so) and press Return to start the process.

Unmount the new disk image. To do this, run this command:


6
hdiu t il eject -force /Vo l u m e s / I n s t a l l \ m a c O S \ So n o m a .

Create a file that you can turn into an ISO image. The following command
7 turns your Sonoma image into a CDR file, which is easy to convert to the type
of file you'll need to install macOS in your virtual machine:

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 2/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

hdiu t il convert /tmp/Son o m a . d m g - f o r m a t U D T O - o


~/De s ktop/Sonoma

Convert the CDR file to an ISO. All you'll need to do is change the file's
8 extension, which you can do by running this command:
mv - v ~/Desktop/Sonoma.c d r ~ / D e s k t o p / S o n o m a . i s o
You now have a file called Sonoma.iso on your desktop. You will use this file
to install macOS on your virtual machine. If you want to install it on Windows,
copy it to a flash drive or upload it to a cloud storage service like iCloud or
Google Drive.
To delete the file you originally downloaded, which is no longer needed, run
this command: rm - f v /tmp/Sonoma.dmg

Advertisement

Part
2 Installing VirtualBox

Download VirtualBox. VirtualBox is a virtual machine created by Oracle. You


1 can use VirtualBox on Windows, Intel-based Macs, and Linux.[2]
Go to https://www.virtualbox.org/wiki/Downloads in a web browser like
Google Chrome.
To install on Windows, click the Windows hosts link. On a Mac, click
macOS/Intel hosts. On Linux, click Linux Distributions, then download the
installation file for your version of Linux.
Once downloaded, double-click the installer and follow the on-screen
instructions to install.

Download the VirtualBox expansion pack. This expansion pack enables


2 USB 3.0 for keyboard and mouse support.
Go to https://www.virtualbox.org/wiki/Downloads.
Scroll down and click All supported platforms below "VirtualBox 7.0.14
Oracle VM VirtualBox Extension Pack."
Double-click the expansion pack file in your web browser or Downloads folder,
click Install, and follow the on-screen instructions.

Advertisement

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 3/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

Part
3 Creating a Virtual Machine

Create a new virtual machine in VirtualBox. Open VirtualBox after


1 installing, then use these steps to create a new virtual machine for your Mac
installation:
Click New below the blue icon that resembles a circle with jagged edges.
Type a name for the new computer next to "Name" (e.g. macO S Sonoma ).
Select a location on your computer to install the virtual machine. Be sure to
choose a drive with plenty of space.
Select the ISO file from the "ISO Image" menu.
Select Mac OS X as the "Type."
Select Mac OS X (64-bit) as the version.
Click Next.

Allocate memory & CPU to the virtual machine and click Next . Click
2 and drag the slider bar to allocate memory to the virtual machine. You can
also type the amount of memory in megabytes (MB) in the box to the right of the
slider bar. macOS needs at least 4 GB (8 GB recommended) to run.
Also, allocate at least 2 CPU cores to macOS using the second slider.
The more memory you allocate, the better it will run. You cannot allocate more
memory than your computer has.[3]
Don't allocate more than 40% of your RAM to your virtual machine; otherwise,
it will slow down your operating system.
The red line above the slider bar indicates how many CPU cores your
operating system needs to run. Do not drag the slider bar past the green line
to avoid performance issues.

Create a virtual hard disk. Now, you'll need to allocate some hard drive
3 space to your macOS installation. Ensure the radio option next to "Create a
virtual hard disk now" is checked, and use the slider to dedicate at least 35 GB of
hard drive space to your virtual Mac. If you have space to spare and plan to install
software on your virtual Mac, allocate at least 128GB.[4]

Click Finish . This creates a new virtual machine.


4
Advertisement

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 4/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

Part
4 Virtual Machine Settings

Select the virtual machine and click Settings . It's the yellow gear icon at
1 the top of VirtualBox. This allows you to tweak the virtual machine settings.

Click System and uncheck "Floppy." "System" is in the menu panel to


2 the left. Click this option and then click the checkbox next to "Floppy" in the
"Boot order" box. This ensures the virtual machine will not try to boot from a floppy
disk.

Ensure "ICH9" is selected next to "Chipset." This drop-down menu is


3 below the "Boot order" box. If it does not read "ICH9" by default, click the
drop-down menu and select "ICH9" as the chipset.

Click Display in the menu panel to the left. This opens the Display menu
4 for the virtual machine.

Allocate at least 128 MB of video memory. The "Video Memory" slider bar
5 is at the top of the menu. Click and drag the slider to allocate video memory.
You can also type the amount of video memory you want to allocate in the box to
the right. Make sure you are allocating at least 128 MB of video memory.
Additionally, check the box next to "Enable 3D Acceleration" if available.

Click the Network tab and select your adapters.


6
You can leave the default selected on the Adapter 1 tab.
Click the Adapter2 tab. On this tab, you'll select a backup adapter in case the
first isn't available. Select Bridged, and then choose your Wi-Fi card.

Click USB and select "USB 3.0 (xHCI) Controller." The USB menu
7 option is in the menu panel to the left. Click it and then click the radio option
next to "USB 3.0 (xHCI) Controller."

Advertisement

Part
5 Patching the Virtual Machine

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 5/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

Close VirtualBox. It's important that you quit VirtualBox before executing the
1 following code. If you do not, it might not install properly.

Open the Command Prompt as an Administrator. Before running the virtual


2 machine, you must manually patch it using the Command Prompt. Use the
following steps to open the Command Prompt as an administrator:[5]
Click the Windows Start menu.
Type "CMD".
Right-click the Command Prompt.
Click Run as Administrator.
Click Yes.

Change to the location of the VirtualBox installation in Command


3 Prompt. The VirtualBox installation is in the "Oracle" folder in "Program Files"
by default. To change to the location of the VirtualBox installation in the command
prompt, type cd " C :\Program Files\Ora c l e \ V i r t u a l B o x \ " or cd
"%pr o gramfiles%\Oracle\V i r t u a l B o x \ " and press Enter.
If you installed VirtualBox in a different directory, type "cd" followed by the
exact location of the VirtualBox install location in quotation marks.

Enter the following commands and press ↵ Enter . You'll need to enter the
4 following commands in the Command Prompt individually. Copy and paste
each of these long commands into the window and press Enter after each line.
Replace VM Name with the actual name you gave your virtual machine (e.g.,
macOS Sonoma, MyMac, etc.). You'll use different commands for different
processor types:[6]
If you have an Intel processor:
cd " C :\Program Files\Ora c l e \ V i r t u a l B o x \ " (If you
installed VirtualBox in another directory, replace the path here)
VBox M anage.exe modifyvm " V M N a m e " – - c p u i d s e t
0000 0 001 000106e5 001008 0 0 0 0 9 8 e 3 f d b f e b f b f f
VBox M anage setextradata " V M N a m e "
VBox I nternal/Devices/efi / 0 / C o n f i g / D m i S y s t e m P r o du c t
“Mac B ookPro15,1”
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/ef i / 0 / C o n f i g / D m i B o a r d P r o du c t "
"Mac - 551B86E5744E2388"

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 6/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

VBox M anage setextradata " V M N a m e "


"VBo x Internal/Devices/sm c / 0 / C o n f i g / D e v i c e K e y "
"our h ardworkbythesewords g u a r d e d p l e a s e d o n t s t e a l (c ) A p
pleC o mputerInc"
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/sm c / 0 / C o n f i g / G e t K e y F r o m R ea l S M
C" 1
If you have an AMD processor:
cd " C :\Program Files\Ora c l e \ V i r t u a l B o x \ " (If you
installed VirtualBox in another directory, replace the path here)
VBox M anage.exe modifyvm " V M N a m e " - - c p u i d s e t
0000 0 001 000106e5 001008 0 0 0 0 9 8 e 3 f d b f e b f b f f
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/ef i / 0 / C o n f i g / D m i S y s t e m P r od u c t
" "i M ac11,3"
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/ef i / 0 / C o n f i g / D m i S y s t e m V e rs i o n
" "1 . 0"
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/ef i / 0 / C o n f i g / D m i B o a r d P r o du c t "
"Ilo v eapple"
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/sm c / 0 / C o n f i g / D e v i c e K e y "
"our h ardworkbythesewords g u a r d e d p l e a s e d o n t s t e a l (c ) A p
pleC o mputerInc"
VBox M anage setextradata " V M N a m e "
"VBo x Internal/Devices/sm c / 0 / C o n f i g / G e t K e y F r o m R ea l S M
C" 1
VBox M anage modifyvm "VM N a m e " - - c p u - p r o f i l e " I nt e l
Core i7-6700K"

Advertisement

Part
6 Installing macOS

Reopen VirtualBox and click Start . This starts your new virtual machine.
1 It may take several minutes for macOS to finish initializing. Especially the first
time you launch macOS.

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 7/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

Select your language and click the arrow icon.


2
Select Disk Utility and click Continue . You will need to format the
3 virtual drive to install macOS Sonoma or Ventura. You can do that in Disk
Utility.

Select VBOX HARDDISK Media and click Erase . Click "VBOX HARDDISK
4 Media" on the panel to the left and then click Erase at the top. It has an icon
that resembles a hard drive with an "x" in front of it.

Type a name for the hard disk and click Erase . Use the bar at the top of
5 the pop-up to type a name for the hard drive (e.g., "macOS HD") and click
Erase to format the drive.

Quit Disk Utility. When you're finished, click Done, then click the red circle at
6 the top of the window to close Disk Utility.

Select Install macOS Sonoma (or Ventura) and click Continue . It's the
7 second option in the menu.

Agree to the Terms and Conditions. To agree to the Terms and Conditions,
8 click Agree, and then Agree again.

Select the newly formatted hard drive and click Continue . The hard
9 drive you just formatted should be listed at the bottom of the screen. Click this
hard drive and click Continue to begin installing macOS.

Go through the macOS setup process. Now that you've installed macOS,
10 follow the on-screen instructions to set up the operating system like you'd
set up a new Mac.

Advertisement

Tips

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 8/9
10/04/2024 19:10 How to Install macOS on a Virtual Machine: Step-by-Step Guide

Warnings

Apple does not support installing macOS on non-Apple computers. You will not be
able to get customer support for any Apple products installed on a non-Apple
computer.

Advertisement

References

1. https://www.youtube.com/watch?v=Uun55VXu72M&t=0s
2. https://www.virtualbox.org/wiki/Downloads
3. https://www.virtualbox.org/manual/ch01.html
4. https://www.macworld.co.uk/news/dont-update-big-sur-128gb-mac-3798034/
5. https://grok.lsu.edu/article.aspx?articleid=18026&printable=y
6. https://www.youtube.com/watch?v=v6la6a2LSf0
Advertisement

https://www.wikihow.com/Install-Macos-on-a-Virtual-Machine 9/9

You might also like