Vagrant & /etc/hosts
Vagrant-Hostmaster plugin: https://github.com/mosaicxm/vagrant-hostmaster :: mosaicxm/vagrant-hostmaster · GitHub
Install into vagrant’s isolated RubyGems instance with: vagrant gem install vagrant-hostmaster but for me, it worked: gem install vagrant-hostmaster
Not working: E: grep: /etc/hosts: No such file or directory
Plugins (Gems) for Vagrant
https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins :: Available Vagrant Plugins · mitchellh/vagrant Wiki · GitHub
- Plugin to take screenshots of VMs (working) https://github.com/igorsobreira/vagrant-screenshot :: igorsobreira/vagrant-screenshot · GitHub http://rubygems.org/gems/vagrant-screenshot :: vagrant-screenshot | RubyGems.org | your community gem host http://igorsobreira.com/blog/2012/3/13/vagrant-plugin-to-take-screenshots/ :: Igor Sobreira | Blog - Vagrant plugin to take screenshots
Searching the vagrantbox.es repository of base boxes (no error, but no command in list): Ruby gem for interacting with the vagrantbox.es api from inside vagrant https://github.com/garethr/ruby-vagrantboxes :: garethr/ruby-vagrantboxes · GitHub Manual build & install: https://gist.github.com/2035953 :: ruby-vagrantboxes — Gist
A Vagrant plugin to PuTTY into a VM (no error, but no command in list): Doesn’t work, because it is based on “jruby-win32ole”. https://github.com/mdellanoce/vagrant-putty :: mdellanoce/vagrant-putty · GitHub http://rubydoc.info/gems/vagrant-putty/0.0.2/frames :: File: README — Documentation for vagrant-putty (0.0.2)
Enable SSH-ing to Vagrant VMs directly from the command-line: (error when executing) https://github.com/kvs/vagrant-proxyssh :: kvs/vagrant-proxyssh · GitHub http://rubydoc.info/gems/vagrant-proxyssh/0.2.0/frames :: File: README — Documentation for vagrant-proxyssh (0.2.0) E: undefined local variable or method ‘cmd’.
- Adds a ‘list’ command to list known Virtual Machines (working): Lists both all VMs known to VirtualBox, as well as any that are running https://github.com/joshmcarthur/vagrant-list :: joshmcarthur/vagrant-list · GitHub http://rubydoc.info/gems/vagrant-list/0.0.1/frames :: File: README — Documentation for vagrant-list (0.0.1)
- A vagrant plugin to list active vagrant plugins (can’t install) Requires Vagrant version >= 1.1.0.dev https://github.com/dotless-de/vagrant-plugins :: dotless-de/vagrant-plugins · GitHub http://rubydoc.info/gems/vagrant-plugins/0.2.3/frames :: File: README — Documentation for vagrant-plugins (0.2.3)
Obsolete, not needed or invalid Vagrant plugins
A Vagrant plugin to keep your VirtualBox Guest Additions up to date https://github.com/dotless-de/vagrant-vbguest :: dotless-de/vagrant-vbguest · GitHub
Install with: gem install vagrant-vbguest
Command to copy files in your box using rsync https://github.com/calavera/vagrant-sync :: calavera/vagrant-sync · GitHub http://rubydoc.info/gems/vagrant-sync/0.1.1/frames :: File: README — Documentation for vagrant-sync (0.1.1)
Manage DNS records for vagrant environments (OS X only): http://rubygems.org/gems/vagrant-dns :: vagrant-dns | RubyGems.org | your community gem host https://github.com/BerlinVagrant/vagrant-dns :: BerlinVagrant/vagrant-dns · GitHub http://rubydoc.info/gems/vagrant-dns/0.2.4/frames :: File: README — Documentation for vagrant-dns (0.2.4)
Automatically set hostnames when launching vagrant boxes (OS X only) https://github.com/dwt/vagrant-hosts :: dwt/vagrant-hosts · GitHub
Adding entries to the hosts file of the VM: https://github.com/cegeka/vagrant-vmhosts :: cegeka/vagrant-vmhosts · GitHub http://rubydoc.info/gems/vagrant-vmhosts/0.0.4/file/README.md :: File: README — Documentation for vagrant-vmhosts (0.0.4)
Notes on installing plugins
Note if you use the gem packaging, the plugin will have to be installed with Vagrant using the “vagrant gem” command. This is because Vagrant packages and installers ship with a completely isolated RubyGems installation and never actually references your global RubyGems installation you may have.
So, use “vagrant gem install vagrant-plugin” if you have a packaged installation of Vagrant. Use “gem install vagrant-plugin” if you have Vagrant installed directly as a gem.
If there is a file named vagrant_init.rb somewhere in your gem’s load path, then Vagrant automatically loads it - and plugin is packaged as a RubyGem.
Configure Vagrant VM to use Host DNS: https://gist.github.com/1277049 :: Configure Vagrant VM to use Host DNS for VPN — Gist http://www.virtualbox.org/manual/ch09.html#nat_host_resolver_proxy :: Chapter 9. Advanced topics
alias for Windows: doskey vagrant=bundle exec vagrant http://devblog.point2.com/2010/05/14/setup-persistent-aliases-macros-in-windows-command-prompt-cmd-exe-using-doskey/ :: Setup Persistent Aliases & Macros in Windows Command Prompt (cmd.exe) using DOSKey « Developing Code, Connecting Industry
Simple way to start putty
putty vagrant@localhost 2201 -pw vagrant
Iterate VM’s / Cluster of nodes / Multiple VM’s
Looping and creating VM’s in Ruby: itissid’s gist: 2221109 — Gist
Good example of cluster of nodes: blueboxgroup/razor-vagrant-lab · GitHub
Create Project - Vagrant up In prepared project directory, run following command: $ vagrant up –provider=libvirt Vagrant needs to know that we want to use Libvirt and not default VirtualBox. That’s why there is –provider=libvirt option specified. Other way to tell Vagrant to use Libvirt provider is to setup environment variable export VAGRANT_DEFAULT_PROVIDER=libvirt.