How to Guide for Mavericks VM on Mavericks

Richard —  July 16, 2014 — 15 Comments

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

2014-06-13_1303

Lets call it “Mavericks”

mavericks

Lets allocate 2 GB of my host machine’s 8 GB of RAM

2014-06-13_1304-2

Lets create a new blank disk image for this machine

2014-06-13_1304-3

The VDI format should be fine for what we’re doing

2014-06-13_1305

A dynamically sized disk should also be fine for what we’re doing

2014-06-13_1305-2

Lets call this disk image “Mavericks” too

2014-06-13_1306

And we’re successfully created our virtual machine

2014-06-13_1306-2

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”

2014-06-13_1320

Click on “More Info…”

2014-06-13_1322

If you see “Late 2013” or later, we’ll need to change the CPUID for our virtual machine so the installer image boots

2014-06-13_1323

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

2014-06-13_1328

Now that we have the name, we can specify the CPUID for that virtual machine

Run VBoxManage modifyvm Mavericks --cpuidset 00000001 000306a9 00020800 80000201 178bfbff (Substitue Mavericks with what you got from VBoxManage list vms if you have something different)

2014-06-13_1331

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.

Gem Install

Run iesd -i /Applications/Install\ OS\ X\ Mavericks.app -o Mavericks.dmg -t BaseSystem

2014-06-13_1538

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

2014-06-13_1341

Click on the “Empty” list item

2014-06-13_1342

Click on the CD icon to “Choose A Virtual CD/DVD Disk File…”

2014-06-13_1344

Choose the Mavericks.dmg file that iesd produced in your home folder

missing image

Now we’re set to install Mavericks within the VM!

2014-06-13_1350

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.

2014-06-13_1352

And we’ve booted!

2014-06-13_1354

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

2014-06-13_1436

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”

2014-06-13_1438

Click “Erase” again when prompted

2014-06-13_1439

Wait for the disk to be erased. Once it’s ready, the named disk will appear in the top left of Disk Utility.

2014-06-13_1440

Quit Disk Utility

2014-06-13_1441

Now we’re all set to install Mavericks!

Click “Continue” on the Installer

2014-06-13_1442

Agree to the EULA and note the section that permits what we are doing

2014-06-13_1443

Select the volume we created with Disk Utility and click Install

2014-06-13_1444

It will take a little over 20 minutes for the installer to run

2014-06-13_1445

Restarting

2014-06-13_1511

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

2014-06-13_1513

On VirtualBox Manager, click on “Snapshots” for this machine

2014-06-13_1516

Click the Camera icon to take a snapshot

2014-06-13_1517

Name your snapshot

2014-06-13_1519

Snapshot created

2014-06-13_1519-2

Lets not forget to detach the the installer image.

Switch back to the “Details” pane and click on the “Storage” text

2014-06-13_1522

Click on the installer image, then the CD icon, and finally “Remove disk from virtual drive”

2014-06-13_1523

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.

A couple caveats here and also here (under “Mac OS X guests”). There aren’t any Virtualbox Guest Additions for OS X and the default resolution of the machine is 1024×768.

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.

Richard

Posts

Richard Brooks is a Quality Assurance Engineer of Consumer Electronics at BitTorrent. His second desk is the Adams Family pinball machine in the game room.