Extending Vagrant

Extending Vagrant

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

Obsolete, not needed or invalid Vagrant plugins

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

https://gist.github.com/2843680 :: Get SSH working on Vagrant/Windows/Git — Gist https://gist.github.com/2757358 :: Vagrant SSH on windows — Gist

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

Easy and simple guide to create your own Vagrant box from VirtualBox « Basilio Briceño

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



Interesting new plugins: p0deje/vagrant-exec · GitHub riddopic/vagrant-lube · GitHub pradels/vagrant-libvirt · GitHub geetarista/vagrant-free-memory · GitHub ergonlogic/vagrant-yaml · 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.

date 01. Jan 0001 | modified 28. May 2021
filename: Vagrant - Plugins