Using a Management VM with Cumulus VX

  • 9
  • Article
  • Updated 2 years ago
  • (Edited)
While automation is very popular today in networking, it comes with it's own learning curve.  Sometimes it's best to start at a point of no automation and fill in the fundamentals of what's going on so that it's easy to see how automation accomplishes the same thing for you.  With that in mind, I decided to create a Cumulus VX setup based around also having a Management VM, as as you might find in production.  This Management VM would be my DHCP, apache and in the future my automation server to kickstart and provision my CumulusVX nodes.  This way I could also try out different tools by just cloning the basic VM and experimenting as I needed.  I also created two sets of sample sets of configs, one for OSPF Unnumbered and one for L2 with CLAG as a place to start experimenting.  If this sounds of interest to you, please grab the VM and get started on your own testing.

What do you need:
- Cumulus VX - https://cumulusnetworks.com/cumulus-vx/
- VirtualBox (with the add-on package) - https://www.virtualbox.org/
- Management VM - https://cumulusnetworks.box.com/shared/static/638d3ev7zuxpdp764a1h14cdgw1em37j.ova

The topology will end up looking like this:



The management VM is a version of Ubuntu Server 14.04, which beyond the base packages, also runs DHCP and apache to provide the CumulusVX nodes with IP addresses and a ZTP script to run at first boot.  It also has a set of sample configs for OSPF and L2 as a basis to start testing.  The root and cumulus account on the VM uses our default password of "CumulusLinux!".

The first step is to install Cumulus VX and the Management VM.  Once they are in place, leveraging the VBoxManage commands below we create four clones and setup the virtual NIC's as they are needed to interconnect into a 2-leaf, 2-spine Clos setup.  For Mac users, you can copy and paste the following commands into a terminal window as they are provided.  For the Windows users, the first step is to cd into the VirtualBox directory (e.g. "cd C:\Program Files\Oracle\VirtualBox") and update the commands below to replace "VBoxManage" with ".\VBoxManage.exe".

One thing of note:  The name of the VM to clone for CumulusVX will change over time.  The first four commands will need to be adjusted as a result.

