Mac Os X Vagrant Box For Virtualbox

  суббота 08 февраля
      47

Docker used to include a nice Vagrantfile, and this was the preferred wayto run Docker on OS X. Since version 0.8.1 (PR #4281), though, theDocker documentation refers Mac OS X users to boot2docker. boot2docker runsthe Docker daemon in a VirtualBox VM, but the Docker client runs from thehost Mac OS X machine. That’s super cool, and props to the Dockerdevelopers for getting that to all work. That said, I can’t stand it fordoing any sort of application development because when you run docker run -v,host directories refer to the machine running the Docker daemon, not theclient. This means that I can’t easily mount directories right frommy Mac. Behringer u-control uca200 mac driver. download full version windows 10.

I advocate instead running both the Docker client and server in a virtualmachine in VirtualBox using Vagrant. If you haven’t done so already,download and install both VirtualBox and Vagrant. Vagrant uses atext file named Vagrantfile to configure new virtual machines. By default,Vagrant will synchronize the contents of the directory in which a Vagrantfileresides to the VM’s /vagrant directory. This is very helpful if you’d like tomodify source files on your Mac with your favorite tools and run correspondingDocker containers on the VM. Here’s a Vagrantfile to get you started:

Keyscrambler premium key. Keyscrambler for mac free download - KeyScrambler Personal, macOS Catalina, WinZip Mac, and many more programs. KeyScrambler by QFX Software Corp. Is a real-time keystroke encryption tool meant to defeat keyloggers. Sadly, KeyScrambler for Mac is currently not available, but you can protect yourself against keyloggers on Mac OS X using any of the alternative applications from this list.

This specifies a new 64-bit Ubuntu 12.04 virtual machine with Docker andconveniently forwards all ports in the range 49000.49900 from the host tothe virtual machine. That way, if you run a web server (for example) from yourVM, you can open a web browser from your Mac and see your site.

May 04, 2015  Primary OS: Mac OS X other VBox Version: PUEL Guest OSses. Preconfigured vagrant box'? Users of Vagrant guests will have to ask Vagrant or Laravel how to get the guests to run, since Vagrant changes Virtualbox beyond the developers' design, so there's no support for Vagrant in the Virtualbox forum, unless someone who happens to know comes.

Then, we just start up the VM, establish an SSH connection with it, and startusing Docker.

Vagrant’s Docker Provisioner, by the way, can do some pretty neat tricks likebuilding Docker images upon provisioning. Check out the docs.

Please enable JavaScript to view the comments powered by Disqus.blog comments powered by Disqus

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.

Downloads

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

  • Mac OS X Yosemite 10.10 (XCode 6.4): v0.2.1, direct link (13Gb) (sha1: e02ea7fff9c3af980bfa733c8feb2e03bf562cfd)
  • macOS Sierra (XCode 8.2): v0.3.1, direct link (14.1Gb)

Also you can download older boxes from Hashicorp Atlas page AndrewDryga/vagrant-box-osx/ (if it's accessible 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 https://vagrant-osx.nyc3.digitaloceanspaces.com/osx-sierra-0.3.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 illegal and you should do it on your own risk.

By using it you agree with all macOS Sierra and XCode license agreements.

What's included?

Sierra box:

  • Default Vagrantfile (inside box) that fixes most of common issues;
  • Homebrew;
  • Homebrew Cask;
  • NodeJS 7.2.1 (npm 3.10.10, n 2.1.3);
  • Lunchy;
  • Puppet 4.8.1;
  • XCode 8.2 (and XCode Command Line Tools).

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

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

  • Box may crash on AMD-based hosts due to VirtualBox 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):
  • If your VM freezes with 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;
  • 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):

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

Sponsors

I want to thank DigitalOcean for providing a free storage for box images.