Académique Documents
Professionnel Documents
Culture Documents
eos.arista.com /building-a-virtual-lab-with-arista-veos-and-virtualbox/
Its no secret that I love Arista switches. When I wrote Arista Warrior, I was lucky enough to have a
loaner switch from Arista in my home lab, but sadly they made me give it back. Since Arista is a relative
newcomer to the world of Networking, there isnt a pile of used Arista gear on eBay, so I cant build a
killer lab at home without spending thousands of dollars. As much as I love Arista switches, Id rather
spend my spare cash on guitars my wife and kids.
Understanding the plight of cash-strapped networking guys the world over, Arista has released a virtualmachine-ready version of their fabulous switch operating system, EOS. Currently this is only available
to existing Arista customers, so see your Arista sales rep to get a copy. Please dont ask me for a copy,
since I will not send you a copy no matter how much you beg. Arista has hinted that they may release
this into the general population, in which case I may build a Virtual Box appliance to share. Until then,
youll need to read on and build it yourself.
Equipment Used
Ive built this lab using my Macbook Pro that has an Intel i7 processor with 16GB of RAM. The OS in
use is Mountain Lion (OSX v10.7.5). Im using VirtualBox for Mac v4.2.1 (r80871), and vEOS v 4.10.2.
Ive configured each VM to have one CPU, and 1GB of RAM. Real Arista switches ship with at least
4GB of RAM, but this is a lab after all, so 1GB should be fine. You can further tune them down to
512MB each, and theyll run, but theyll have little (if any) free memory. If youve got the RAM, Id stick
to 1GB for each VM.
Virtual machines are possible using a variety of tools, so why did I choose VirtualBox? Mainly because
its free, and this way anyone with access to the vEOS files would be able to follow along. Also
because its available on many host operating systems. Did I mention that its free? I love free things,
especially when theyre useful!
Using the lab as shown requires that you have a clue about linux, because I will not go into detail about
installing it. You can build it without the Linux server if youd like, and the switches will still work. The
Linux server adds useful functionality for things like uploading code, learning ZTP, and so-on.
Build a Base VM
Because of the way VirtualBox seems to work, and because of my obsessive nature, well build a base
VM, then clone it three times. This will create three VMs, each with its own folder, and each having its
own virtual disk. This will be of use should we ever decide to upgrade the image in the future, as it will
allow each switch to run separate versions.
points to the Arista Files folder in each VM, but this is a read-only ISO, so thats OK. If youd like to
change this, copy the Aboot image to each of the VM folders and then change where the image links in
the Settings/Storage page for each VM.
At this point, you can delete the vEOS-Base
image, since well no longer be using it. To do so,
right-click on the VM in the left pane of VirtualBox,
and choose Remove. You will be given the options
of Remove only and Delete all files. Do not delete
all files! If you do, you will lose the
original .vmdk file. Hopefully you have it saved
somewhere else, but be warned that it will be gone
if you delete the files. When thats done, there
should be only three VMs: vEOS-1, vEOS-2, and
vEOS-3.
At this point, go ahead and create the Ubuntu
Linux VM. You can use any Linux you want,
actually, and I wont go into the details of installing that because it should be pretty straightforward. I
recommend that you download and install the server version (http://www.ubuntu.com/download/server)
since its smaller than the desktop version. After thats done, its time to build the networks.
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 10.10.10.10
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
Save the file and issue the sudo /etc/init.d/networking restart command. At this point, you should be
able to ping every VM from every other VM using the management network.
arista@Ubuntu:/etc/network$ ping -c 5 10.10.10.11
PING 10.10.10.11 (10.10.10.11) 56(84) bytes of data.
64 bytes from 10.10.10.11: icmp_req=1 ttl=64 time=0.287 ms
64 bytes from 10.10.10.11: icmp_req=2 ttl=64 time=3.15 ms
64 bytes from 10.10.10.11: icmp_req=3 ttl=64 time=0.624 ms
64 bytes from 10.10.10.11: icmp_req=4 ttl=64 time=0.524 ms
64 bytes from 10.10.10.11: icmp_req=5 ttl=64 time=0.416 ms
--- 10.10.10.11 ping statistics --5 packets transmitted, 5 received, 0% packet loss, time
4013ms
rtt min/avg/max/mdev = 0.287/1.001/3.155/1.082 ms
Finally, well add one more IP address so that the
host machine can also get to the management
network. You dont really need to do this, and it can
be accomplished in other ways, but I like this
because it works and Im lazy. Open preferences
in VitualBox (for the application, not for a VM),
click on the Networkicon, and you should be
presented with a list of Host-only networks. There
should be only one unless you have other VMs
built. Double click on the network (vboxnet0 on the
Mac), and you should get a new window with two
tabs: Adapter and DHCP server. In the adapter tab,
assign an IP address of 10.10.10.1 with an IPv4
mask of 255.255.255.0.
Next, click on the DHCP Server tab, and
uncheck Enable Server. The reason for this is that
we dont want VirtualBox to dole out IP address
we want the Ubuntu Linux VM to do this. This is
because if and when we play around with Zero
Touch Provisioning, well configure advanced
settings in Linux that arent available in Virtual Box.
Heres one more cool benefit of the way weve built
this lab. Add the user arista with the password
arista to every device. On the vEOS machines, use
the following exec mode command:
vEOS-1#configure
vEOS-1(config)#username arista privilege 15 secret
arista
vEOS-1(config)#write
On the Ubuntu Linux machine, use this command:
sudo useradd -b /home/arista -m -p arista
arista
Once the usernames have been added to each device, you can use your favorite SSH client to connect
to each VM, including the Ubuntu Linux machine. This is cool because though you can do everything
from the console of each VM, using the console sucks compared to the power of a full-featured SSH
client like Secure-CRT. At this point, the Lab is complete, and you can abuse it to your hearts content.
Congratulations!
Troubleshooting
Sometimes, no matter how careful we are, things just dont work right. Here are some common errors
and problems Ive seen while building and endlessly rebuilding this lab.
FATAL: No bootable medium found! System Halted
This error means that the VM cannot find the Aboot ISO file, or the file is corrupted.
VM hangs at Starting new kernel forever
This is indicative of the VM being unable to find the virtual hard disk (.vmdk) file. Check your storage
settings and make sure the .vmdk for that VM exists.
VM is slooooow
If its working, but its really slow, try giving the VM more memory. If youve only got 4GB of RAM in
your machine, this lab will probably not run very well, so you might just have to live with it. Ideally, this
lab needs a minimum of 4 CPUs and 4GB of RAM.
Conclusion
I hope this helps people who need an Arista lab. I know its helped me quite a bit. I might even be
inclined to write up some lessons using this lab, so stay tuned and enjoy my other ramblings while you
wait.