Well Holy Hannah, I received my first Twitter DM over a blog post I've written. I'm officially a pro now 🧐
Follow along to see how to install VirtalBox and Vagrant on Mac OS X. Once you've done this youwill be up and running and ready to take the rest of the cours. I am having exactly this same problem, also. One difference: I am using the old VirtualBox version, 4.3.28, as recommended in the instructions. My vagrant is 1.7.4, on Mac OS 10.10.5.
The DM was from a user that was having some issues with the instructions I provided on a post I wrote in 2015 for S&W here about how to run the then-current release of macOS inside a Vagrant box.
So I thought, what the heck that blog post is 2 yrs old and in computer time that's pratically middle aged. And Trump's been president for essentially a full year now and let's not even talk about what that's done to the flow of time.
- Box Format Support By default macinbox will create a Vagrant box in the 'vmwaredesktop' format with the VMware Tools pre-installed. When the box format is set to 'parallels' using the -box-format option then the Parallels Tools are pre-installed instead. When the box format is set to 'virtualbox' no guest extensions are installed.
- Click to see full answer. Thereof, where is vagrant installed Mac? Dmg and install the Vagrant. Pkg package file.The binary gets installed in the Applications folder with a link to the /usr/bin so it is added to the shell path. Additionally, are vagrant boxes safe? Vagrant project provides an insecure key pair for SSH Public Key Authentication so that vagrant ssh works.
- »Introduction to Vagrant. Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the 'works on my machine' excuse a.
Source: Space.com article, here. Article credits NASA/JPL-CalTech.
tldr - it's worth revisiting, Me Said To Me
Laptop Specs
- 15' 2015 Macbook Pro
- 16 GB of RAM
- 2.8 GHz CPU
- 1 TB SSD
- macOS High Sierra, 10.13.2
Downloads
- macOS High Sierra from the App Store
- Image is approximately 5.2 GB
- latest Vagrant from Hashicorp
- As of this post the latest release is 2.0.1
- Image is approximately 70 MB
- latest release of VirtualBox from Oracle
- As of this post the latest release is 5.2.2
- Image is approximately 93 MB
- Homebrew - a package installer for macOS. Not required but recommended / encouraged.
- iTerm - an alternative to the Terminal app included in macOS. Again, not required but recommended. For the rest of this post 'terminal' can be used interchangeably for iTerm or Terminal, whichever you chose.
Protip: you can install Vagrant and VirtualBox using Homebrew:
- Open terminal
- Install Homebrew (
brew
) using the command provided on the link above - Install Vagrant
brew cask install vagrant
- Install VirtualBox
brew cask install virtualbox

The main benefit of using a package installer like this is that your packages, like Vagrant and VirtualBox, can now be kept updated with brew update
rather than manually downloading / updating package installers from various websites.
For the VirtualBox install you will be prompted to open System Preferences → Security & Privacy
at some point. If you don't do this 'fast enough' (by the system's pre-programmed determination) then the install may error out. Fear not! It caches the install like so:
So if the install halts for this reason, or because Connection reset by peer
(typically that means slow internet connection), or for any other reason, then you can just hit the up arrow to re-run the last command and hit Enter. Just make sure you fix whatever it asks you to first 😉
What this will essentially look like in terminal:

Documented on my frequently used assets page.
The Gritty Bits
Ok, so now that we have All the Things we need to do ... quite a few steps, actually.
Creating your ISO File
First, when you download High Sierra, or any other macOS release to date, you are downloading the file as a DMG, which is a proprietary Apple disk image format. In order to run macOS in VirtualBox, we'll need to convert the DMG file to a more general format such as an ISO. To do this, we're going to start by converting the installer DMG that we downloaded from the App Store into an image of the full OS, store that in a DMG, and then use a utility called PowerISO to do the final conversion.
If that just read like a paragraph of panic, don't worry! We're going through it step by step.
The output will look like this:
Troubleshooting
Vagrant Box Mac Os Download
What to do if you see the following error:
Uninstall Vagrant Mac

