Vagrant Auto_network

Hassle free private network configuration for Vagrant
Alternatives To Vagrant Auto_network
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Kubespray14,027
16 hours ago165apache-2.0Jinja
Deploy a Production Ready Kubernetes Cluster
Magma1,561
6 days ago313otherC++
Platform for building access networks and modular network services
Metta782
4 years ago10mitPython
An information security preparedness tool to do adversarial simulation.
Netplugin473
4 years ago37May 24, 2021152apache-2.0Go
Container networking for various use cases
Socketplane409
4 years agoDecember 26, 201436apache-2.0Go
SocketPlane - Multi-Host Container Networking
Vagrant Freebsd231
7 years ago3otherShell
FreeBSD with ZFS for Vagrant
Vagrant Xenserver107
5 years ago21mitRuby
A Vagrant provider for XenServer
Vagrant Auto_network1051714 years ago11June 01, 20185apache-2.0Ruby
Hassle free private network configuration for Vagrant
Dash Hack90
7 years ago6mitPython
My friend needed an amazon-dash button that did not exist, this is my modification to extend the dash button to any product.
Vagrant Vcloud69
5 years ago18April 27, 201833mitRuby
Vagrant provider for VMware vCloud Director®
Alternatives To Vagrant Auto_network
Select To Compare


Alternative Project Comparisons
Readme

Vagrant Auto-network

Automatically configure Vagrant private network interfaces.

Build Status

Summary

Adding a private network address for vagrant machines generally requires manually entering network interfaces and IP addresses for each machine, and adding or removing machines means updating private network interfaces to make sure that new machines don't collide. Alternately one can run a full blown DHCP server but this is not necessarily portable and requires significant preparation on top of Vagrant.

This plugin registers an internal address range and assigns unique IP addresses for each successive request so that network configuration is entirely hands off. It's much lighter than running a DNS server and masks the underlying work of manually assigning addresses.

Installation

vagrant plugin install vagrant-auto_network

Usage

Vagrant.configure('2') do |config|
  config.vm.define 'first' do |node|
    node.vm.box = 'centos/7'

    node.vm.network :private_network, :auto_network => true
  end

  config.vm.define 'second' do |node|
    node.vm.box = 'centos/7'

    node.vm.network :private_network, :auto_network => true
  end
end

Troubleshooting

On occasion, the state file AutoNetwork uses to store allocated IP addresses can become corrupted resulting in errors similar to:

/opt/vagrant/embedded/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 288 column 7 (Psych::SyntaxError)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/psych.rb:153:in `parse'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/psych.rb:129:in `load'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/yaml/store.rb:61:in `load'
    from ~/.vagrant.d/gems/gems/vagrant-auto_network-1.0.2/lib/auto_network/pool_storage.rb:73:in `load'

This can be fixed by clearing the state file:

rm ~/.vagrant.d/auto_network/pool.yaml

The vagrant reload command should be run on any VMs using AutoNetwork IPs in order to re-issue new IP addresses.

Caveats

The default pool range has been hardcoded as '10.20.1.2/24' and is assigned to the first VM provider, usually VirtualBox. New pools are created for other providers by incrementing the second octet to create a new '/24'. To change the starting range, add the following to a Vagrantfile before the Vagrant configuration block:

AutoNetwork.default_pool = '172.16.0.0/24'

A '/24' should always be used as the default pool in order for multiple providers to be supported correctly. If VMs that use auto_network assigned IP addresses have already been created, then the AutoNetwork pool file will have to be cleared:

~/.vagrant.d/auto_network/pool.yaml

Running vagrant reload on existing VMs will assign new IP addresses from the newly configured IP range.

The AutoNetwork pool is currently shared across all Vagrant environments which means it is not possible to configure a separate range per-Vagrantfile.

Contributing

Bug reports and pull requests are welcome on GitHub at oscar-stack/vagrant-auto_network.

Popular Vagrant Projects
Popular Network Projects
Popular Virtualization Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Network
Address
Vagrant