Create a VirtualBox Arista vEOS image from the command line

Create a VirtualBox Arista vEOS image from the command line

Virtualbox_Arista_Logos-whtbkI’ve wanted to check out Arista EOS for a while, but didn’t have access to the hardware. I recently learned that Arista had made EOS available as a virtual machine. Arista call this vEOS. By installing the free VirtualBox hypervisor I could get vEOS running on my MacBook. It sounded a bit too easy, but to be fair the process is really well documented.
Before I go further I should say that I obtained my copy of vEOS from my local Arista SE. I don’t know of any formal way to get a copy but I’d be very surprised if Arista couldn’t provide one through your local sales team (read, don’t ask me to supply a copy). Once I obtained the bootloader iso and veos.vmdk image files I was ready to go.
I used this blog post from Gary A. Donahue to guide me through the process. This really is an excellent and detailed tutorial. Gary does a great job here and guides you through the setup of an Ubuntu management server. The addition of the Ubuntu box is a nice touch and gives you a holistic view of a real network. I added LLDP to Ubuntu to help troubleshooting an issue of a badly mapped NIC.

sudo apt-get install lldpd
    # install the LLDP daemon
    # The equivalent to 'show lldp neighbors' (hopefully shows an EOS box!)

You need to create a new VM for each vEOS based switch in your topology, and you interconnect them by placing the vNICs from different VMs on common VirtualBox LAN segments. I’m not a VmWare user and this was my first time using VirtualBox, so I loved the simplicity of the GUI.  The recommended VM memory allocation is 1G of RAM, so I took the precaution of upgrading my MacBook’s 4GB of RAM to 8GB. This cost me the princely sum of $65 on
But cloning VMS and adding different NICS to different segments manually can be a little error prone. With a quick bit of digging I found that I already had access to the virtualbox commands from the shell on my Macbook. With the help of the interwebs I gleaned enough information to build a new vEOS VM from the command line.
The code sample below doesn’t replicate Gary’s full lab, but provides you the commands to create a single vEOS router named RTR1, with a single NIC. Once you enter these at the shell, the RTR1 image should appear in your VirtualBox left-hand menu.

vboxmanage createvm --name RTR1 --ostype Fedora_64 --register
VBoxManage modifyvm RTR1 --memory 1024
VBoxManage modifyvm RTR1 --nic1 intnet
VBoxManage modifyvm RTR1 --intnet1 Mgmt1
VBoxManage modifyvm RTR1 --nicpromisc1 allow-vms
VBoxManage modifyvm RTR1 --cableconnected1 on
VBoxManage storagectl RTR1 --name "IDE Controller" --add ide
VBoxManage storageattach RTR1 --storagectl "IDE Controller" --port 0 --device 0\
--type hdd --medium /Users/sherpa/VirtualBox/vEOS.vmdk
VBoxManage storageattach RTR1 --storagectl "IDE Controller" --port 1 --device 0\
--type dvddrive --medium /Users/sherpa/VirtualBox/Aboot-veos-virtualbox.iso

I intend to use this snippet a basis for templated VM creation and perhaps package up some common lab topologies. I’m enjoying the experience so far. I hope this was a useful nugget. Please let me know what you think in the comments section.

5 thoughts on “Create a VirtualBox Arista vEOS image from the command line

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.