Topology
Convert vEOS vmdk to qcow2
Download a copy of vEOS-lab HERE, however registered account is required.
Once the image(vEOS-lab-4.20.1F-combine.vmdk) is downloaded we can start converting it to qcow2
#qemu-img convert -o compat=1.1 -f vmdk -O qcow2 -c -p vEOS-lab-4.20.1F-combined.vmdk
Create a new OVS bridge
In this example I’m creating two OVS bridge called brMGMT & brLAB
[root@vhost1 ~]# ovs-vsctl add-br brMGMT
[root@vhost1 ~]# ovs-vsctl add-br brLAB
Verify
[root@vhost1 ~]# ovs-vsctl list-br
brLAB
brMGMT
Create a new vEOS instance
I ran the following virt-install
command
NOTE:
I made a new copy of the image named vEOS01.qcow2 and associate the OVS bridges
virt-install \
--connect=qemu:///system \
--name=vEOS01 \
--os-type=linux \
--arch=x86_64 \
--cpu host-model \
--vcpus=1,sockets=1,cores=1,threads=1 \
--hvm \
--ram=2048 \
--disk path=/var/lib/libvirt/images/veos01.qcow2,bus=ide,size=8,sparse=false,cache=none,format=qcow2 \
--network bridge=brMGMT,model=e1000,target=virtualport_type=openvswitch \
--network bridge=brLAB,model=e1000,virtualport_type=openvswitch \
--boot hd \
--graphics none \
--console pty,target_type=serial \
-d
After virt-install
completes, we should be able to see the vEOS01 is running
[root@vhost1 ~]# virsh list
Id Name State
----------------------------------------------------
21 vEOS01 running
Run virsh console
command to console to the veos
[root@vhost1 ~]# virsh console vEOS01
Connected to domain vEOS01
Escape character is ^]
localhost login: admin
Password:
Last login: Wed Jul 11 16:22:19 on ttyS0
localhost>
localhost> enable
localhost#show interfaces status
Port Name Status Vlan Duplex Speed Type Flags
Et1 connected routed full unconf EbraTestPhyPort
Ma1 connected routed a-full a-1G 10/100/1000
Additional setup and validation on the OVS
To check which vnet
interface assigns to the vEOS
virsh dumpxml vEOS01
Since the default OVS port is in trunk
mode and Arista Ma1
interface doesn’t support dot1q, we will need to tag the vlan id
on the vEOS port belongs to OVS bridge brMGMT
[root@vhost1 ~]# virsh dumpxml vEOS01 | grep bridge -A 6
<interface type='bridge'>
<mac address='52:54:00:2b:ed:50'/>
<source bridge='brMGMT'/>
<virtualport type='openvswitch'>
<parameters interfaceid='fd0c900a-01a1-4437-98a1-7bfac1e7687a'/>
</virtualport>
<target dev='vnet0'/>
<model type='e1000'/>
<alias name='net0'/>
--
<interface type='bridge'>
<mac address='52:54:00:b9:88:70'/>
<source bridge='brLAB'/>
<virtualport type='openvswitch'>
<parameters interfaceid='4f98706d-33eb-4241-9853-ebcca447399d'/>
</virtualport>
<target dev='vnet1'/>
<model type='e1000'/>
<alias name='net1'/>
vnet0
and vnet1
are generated for the vEOS
To verify under the OVS
[root@vhost1 ~]# ovs-vsctl list-ifaces brMGMT
vnet0
[root@vhost1 ~]# ovs-vsctl list-ifaces brLAB
vnet1
Set vnet0
port (which is assigned to the ma1 on the vEOS) with a vlan tag
[root@vhost1 ~]# ovs-vsctl set port vnet0 tag=101
Verify it’s setup correctly
ovs-vsctl show
Bridge brMGMT
Port brMGMT
Interface brMGMT
type: internal
Port "vnet0"
tag: 101
Interface "vnet0"
To enable layer2 protocols like LLDP/SPT/LACP between the different vEOS thru the OVS, for example in our case it will be the brLAB
bridge. This will allows two vEOS to setup LACP port-channels or/and MLAG.
[root@vhost1 ~]#ovs-vsctl set bridge brMGMT other-config:forward-bpdu=true