Intro

This blog covers how to install Arista boxes for use with Vagrant. Although Arista does not provide Vagrant boxes on Vagrant cloud they do provide boxes that can be downloaded from the arista.com website. This post assumes that you already have a working vagrant install.

Download

Go to the Arista software downloads page. (Requires signing up for a free account) and download any of the .box files.

blog/arista-vagrant-box-install/arista-vagrant-box-download.png

I prefer to keep these type of boxes (Custom and/or not downloaded from Vagrant Cloud) in my home folder under ~/vagrant/boxes/

cmd
mkdir -p ~/vagrant/boxes/arista/
mv ~/Downloads/vEOS-lab-4.18.1F-virtualbox.box ~/vagrant/boxes/arista/vEOS-lab-4.18.1F-virtualbox.box

Box Install

Create a .json file that describes the Arista Vagrant box. This file will add meta-data attributes to the Vagrant box, making it easier to work with multiple versions of Arista boxes.

Example: ~/vagrant/boxes/arista/vEOS-4.18.1F.json
file
{
  "name": "arista/veos",
  "description": "Arista vEOS",
  "versions": [
    {
      "version": "4.18.1F",
      "providers": [
        {
          "name": "virtualbox",
          "url": "file:///home/brad/vagrant/boxes/arista/vEOS-lab-4.18.1F-virtualbox.box"
        }
      ]
    }
  ]
}
Note

Use the absolute path for the url value.

Use the vagrant box add command specifying the .json file location to add the box.

cmd
vagrant box add ~/vagrant/boxes/arista/vEOS-4.18.1F.json

# output

==> box: Loading metadata for box '/home/brad/vagrant/boxes/arista/vEOS-4.18.1F.json'
    box: URL: file:///home/brad/vagrant/boxes/arista/vEOS-4.18.1F.json
==> box: Adding box 'arista/veos' (v4.18.1F) for provider: virtualbox
    box: Unpacking necessary files from: file:///home/brad/vagrant/boxes/arista/vEOS-lab-4.18.1F-virtualbox.box
==> box: Successfully added box 'arista/veos' (v4.18.1F) for 'virtualbox'!

Confirm that box was added with the vagrant box list command. You can see below that the arista/veos box is listed along with the box type and version number (virtualbox, 4.18.1F)

cmd
vagrant box list

# output

CumulusCommunity/cumulus-vx          (virtualbox, 3.3.2)
arista/veos                          (virtualbox, 4.18.1F)

centos/7                             (virtualbox, 1705.02)
juniper/ffp-12.1X47-D15.4            (virtualbox, 0.5.0)
juniper/ffp-12.1X47-D15.4-packetmode (virtualbox, 0.5.0)
juniper/vqfx10k-pfe                  (virtualbox, 0.1.0)
juniper/vqfx10k-re                   (virtualbox, 0.2.0)

Sample Vagrant File

file
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "arista/veos"

  # Turn off shared folders
  config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true

end

Outro

Although Arista do not provide boxes on Vagrant cloud, its not to much effort to get and start using them. Its great to see network vendors embracing devops tools. Check the sample Vagrantfile above to get started with Arista Vagrant boxes.