EOS is released as a single image that supports all of our platforms. That same single image can even be run in a virtual machine! This article describes how to set up a virtual machine in order to test EOS functionality, or to develop and test your own extensions.
EOS in a VM
EOS run in a VM can be used to test almost all aspects of EOS, including:
- Management Tools – CLI, Snmp, Aaa, ZTP, Extensions, Python APIs to Sysdb
- L1 Connectivity – Link up/down (when connected to another EOS VM port), LLDP
- L2 – VLANs, Port-channels, MLAG
- L3 – Routed ports, Static routing, BGP, OSPF, VARP, VRRP
The VM simulates a fixed system switch with the following hardware:
- boot loader (IDE CD-ROM drive)
- internal 2GB flash (IDE hard disk)
- external USB port
- 1 to 4GB of memory
- Management1 interface
- Up to 4 or 7 front-panel interfaces (depends on the hypervisor)
The simulated hardware cannot contain a SATA controller or vEOS will fail to fully boot.
Note that the simulated flash differs a bit from a new system from the factory in that it does not contain an empty startup-config file. This prevents ZTP from starting automatically at boot, which is what would normally happen on a new system. In order to test ZTP, you can delete the startup-config file and reboot.
You will notice a significant delay the very first time you boot the VM. As part of the standard boot process, we copy the EOS.swi image we’re booting to another location on flash if it has changed since the last time we booted. This can take some time on the virtual flash, but will not be necessary after the first boot.
The EOS SWI image provided in the vmdk is currently a derivative of the official EOS release. It cannot be loaded onto real hardware as it has had its hardware support stripped out.
At this point, official EOS releases do not support running in an EOS VM with front panel interfaces. A couple of minor changes were required support front-panel interfaces. These changes will eventually make it back to an official release, at which point you will once again be able to run the exact same image on your switch as on your VM.
Starting the VM
vEOS is fully supported on QEMU, VirtualBox, VMware Player, VMware Workstation, and VMware Fusion 4 and 5. It has Beta support for running on VMware ESX and Hyper-V. For the most flexible networking options, QEMU, VMware Workstation, or VMware ESX are recommended.
vEOS can be run on a variety of VMware products with up to 4 front-panel interfaces. Once you’ve download the Aboot-veos bootloader iso and the EOS vmdk, you can create an associated vmx file with (replace VMNAME with the name of your choosing and PATH with the full path to the directory you’ve created):
#!/usr/bin/vmware .encoding = "ASCII" # -------------------------- # VMware Configuration config.version = "8" virtualHW.version = "8" displayName = "VMNAME" nvram = "veos.nvram" guestOS = "other26xlinux" virtualHW.productCompatibility = "hosted" powerType.powerOff = "hard" powerType.powerOn = "hard" powerType.suspend = "hard" powerType.reset = "hard" cleanShutdown = "TRUE" tools.remindInstall = "TRUE" # -------------------------- # Device Configuration memsize = "2048" pciBridge0.present = "TRUE" pciBridge0.pciSlotNumber = "17" pciBridge4.present = "TRUE" pciBridge4.virtualDev = "pcieRootPort" pciBridge4.functions = "8" pciBridge4.pciSlotNumber = "21" pciBridge5.present = "TRUE" pciBridge5.virtualDev = "pcieRootPort" pciBridge5.functions = "8" pciBridge5.pciSlotNumber = "22" pciBridge6.present = "TRUE" pciBridge6.virtualDev = "pcieRootPort" pciBridge6.functions = "8" pciBridge6.pciSlotNumber = "23" pciBridge7.present = "TRUE" pciBridge7.virtualDev = "pcieRootPort" pciBridge7.functions = "8" pciBridge7.pciSlotNumber = "24" ehci.present = "TRUE" ehci.pciSlotNumber = "34" vmci0.present = "TRUE" vmci0.pciSlotNumber = "35" hpet0.present = "TRUE" scsi0.present = "FALSE" floppy0.present = "FALSE" # Boot loader ide0:0.present = "TRUE" ide0:0.fileName = "PATH/Aboot-veos-2.0.8.iso" ide0:0.deviceType = "cdrom-image" # Internal flash ide0:1.present = "TRUE" ide0:1.fileName = "PATH/EOS-4.12.4-veos.vmdk" ide0:1.redo = "" # External USB usb.present = "TRUE" usb.generic.autoconnect = "FALSE" usb.pciSlotNumber = "32" usb:1.present = "TRUE" # Management0 ethernet0.present = "TRUE" ethernet0.virtualDev = "e1000" ethernet0.addressType = "generated" ethernet0.pciSlotNumber = "33" ethernet0.connectionType = "bridged" # Ethernet1 ethernet1.present = "TRUE" ethernet1.virtualDev = "e1000" ethernet1.addressType = "generated" ethernet1.pciSlotNumber = "36" ethernet1.connectionType = "custom" # Ethernet2 ethernet2.present = "TRUE" ethernet2.virtualDev = "e1000" ethernet2.addressType = "generated" ethernet2.pciSlotNumber = "37" ethernet2.connectionType = "custom" # Ethernet3 ethernet3.present = "TRUE" ethernet3.virtualDev = "e1000" ethernet3.addressType = "generated" ethernet3.pciSlotNumber = "38" ethernet3.connectionType = "custom" # Ethernet4 ethernet4.present = "TRUE" ethernet4.virtualDev = "e1000" ethernet4.addressType = "generated" ethernet4.pciSlotNumber = "39" ethernet4.connectionType = "custom" # --------------------------
Setting up Virtual Networks
Each version VMware provides different levels of support for configuring network connections between VMs.
VMware Workstation has some of the most flexible networking options.
Open up your “Virtual Network Editor” ( Edit->Virtual Network Editor ). Create a “host-only” vmnet interface for every virtual wire you want to connect two VM interfaces together with. Subnet IP address do not really matter, and keep DHCP off.
Once you’ve created these interfaces, it is really important that you make sure that your user has full permissions on the associated devices, otherwise VMware does not allow all packet types through the connection. In Linux this means making sure you have read and write permissions on all /dev/vmnet* devices. I’m not sure what, if anything, is necessary in windows or mac systems.
Once you’ve done this you can change the network connection type of each front-panel interface and associate each one with a different vmnet interface. You can then wire two VM interfaces together by associating them with the same vmnet interface.
It is also possible to use virtual LAN segments to connect the front-panel interfaces, but this has not been fully tested.
Using QEMU and KVM
vEOS is fully supported on qemu with up to 7 front-panel interfaces. Running EOS in a virtual machine on top of KVM requires that the qemu-kvm package is installed. Once you’ve downloaded the boot loader iso and EOS vmdk from the downloads section, you can start the VM with 4 front-panel ports using:
qemu-kvm -nographic -vga std -cdrom Aboot-veos-serial-2.0.8.iso -boot d -hda EOS-4.12.5-veos.vmdk -usb -m 1024 -net nic,macaddr=52:54:00:01:02:03,model=e1000 -net nic,macaddr=52:54:00:01:02:04,model=e1000 -net nic,macaddr=52:54:00:01:02:05,model=e1000 -net nic,macaddr=52:54:00:01:02:06,model=e1000 -net nic,macaddr=52:54:00:01:02:07,model=e1000
In order to connect to the VM over the various interfaces, you’ll need to change the options passed to -net based on how you want to set up your virtual network.
vEOS has beta support for Hyper-V with up to 4 front-panel interfaces. The Aboot-veos iso must be set as a CD-ROM image on the IDE bus, and the EOS vmdk must be a hard drive image on the same IDE bus. Each interface must be created as a legacy network adapter (which simulates a DEC 21140).
vEOS has support for VirtualBox with up to 7 front-panel interfaces. The EOS vmdk must be a hard drive image on the IDE bus, and the Aboot-veos iso must be set as a CD-ROM image on the same IDE bus.
VirtualBox supports a wide range of networking options for connecting VMs. Attaching interface adapters to a named Internal Networks is an easy way to connect VM interfaces to each other. Note that you must set Promiscuous Mode for each interface adapter to at least “Allow VMs” for traffic to flow properly between VMs.
For more information about running vEOS on VirtualBox, check out vEOS and VirtualBox and Building a Virtual Lab with Arista vEOS and VirtualBox
(Access to the software download page of www.aristanetworks.com required)
Aboot for vEOS — http://www.aristanetworks.com/support/download/Aboot-veos-2.0.8.iso
Serial Aboot for vEOS — http://www.aristanetworks.com/support/download/Aboot-veos-serial-2.0.8.iso
EOS 4.11.6 flash file — EOS-4.11.6-veos.vmdk
EOS 4.12.5 flash file — EOS-4.12.5-veos.vmdk