/veos-lab-vagrant-libvirt

A Packer template for creating an Arista vEOS-lab Vagrant box for the libvirt provider.

Primary LanguageRubyMIT LicenseMIT

A Packer template for creating an Arista vEOS-lab Vagrant box for the libvirt provider.

Fork Info

Forked from https://github.com/mweisel/veos-lab-vagrant-libvirt

Modified file arista-veos-lab.json to create a vEOS image with interface Ethernet1 set as DHCP, with a static MAC address of 44:38:39:00:00:56 for use in the this Cumulus Linux EVPN interop vagrant environment.

Prerequisites

Steps

  1. Clone this GitHub repo and cd into the directory.
git clone https://github.com/petercrocker/veos-lab-vagrant-libvirt
cd veos-lab-vagrant-libvirt
  1. Log in and download the vEOS-lab disk image from Arista.

  1. Convert the vEOS-lab disk image from vmdk to qcow2.
qemu-img convert -pO qcow2 ~/Downloads/vEOS-lab-4.23.1F.vmdk ~/Downloads/vEOS-cumulus.qcow2
qemu-img check ~/Downloads/vEOS-cumulus.qcow2
qemu-img info ~/Downloads/vEOS-cumulus.qcow2
  1. Copy the converted vEOS-lab disk image to the /var/lib/libvirt/images directory.
sudo cp ~/Downloads/vEOS-cumulus.qcow2 /var/lib/libvirt/images
  1. Modify the file ownership and permissions. Note the owner will differ between Linux distributions. A couple of examples:

Arch Linux

sudo chown nobody:kvm /var/lib/libvirt/images/vEOS-cumulus.qcow2
sudo chmod u+x /var/lib/libvirt/images/vEOS-cumulus.qcow2

Ubuntu 18.04

sudo chown libvirt-qemu:kvm /var/lib/libvirt/images/vEOS-cumulus.qcow2
sudo chmod u+x /var/lib/libvirt/images/vEOS-cumulus.qcow2
  1. Packer build with the vEOS version as a variable to create the Vagrant box artifact.
packer build -var 'version=4.23.1F' arista-veos-cumulus.json
  1. Add the Vagrant box.
vagrant box add --provider libvirt --name arista/veos-cumulus-4.23.1F ./builds/veos-cumulus-4.23.1F-libvirt.box
  1. Vagrant Up!

asciicast

License

This project is licensed under the MIT License - see the LICENSE file for details