Multiple Virtual Computers in Minutes – Vagrant Multimachine

You can install multiple virtual computers in minutes.

This example shows how to install two Ubuntu 16.04 virtual machines and configure SSH – in a couple minutes.

The computers are created for Puppet master-slave practice, as shown by the names of the machines.


$ cat Vagrantfile
Vagrant.configure(2) do |config| = "bento/ubuntu-16.04"

 config.vm.define "slave01" do |slave01|
   slave01.vm.hostname = "slave01"

 config.vm.define "slave02" do |slave02|
   slave02.vm.hostname = "slave02"

Boot the Machines

$ vagrant up


You can ssh to each machine with

$ vagrant ssh slave01

And you’re in


See also

Vagrant documentation: Multi-Machine

Install Ubuntu Virtual Machine in Minutes with Vagrant


Fixed loop variable in Vagrantfile. Now you can ssh to slave01 and slave02, two different computers.

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Recent Posts

  • Picks

  • Boxing Clock for AndroidOcton8 Diving T-ShirtsShaking Tower Panda Android GameLearn Chinese with Android
  • Student projects