A Packer template for creating an Arista vEOS-lab Vagrant box for the libvirt provider.
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.
- Clone this GitHub repo and cd into the directory.
git clone https://github.com/petercrocker/veos-lab-vagrant-libvirt
cd veos-lab-vagrant-libvirt
- Log in and download the vEOS-lab disk image from Arista.
- Convert the vEOS-lab disk image from
vmdk
toqcow2
.
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
- Copy the converted vEOS-lab disk image to the
/var/lib/libvirt/images
directory.
sudo cp ~/Downloads/vEOS-cumulus.qcow2 /var/lib/libvirt/images
- 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
- 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
- Add the Vagrant box.
vagrant box add --provider libvirt --name arista/veos-cumulus-4.23.1F ./builds/veos-cumulus-4.23.1F-libvirt.box
- Vagrant Up!
This project is licensed under the MIT License - see the LICENSE file for details