Installing Mavericks inside a virtual machine is fairly easy, but there are a few tricks to be aware of if you’re on a newer Mac. Credit to Natsuki’s post for sharing how to get the Mavericks installer to run on Apple computers with Intel Haswell CPU’s. Natsuki also notes a workaround for Apple computers with ECC RAM that requires the removal of a kernel module from the install image using iesd.
Download and install the latest VirtualBox for OS X hosts from here. We’ll be using VirtualBox so that anybody can follow these steps.
Download the Mavericks Installer App through the App Store.The Mavericks installer is provided for free by Apple for users to upgrade their computers to the latest version of OS X. We’ll be making use of the install image provided by this application to install Mavericks within a virtual machine.
While we’re waiting for the Mavericks Installer to download, lets get started on configuring our new Virtual Machine.
Create a New Virtual Machine
Lets call it “Mavericks”
Lets allocate 2 GB of my host machine’s 8 GB of RAM
Lets create a new blank disk image for this machine
The VDI format should be fine for what we’re doing
A dynamically sized disk should also be fine for what we’re doing
Lets call this disk image “Mavericks” too
And we’re successfully created our virtual machine
We need to check if your computer has an Intel Haswell processor. We’re going to use “About This Mac” to check.
Lets launch “About This Mac”
Click on “More Info…”
If you see “Late 2013” or later, we’ll need to change the CPUID for our virtual machine so the installer image boots
We need to determine the name of the virtual machine, if you called it something other than “Mavericks” you’ll need to use the name you get from this command:
VBoxManage list vms
Now that we have the name, we can specify the CPUID for that virtual machine
VBoxManage modifyvm Mavericks --cpuidset 00000001 000306a9 00020800 80000201 178bfbff (Substitue Mavericks with what you got from
VBoxManage list vms if you have something different)
In your terminal, run
sudo gem install iesd
iesd is a Ruby applicaiton with extracts the installer disk image from the installer application to for use as a boot disk for your virtualization software.
iesd -i /Applications/Install\ OS\ X\ Mavericks.app -o Mavericks.dmg -t BaseSystem
Now you’ll have a Mavericks.dmg inside your user’s home folder.
Now we’ll attach this disk image to our virtual machine
Click on the “Storage” text of this new machine
Click on the “Empty” list item
Click on the CD icon to “Choose A Virtual CD/DVD Disk File…”
Choose the Mavericks.dmg file that iesd produced in your home folder
Now we’re set to install Mavericks within the VM!
Wait for the VM to boot. You’ll see plenty of black on white text scroll by with some errors and warnings, but they are acceptable.
And we’ve booted!
The mouse will be very laggy on this screen because of the animation, so it may be easier to hit the “Enter” key than to navigate to the next button with the mouse.
Before continuing with the installer, we need to format the blank disk so that the installer detects it as an install location.
Go to “Utilities” -> “Disk Utility…” to launch the Disk Utility
Select the “VBOX” disk and go to the “Erase” tab. Give the disk a better name than “Untitled”, I’m partial to “Mavericks” and then click “Erase”
Click “Erase” again when prompted
Wait for the disk to be erased. Once it’s ready, the named disk will appear in the top left of Disk Utility.
Quit Disk Utility
Now we’re all set to install Mavericks!
Click “Continue” on the Installer
Agree to the EULA and note the section that permits what we are doing
Select the volume we created with Disk Utility and click Install
It will take a little over 20 minutes for the installer to run
We’ve successfully installed Mavericks. Lets take a snapshot of the machine at this point in case we ever want to reset back to the big bang.
After the Machine restarts, we’re actually going to want to “Power off the machine” so that we can take a snapshot of the virtual disk and detach the install disk
On VirtualBox Manager, click on “Snapshots” for this machine
Click the Camera icon to take a snapshot
Name your snapshot
Lets not forget to detach the the installer image.
Switch back to the “Details” pane and click on the “Storage” text
Click on the installer image, then the CD icon, and finally “Remove disk from virtual drive”
From here, you’re good to go to start the virtual machine again and continue with the installer. I’d recommend taking another snapshot after you’ve set up the virtual machine so that you have another checkpoint to restore to.
From the VirtualBox documentation, it is possible to set higher resolutions with
VBoxManage setextradata "VM name" VBoxInternal2/EfiGopMode N where N values of 0-5 correspond with 0=640×480, 1=800×600, 2=1024×768, 3=1280×1024, 4=1440×900, 5=1920×1200
Thanks for sticking through this how-to. I hope that this VM image will be useful in testing your OS X applications. Don’t forget to make liberal use of snapshots; and remember that you can create lightweight, snapshot-based clones of this VM if you need more than one.
You should join me in the comments for discussion of this how-to.