Mac OS X Vagrant box for VirtualBox

This is a issue tracker for OS X Vagrant boxes, which can be found in Download section

Box was tested only on VirtualBox with Mac OS as a host. Mainly, I made it to build our iOS applications via CI-server.

Also you might be interesed to take look at radeksimko/vagrant-osx that can build boxes for VMWare Vagrant provider.

Downloads

Since VagrantCloud can't host this images, you can use direct links to download them. Download speed may be slow.

OS X Licensing

Apple's EULA states that you can install your copy on your actual Apple-hardware, plus up to two VMs running on your Apple-hardware. So using this box on another hardware is may be illigal and you should do it on your own risk.

Setting up

  1. Install Vagrant and VirtualBox;
  2. cd into your project directory;
  3. Run vagrant init http://files.dryga.com/boxes/osx-yosemite-0.2.0.box;
  4. Your Vagrantfile should be ready as soon as Vagrant downloads box;
  5. Start VM by calling vagrant up.

Warning

VirtualBox support for Mac OS X is experimental. More information can be found in official docs.

What's included?

How to accept the Xcode License from the CLI

In early versions of this box you need to accept XCode license by you own.

If you face error: Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo., just run this command:

sudo xcodebuild -license accept

Known issues

  • Do not turn 3D acceleration on, or your Box will start retuning aborted condition and would not start in headless mode
  • VirtualBox doen's have Guest additions for Mac OS X, so you can't have shared folders. Instead you can use normal network shared folders
  • If you face VM freezed on message hfs mounted macintosh hd on device root_device then you need to set cpuidset inside your Vagrantfile: vb.customize ["modifyvm", :id, "--cpuidset", "1","000206a7","02100800","1fbae3bf","bfebfbff"]

Tips to build your own box

Main think you should remember is that you need latest VirtualBox version BEFORE you start installation. Process of installation is pretty straight forward (as on usual Mac), but you need to erase virtual drive during installation via Disk Utilities. After that just follow Vagrant guide to create base box and another one to package it.

Sometimes you need to rebuild VirtualBox kernel extensions before installing OS on VM.

Helpful links (most of them are outdated):