VBoxManage clonevm "CumulusVX-2.5.3-4eb681f3df86c478" --mode machine --name "leaf1" --register
VBoxManage clonevm "CumulusVX-2.5.3-4eb681f3df86c478" --mode machine --name "leaf2" --register
VBoxManage clonevm "CumulusVX-2.5.3-4eb681f3df86c478" --mode machine --name "spine1" --register
VBoxManage clonevm "CumulusVX-2.5.3-4eb681f3df86c478" --mode machine --name "spine2" --register
VBoxManage modifyvm "leaf1" --nic1 intnet
VBoxManage modifyvm "leaf1" --nic2 intnet
VBoxManage modifyvm "leaf1" --nic3 intnet
VBoxManage modifyvm "leaf1" --nic4 intnet
VBoxManage modifyvm "leaf1" --nic5 intnet
VBoxManage modifyvm "leaf1" --nic6 intnet
VBoxManage modifyvm "leaf1" --nic7 intnet
VBoxManage modifyvm "leaf1" --nic8 intnet
VBoxManage modifyvm "leaf1" --macaddress1 080027817AFA
VBoxManage modifyvm "leaf1" --intnet1 "OOB"
VBoxManage modifyvm "leaf1" --intnet2 "l1s1.1"
VBoxManage modifyvm "leaf1" --intnet3 "l1s1.2"
VBoxManage modifyvm "leaf1" --intnet4 "l1s2.1"
VBoxManage modifyvm "leaf1" --intnet5 "l1s2.2"
VBoxManage modifyvm "leaf1" --intnet6 "leaf1.1"
VBoxManage modifyvm "leaf1" --intnet7 "leaf1.2"
VBoxManage modifyvm "leaf1" --intnet8 "leaf1.3"
VBoxManage modifyvm "leaf1" --nicpromisc2 allow-all
VBoxManage modifyvm "leaf1" --nicpromisc3 allow-all
VBoxManage modifyvm "leaf1" --nicpromisc4 allow-all
VBoxManage modifyvm "leaf1" --nicpromisc5 allow-all
VBoxManage modifyvm "leaf1" --nicpromisc6 allow-all
VBoxManage modifyvm "leaf1" --nicpromisc7 allow-all
VBoxManage modifyvm "leaf1" --nicpromisc8 allow-all
VBoxManage modifyvm "leaf2" --nic1 intnet
VBoxManage modifyvm "leaf2" --nic2 intnet
VBoxManage modifyvm "leaf2" --nic3 intnet
VBoxManage modifyvm "leaf2" --nic4 intnet
VBoxManage modifyvm "leaf2" --nic5 intnet
VBoxManage modifyvm "leaf2" --nic6 intnet
VBoxManage modifyvm "leaf2" --nic7 intnet
VBoxManage modifyvm "leaf2" --nic8 intnet
VBoxManage modifyvm "leaf2" --macaddress1 080027EF72F2
VBoxManage modifyvm "leaf2" --intnet1 "OOB"
VBoxManage modifyvm "leaf2" --intnet2 "l2s1.1"
VBoxManage modifyvm "leaf2" --intnet3 "l2s1.2"
VBoxManage modifyvm "leaf2" --intnet4 "l2s2.1"
VBoxManage modifyvm "leaf2" --intnet5 "l2s2.2"
VBoxManage modifyvm "leaf2" --intnet6 "leaf2.1"
VBoxManage modifyvm "leaf2" --intnet7 "leaf2.2"
VBoxManage modifyvm "leaf2" --intnet8 "leaf2.3"
VBoxManage modifyvm "leaf2" --nicpromisc2 allow-all
VBoxManage modifyvm "leaf2" --nicpromisc3 allow-all
VBoxManage modifyvm "leaf2" --nicpromisc4 allow-all
VBoxManage modifyvm "leaf2" --nicpromisc5 allow-all
VBoxManage modifyvm "leaf2" --nicpromisc6 allow-all
VBoxManage modifyvm "leaf2" --nicpromisc7 allow-all
VBoxManage modifyvm "leaf2" --nicpromisc8 allow-all
VBoxManage modifyvm "spine1" --nic1 intnet
VBoxManage modifyvm "spine1" --nic2 intnet
VBoxManage modifyvm "spine1" --nic3 intnet
VBoxManage modifyvm "spine1" --nic4 intnet
VBoxManage modifyvm "spine1" --nic5 intnet
VBoxManage modifyvm "spine1" --nic6 intnet
VBoxManage modifyvm "spine1" --nic7 intnet
VBoxManage modifyvm "spine1" --nic8 intnet
VBoxManage modifyvm "spine1" --macaddress1 080027BD9BBA
VBoxManage modifyvm "spine1" --intnet1 "OOB"
VBoxManage modifyvm "spine1" --intnet2 "l1s1.1"
VBoxManage modifyvm "spine1" --intnet3 "l1s1.2"
VBoxManage modifyvm "spine1" --intnet4 "l2s1.1"
VBoxManage modifyvm "spine1" --intnet5 "l2s1.2"
VBoxManage modifyvm "spine1" --intnet6 "s1s2.1"
VBoxManage modifyvm "spine1" --intnet7 "s1s2.2"
VBoxManage modifyvm "spine1" --intnet8 "spine1"
VBoxManage modifyvm "spine1" --nicpromisc2 allow-all
VBoxManage modifyvm "spine1" --nicpromisc3 allow-all
VBoxManage modifyvm "spine1" --nicpromisc4 allow-all
VBoxManage modifyvm "spine1" --nicpromisc5 allow-all
VBoxManage modifyvm "spine1" --nicpromisc6 allow-all
VBoxManage modifyvm "spine1" --nicpromisc7 allow-all
VBoxManage modifyvm "spine1" --nicpromisc8 allow-all
VBoxManage modifyvm "spine2" --nic1 intnet
VBoxManage modifyvm "spine2" --nic2 intnet
VBoxManage modifyvm "spine2" --nic3 intnet
VBoxManage modifyvm "spine2" --nic4 intnet
VBoxManage modifyvm "spine2" --nic5 intnet
VBoxManage modifyvm "spine2" --nic6 intnet
VBoxManage modifyvm "spine2" --nic7 intnet
VBoxManage modifyvm "spine2" --nic8 intnet
VBoxManage modifyvm "spine2" --macaddress1 08002710EDB2
VBoxManage modifyvm "spine2" --intnet1 "OOB"
VBoxManage modifyvm "spine2" --intnet2 "l1s2.1"
VBoxManage modifyvm "spine2" --intnet3 "l1s2.2"
VBoxManage modifyvm "spine2" --intnet4 "l2s2.1"
VBoxManage modifyvm "spine2" --intnet5 "l2s2.2"
VBoxManage modifyvm "spine2" --intnet6 "s1s2.1"
VBoxManage modifyvm "spine2" --intnet7 "s1s2.2"
VBoxManage modifyvm "spine2" --intnet8 "spine2"
VBoxManage modifyvm "spine2" --nicpromisc2 allow-all
VBoxManage modifyvm "spine2" --nicpromisc3 allow-all
VBoxManage modifyvm "spine2" --nicpromisc4 allow-all
VBoxManage modifyvm "spine2" --nicpromisc5 allow-all
VBoxManage modifyvm "spine2" --nicpromisc6 allow-all
VBoxManage modifyvm "spine2" --nicpromisc7 allow-all
VBoxManage modifyvm "spine2" --nicpromisc8 allow-all

