Skip to content

cdickman/vagrant-box-osx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Also you can download boxes from Hashicorp Atlas page AndrewDryga/vagrant-box-osx/ (if it's accessable at the moment), or simply by starting with vagrant init AndrewDryga/vagrant-box-osx instead of url.

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.1.box;
  4. Your Vagrantfile should be ready as soon as Vagrant downloads box;
  5. Start VM by calling vagrant up.

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.

What's included?

Yosemite box:

  • Default Vagrantfile (inside box) that fixes most of common issues;
  • Homebrew;
  • Homebrew Cask;
  • Puppet 3.7.4;
  • XCode 6.4;
  • XCode Command Line Tools;
  • NodeJS 0.12.7 (for npm);
  • Appium 1.4.10;
  • iOS Simulator (all devices for iOS 8.4).

Maverics box:

  • Default Vagrantfile that fixes shared folders and CPU ID
  • Homebrew;
  • Homebrew Cask;
  • XCode 5.1;
  • XCode Command Line Tools;

Useful cli tools and information

  • Nomad CLI - provides a set of tools that allow to manage certificates, profiles and many other things;
  • ObjC.io Issue 6 - how-to article about building apps in cli-only (this one about Travis-Ci);
  • security - use it to manage your keychains;
  • xctool - Facebook project for building iOS apps.

Common issues

  • Do not turn 3D acceleration on in VirtualBox, or it will start retuning aborted condition and would not start in headless mode;
  • VirtualBox doesn't have Guest additions for Mac OS X, so you can't have shared folders. Instead you can use normal network shared folders (docs):
    # Use NFS for the shared folder
    config.vm.synced_folder ".", "/vagrant",
        id: "core",
        :nfs => true,
        :mount_options => ['nolock,vers=3,udp,noatime']
  • 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"] (it's included since version 0.2);
  • If your mouse does not work on a MacBook Pro host machine, shut down the VM and open the VirtualBox Manager. Edit the VM's settings. Choose the System tab. Under the Motherboard sub-tab, set the Chipset option to be PIIX 3, and set the Pointing Device option to be USB Tablet. Restart the VM;
  • When OSX is trying to prompt graphically for password (i.e when using swift REPL), it will raise the error error:process exited with status -1) (lost connection) because there is no graphical output when using vagrant via ssh login, enable the develop mode can solve this situation, run the following command: sudo /usr/sbin/DevToolsSecurity --enable;
  • 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;
  • If you need user password (for example for Homebrew Cask). Vagrant have default consideration to create user vagrant with password vagrant, you can use it.

Warning

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

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):

About

Issue tracker for OS X Yosemite Vagrant box.

Resources

License

Stars

Watchers

Forks

Packages

No packages published