Launching/Removing/Query CloudEOS and vEOS Router
In the above figure in “Interfaces” section shows the rear view of the appliance and ethernet ports (10GB1/2/3/4) the CloudEOS and vEOS launcher script references. The ethernet ports in the CloudEOS and vEOS Router are virtual ethernet ports connected to one of the 10GB1/2/3/4 ports. VLANs are configured on each interface when installing CloudEOS and vEOS. The VLAN tagging is done by the SRIOV NICs. Note, that the connected networking devices need to have the same VLANs configured on the trunk port.
The appliance are shipped with a version of CloudEOS and vEOS Router image which is found in /data/tools. If you want to install the latest CloudEOS and vEOS Router image download desired CloudEOS.qcow2 version from Arista.com to the appliance to another directory.
The CloudEOS and vEOS launcher is a python script named dca-200-veos-setup-vm.py which is found in /data/tools directory as shown.
Router# ./dca-200-veos-setup-vm.py --help usage: dca-200-veos-setup-vm.py [-h] [-n VMNAME] [-m IMAGE] [-d] [-i [INTERFACE [INTERFACE ...]]] [-s MEMORY] [-c CORES] [-r [REMOVE [REMOVE ...]]] [-q] Create/Remove VEOS instances optional arguments: -h, --helpshow this help message and exit -n VMNAME, --name VMNAME Name of the VEOS VM -m IMAGE, --image IMAGE Qcow2 image name to use for launching the VM -d, --debug Print detailed debug info -i [INTERFACE [INTERFACE ...]], --interface [INTERFACE [INTERFACE ...]] Interfaces and optional vlans/mac. The interfaces must be listed in guest interfaces order. The interfase can be specified either in PCI address format (using lspci command) Or 10GB1/2/3/4. For example: '-i 10GB1,vlan=10 10GB2 10GB3,vlan=40' or '-i 3b:10.2,vlan=50 3b:10.3,vlan=10 af:10.2 af:10.3' -s MEMORY, --memory MEMORY Memory in Gbytes to assign to VM. Default is 4 Gb -c CORES, --cores CORES Number of Cores to assign to VM. Default is 4 cores -r [REMOVE [REMOVE ...]], --remove [REMOVE [REMOVE ...]] Remove VMs -q, --query Query info about configured VMs
Below is an example of commands used to launch a vEOS VMs with core count of 4 (default), 4GB memory (default), and with 4 ethernet interfaces.
Router# ./dca-200-veos-setup-vm.py -n veos-router1 -m /tmp/CloudEOS.qcow2 -i 10GB2,vlan=50 10GB1,vlan=10 10GB3,vlan=100 af:10.0,vlan=200 Extracting info for existing VMs: [''] Total count is: 20, reserved for hypervisor: 2, Total Available: 18 Used CPU count is 0, Free cores 18 intfList is: ['10GB2,vlan=50', '10GB1,vlan=10', '10GB3,vlan=100', 'af:10.0,vlan=200'] Used CPU count is 0, Free cores 18 Free core set on Node 0 : [2, 4, 6, 8, 10, 12, 14, 16, 18] CPU core used are:[2, 4, 6, 8] Using PCI interfaces for new VM veos-router1: ('veos-router1', 'et1') --> 10GB2 PCI address: 3b:10.0 vlan 50 mac None ('veos-router1', 'et2') --> 10GB1 PCI address: 3b:10.1 vlan 10 mac None ('veos-router1', 'et3') --> 10GB3 PCI address: af:10.1 vlan 100 mac None ('veos-router1', 'et4') --> 10GB4 PCI address: af:10.0 vlan 200 mac None
The following observations are from the above example:
- Without specifying number of cores, VM will be created with 4 cores by default. vEOS launcher picks core 2,4,6,8 on NUMA node0 for veos-router1.
- A different image “/tmp/CloudEOS.qcow2” than the default vEOS Router image (/data/tools/CloudEOS.qcow2) is specified
- Interfaces MUST be specified in VM interface order (the physical 10GB port eth1, eth2.. in VM) in either 10GBx or PCI address format. In the above example we used both 10GBx format as well as PCI address format to specify 4 interfaces. The interfaces are configured on different VLANs
- Launcher script will print out the guest interface mapping to host 10GB interfaces.
If an error occurs while creating a new VM using vEOS launcher, then refer to the Troubleshooting section of the chapter for more information.
The dca-200-veos-setup-vm.py script is used to remove the running VMs. The example below shows how to remove two existing VMs.
Router# ./dca-200-veos-setup-vm.py -r veos-router1 veos-router2 Cleaning up VM:veos-router1 Cleaning up VM:veos-router2
Besides launching/removing functionality, dca-200-veos-setup-vm.py script also provides a query command to print the current status of the running VMs. The output includes
- List of running VMs
- Mapping of running VM interfaces to host interfaces
- Mapping of VM CPUs to host CPUs
Below is an example output:
Router# ./dca-200-veos-setup-vm.py -q Extracting info for existing VMs: ['veos-router1', 'veos-router2'] Total count is: 20, reserved for hypervisor: 2, Total Available: 18 Used CPU count is 8, Free cores 10 VM veos-router1 : interfaces: et1 --> 10GB2 PCI address: 3b:10.0 vlan 50 mac 52:54:00:d4:f4:46 et2 --> 10GB1 PCI address: 3b:10.1 vlan 10 mac 52:54:00:d8:a9:50 et3 --> 10GB3 PCI address: af:10.1 vlan 100 mac 52:54:00:0c:0a:15 et4 --> 10GB4 PCI address: af:10.0 vlan 200 mac 52:54:00:20:4a:67 CPU Core Mapping: 0 --> 2 1 --> 4 2 --> 6 3 --> 8 VM veos-router2 : interfaces: et1 --> 10GB4 PCI address: af:10.2 vlan 50 mac 52:54:00:bb:ab:f1 et2 --> 10GB3 PCI address: af:10.3 vlan 10 mac 52:54:00:58:f7:2b CPU Core Mapping: 0 --> 10 1 --> 12 2 --> 14 3 --> 16 Available free cores:3 5 7 9 11 13 15 17 18 19