Once this is done, you can now start up the VM's.  It is important to start the Management VM first so that the DHCP server is up and running to provide IP addresses to the CumulusVX nodes and to provide the ZTP script to allow password-less login.

Once everything is up, if you would like to use the default configs, they can be found in the directory "~root/Backup/CLAG" and "~root/Backup/OSPF-unnumbered".  Within each of these directories there is a script called "push" which will scp all of the correct files over the correct VMs.  Depending on which example you would like to run, you just need to cd into the correct directory, execute "./push" and then reboot the CumulusVX nodes.  They will come back up in the respective setups and can form the basis of whatever testing your trying to accomplish.
Photo of David Sinn

David Sinn, Alum

  • 262 Points 250 badge 2x thumb

Posted 3 years ago

  • 9
Photo of Kevin Witherstine

Kevin Witherstine, Employee

  • 770 Points 500 badge 2x thumb
To automatically start the cloned VM's, add the following lines to the VBoxManage text from above:

VBoxManage startvm leaf1 --type headless

VBoxManage startvm leaf2 --type headless

VBoxManage startvm spine1 --type headless

VBoxManage startvm spine2 --type headless

Photo of Kevin Witherstine

Kevin Witherstine, Employee

  • 770 Points 500 badge 2x thumb
To use the Virtual Box commands above with VX 2.5.4, replace the first 4 commands above with the following lines:

VBoxManage clonevm "CumulusVX-2.5.4-fe760348e9fccfb1" --mode machine --name "leaf1" --register

VBoxManage clonevm "CumulusVX-2.5.4-fe760348e9fccfb1" --mode machine --name "leaf2" --register

VBoxManage clonevm "CumulusVX-2.5.4-fe760348e9fccfb1" --mode machine --name "spine1" --register

VBoxManage clonevm "CumulusVX-2.5.4-fe760348e9fccfb1" --mode machine --name "spine2" --register

Photo of Kevin Witherstine

Kevin Witherstine, Employee

  • 770 Points 500 badge 2x thumb
Update to clone lines for VX 2.5.5:

VBoxManage clonevm "CumulusVX-2.5.5-cc665123486ac43d" --mode machine --name "leaf1" --register
VBoxManage clonevm "CumulusVX-2.5.5-cc665123486ac43d" --mode machine --name "leaf2" --register
VBoxManage clonevm "CumulusVX-2.5.5-cc665123486ac43d" --mode machine --name "spine1" --register
VBoxManage clonevm "CumulusVX-2.5.5-cc665123486ac43d" --mode machine --name "spine2" --register
(Edited)