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

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.
  • Very detailed guide, thank you!

  • Hunter Medney

    First guide I’ve found that really shows how to do this using unmodified images…thanks!

    • Yep, it’s especially interesting given that you can actually select OS X Mavericks in the VirtualBox OS selection menu but the now almost 1 year old late 2013 rMBP’s processor is still not supported out of the box / without some “hacking” around..

  • T M

    I tried doing this under Mac OS 10.6. It didn’t work. I’m using VirtualBox 4.3.20. The disc image file was made. When I try boot it in VirtualBox, an error message appears saying: FATAL: Could not read from boot medium! System halted. What could be wrong?

  • Mike

    Does anyone know where the above cpuid came from and where other Intel processor families’ cpuids might be found? Thanks!

  • Same instructions work for Yosemite (host and guest). Thank you very much!

  • David Andrew

    Excellent write up!!

    Under Yosemite I had a black screen initially on install, nothing happened. So in settings under System > Chipset I changed it from ‘ICH9’ to ‘PIIX3’ and it installed.

    Virtualbox 4.3.12

    My machine:
    Model Name: MacBook Pro
    Model Identifier: MacBookPro9,1
    Processor Name: Intel Core i7
    Processor Speed: 2.7 GHz

  • gedeyenite

    When I try and run: iesd -i /Applications/Install OS X Mavericks.app -o Mavericks.dmg -t BaseSystem
    I get an error that the source file does not exist. The Mavericks.app file is in my applications folder.

    Any insight?

    • David Gaige

      remove the /’s

  • karim mariscal

    what about usb or share folder support __? is there a way to make this work ? tnx

  • David Gaige

    the Mavericks.dmg is not appearing in the doc foldor

    • David Gaige

      nvm i got it working

  • kl.prasanna Kumar

    could you please explain how to make itunes detect ipad on virutual machine?

  • LegendYT

    Every thing Is fine except that iam getting this error plz tell me I followed everything

  • skube

    So if we have a machine older than 2013 do we just skip to the iesd -i /Applications/Install OS X Mavericks.app -o Mavericks.dmg -t BaseSystem part?