This most likely means that you've already mounted the InstallESD
image. Go into Disk Utility
and unmount it:
This likely happened when the High Sierra download completed and immediately opened the installer.
Using your VHD file with VirualBox
Open VirtualBox:
Click New:
Choose a name, Type is 'Mac OS X', and Version is 'macOS 10.13 High Sierra (64-bit)'. Then click 'Continue':
The default memory is 2 GB, I recommend upping it to 4 GB though if you can:
Choose 'Create a Virtual Hard Disk File now' and 'Create':
For the curious
The image manipulations above, with arrow / blurring of text / etc., were done with the Skitch app. You only need an account to save in Evernote - account-less you can just locally save / export to whatever image file format you prefer.
Quickest Vagrant Tutoral Ever
A while ago, the chaps over at the Vagrant project have recently released a plugin to let Vagrant work with VMWare Fusion - this means we can finally use Vagrant to provision OS X VMs.
Why is this a good thing? Do you NetBoot VMWare to test your builds? Or maybe you still have that test Mac on your desk to test your builds. Either way, it’s going to be several minutes to restore an image, even if you’re thin imaging. With the VM already on your machine, you’re ready to go in seconds. Another bonus is that Vagrant isn’t only limited to OS X virtual machines - for example, I have a Vagrant configuration that spins up an Ubuntu box configured as a Munki server, with a copy of my repository on an external drive. This allows me to test deployments from anywhere, with everything local to my Mac (have you ever tried testing a Final Cut Studio package from home? 48GB takes a while to download.). I’ll go into more detail on this setup in a future post, but for now here’s how to get a Mac base box into Vagrant.
##Pre-requisites

- Vagrant (this was written using Vagrant 1.2.7)
- Packer (I’m using Packer 0.3.1)
- Git (Install the Command Line Tools from within Xcode’s preferences if you don’t have it).
##Get set up with Packer
Before we install Packer, you’re going to need to download it. No, really, you need it.
Assuming you’ve downloaded it to ~/Downloads
, extract the zip file so you will be left with something like this: ~/Downloads/0.3.1_darwin_amd
. Everything prefaced with a $
should be entered in your terminal.
You now have a choice: you can refer to the packer
binary by it’s full path every time (/usr/local/packer/packer
), or you can modify your path. The next step is entirely optional, but I highly recommend it. You need to edit ~/.profile
.
And add this line to the file, then save it (CTRL-O
then CTRL-X
):
And then quit and re-open Terminal.app.
Templates
Packer uses template files to define how it should build the VM for you. Fortunately, Tim Sutton has created a template file that can be used with Packer.
There are a couple of prep steps we need to do before we can instruct Packer to make our box. First off it’s going to need installation media. There is a script that will prepare the Install OS X Mountain Lion.app so it can be used with Packer.
You’ll see some activity in your terminal, and then you’ll be given the filename of your installation DMG and the checksum. You’ll need these in the next step.
Open up packer/template.json
in your favourite editor. Paste in the checksum you were given in the last step (yours will probably be different from mine), and specify the path to your installation DMG (obviously use the path to your home directory, not mine!). You can also edit the size of the disk, the memory etc in this file.
Prepare the build!
You’re ready to go. This next step will take AGES so go and make a cup of coffee (or tea), as this is going to install OS X, run through the scripts to install the bits Vagrant needs (like Puppet), then make a Vagrant base box.
After you hit return, VMware will open up and OS X will start installing. Once everything is done, and Packer tells you it’s done in your terminal window, you just need to add it to Vagrant and then you’re ready to use it.
##Adding the VM to Vagrant
Using the VM in Vagrant
We’re going to make a quick Vagrant configuration using your newly built box.
You’re probaly going to want a GUI when it boots, so open up ~/Desktop/osx_test/Vagrantfile
in your text editor of choice and find the next section.
And change it to read
Unfortunately there isn’t any support for OS X in the official Vagrant release (yet), but good old Tim Sutton has sorted that out for us. We’re going to clone his repository, switch to the branch with his changes and copy the needed files into the main Vagrant installation. Hopefully his changes will be merged into a future of Vagrant, but for now:
We’re ready to boot the thing now - make it so, number one.
You should see VMWare Fusion open if it’s not already running and your VM boot after a little while.
What’s next?
Vagrant Box Osx
You can configure this box with a script, or using Puppet or Chef (can you guess which I’d do?)?
