All Projects β†’ oldpatricka β†’ Vagrant Xhyve

oldpatricka / Vagrant Xhyve

Licence: mit
An experimental xhyve/hyperkit provider for vagrant

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Vagrant Xhyve

Packer Ubuntu 1404
DEPRECATED - Packer Example - Ubuntu 14.04 Vagrant Box using Ansible provisioner
Stars: ✭ 81 (-19.8%)
Mutual labels:  vagrant
Mydailylearn
πŸš€ Important commands, Code Snippets, Basics on different topics learning daily πŸŽ‰!
Stars: ✭ 87 (-13.86%)
Mutual labels:  vagrant
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (-6.93%)
Mutual labels:  vagrant
Jjg Ansible Windows
[DEPRECATED] Windows shell provisioning script to bootstrap Ansible from within a Vagrant VM.
Stars: ✭ 82 (-18.81%)
Mutual labels:  vagrant
Devbox Golang
A Vagrant box with Ansible provisioning for setting up a vim-based Go(lang) development environment
Stars: ✭ 84 (-16.83%)
Mutual labels:  vagrant
Learning Tools
A collection of tools and files for learning new technologies
Stars: ✭ 1,287 (+1174.26%)
Mutual labels:  vagrant
Packer Centos 6
This build has been moved - see README.md
Stars: ✭ 78 (-22.77%)
Mutual labels:  vagrant
Vagrant Box Templates
Stars: ✭ 100 (-0.99%)
Mutual labels:  vagrant
Dev
The only truly universal productive development platform with Docker on macOS, Linux and Windows! http://blog.teracy.com/2016/12/20/teracy-dev-the-only-truly-universal-productive-development-platform-with-docker-on-macos-linux-and-windows/ http://slides.teracy.net/hoatle/productive-dev-workflow-with-teracy-dev/latest/
Stars: ✭ 84 (-16.83%)
Mutual labels:  vagrant
My Cheat Sheets
A place to keep all my cheat sheets for the complete development of ASIC/FPGA hardware or a software app/service.
Stars: ✭ 94 (-6.93%)
Mutual labels:  vagrant
Laravel Whoops Editor
Laravel Whoops Editor helps to open your code editor from exception stack trace.
Stars: ✭ 83 (-17.82%)
Mutual labels:  vagrant
Vagrant Osx
Vagrant setup for Mac OS X
Stars: ✭ 83 (-17.82%)
Mutual labels:  vagrant
Packer Templates
Stars: ✭ 90 (-10.89%)
Mutual labels:  vagrant
Kubernetes The Ansible Way
Bootstrap Kubernetes the Ansible way on Everything (here: Vagrant). Inspired by Kelsey HightowerΒ΄s kubernetes-the-hard-way, but refactored to Infrastructure-as-Code.
Stars: ✭ 82 (-18.81%)
Mutual labels:  vagrant
Vagrant Docker Vm
πŸ’» Development Vagrant VM with Docker, Samba and Mail sandbox (customizable)
Stars: ✭ 97 (-3.96%)
Mutual labels:  vagrant
Vagrant Librarian Chef
*UNMAINTAINED* A Vagrant plugin to install Chef cookbooks using Librarian-Chef.
Stars: ✭ 80 (-20.79%)
Mutual labels:  vagrant
Tj
Create local WordPress dev sites, manage existing sites, and deploy them, all from the command line.
Stars: ✭ 88 (-12.87%)
Mutual labels:  vagrant
Packer Ubuntu 1804
This build has been moved - see README.md
Stars: ✭ 101 (+0%)
Mutual labels:  vagrant
Drupal Vm
A VM for Drupal development
Stars: ✭ 1,348 (+1234.65%)
Mutual labels:  vagrant
Vagrant Nfs guest
Vagrant plugin to allow the guest to export a mount and the host to mount it.
Stars: ✭ 92 (-8.91%)
Mutual labels:  vagrant

Vagrant xhyve Provider

Gem Version

This is a Vagrant plugin that adds an xhyve provider to Vagrant.

Features

  • Basic features work
  • Can work with Hyperkit fork of Xhyve
  • qcow image support

Limitations

You need to use sudo for most vagrant actions with the xhyve driver, due to the entitlements needed for xhyve to run without sudo. More details in the xhyve github issue.

Usage

Install using standard Vagrant plugin installation methods. After installing, vagrant up and specify the xhyve provider. An example is shown below.

$ vagrant plugin install vagrant-xhyve
...
$ sudo vagrant up --provider=xhyve
...

Of course prior to doing this, you'll need to obtain an xhyve-compatible box file for Vagrant.

Quick Start

After installing the plugin (instructions above), you can try an xhyve ubuntu linux example. This is similar to the example from the xhyve intro blog post.

$ mkdir xhyve-vagrant
$ cd xhyve-vagrant
$ vagrant init oldpatricka/ubuntu-14.04
$ sudo vagrant up --provider xhyve
...

This will start an Ubuntu Linux instance. you can log in with:

$ sudo vagrant ssh

Box Format

The vagrant-xhyve box format is pretty straightforward. See the example_box/ directory. That directory also contains instructions on how to build a box.

Configuration

This provider exposes quite a few provider-specific configuration options:

  • memory - The amount of memory to give the VM. This can just be a simple integer for memory in MB or you can use the suffixed style, eg. 2G for two Gigabytes
  • cpus - The number of CPUs to give the VM
  • xhyve_binary - use a custom xhyve version
  • kernel_command - send a custom kernel boot command

These can be set like typical provider-specific configuration:

Vagrant.configure("2") do |config|
  # ... other stuff

  config.vm.provider :xhyve do |xhyve|
    xhyve.cpus = 2
    xhyve.memory = "1G"
    xhyve.xhyve_binary = "/Applications/Docker.app/Contents/MacOS/com.docker.hyperkit"
    xhyve.kernel_command = "root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap acpi=off console=ttyS0 LANG=en_GB.UTF-8" # example for a CentOS installed in a LVM filesystem
  end
end

Synced Folders

There is minimal support for synced folders. Upon vagrant up, vagrant reload, and vagrant provision, the XHYVE provider will use rsync (if available) to uni-directionally sync the folder to the remote machine over SSH.

Using Docker's HyperKit Fork of Xhyve

Docker has a very nice port of Xhyve called HyperKit. It has some interesting features like better stability and qcow support (which this provider can't use yet).

If you want to try it out, either install hyperkit directly, or you can use the version bundled with Docker for Mac. The path to the binary is /Applications/Docker.app/Contents/MacOS/com.docker.hyperkit. See the configuration section above for how to use this with the xhyve_binary option.

Questions

Q. Should I use this for my work?

A. Do you want to keep your job? I'm not even sure you should use this for toy projects.

Q. Why?

A. This project is powered by ignorance and good intentions.

Q. Will I ever not have to use sudo or setuid root?

A. There's a theory in that issue linked above that wrapping xhyve in an app store app would help. If that were the case, you could probably use the embedded binary with vagrant-xhyve. Another option is to use setuid root.

Q. This sucks.

A. That's not a question, but why don't you try out another implementation. Looks pretty nice.

Acknowledgements

This plugin was heavilly cribbed from the vagrant-aws and vagrant-virtualbox providers. So thanks for those.

This also uses the nice xhyve-ruby gem, by Dale Hamel.

Development

To work on the vagrant-xhyve plugin, clone this repository out, and use Bundler to get the dependencies:

$ bundle

Once you have the dependencies, verify the unit tests pass with rake:

$ bundle exec rake

If those pass, you're ready to start developing the plugin. You can test the plugin without installing it into your Vagrant environment by just creating a Vagrantfile in the top level of this directory (it is gitignored) and add the following line to your Vagrantfile

Vagrant.require_plugin "vagrant-xhyve"

Use bundler to execute Vagrant:

$ bundle exec vagrant up --provider=xhyve

Contributors

  • Patrick Armstrong
  • Nuno Passaro
  • Guy Pascarella
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].