I have covered installation of Openswitch OPX 2.3.2 on Linux Ubuntu 16.04 in a previous article. I will go further with this time and cover installation of Openswitch 3.0.0 on Ubuntu 18.04 (upgrade from 16.04). Firstly, it is worth to add that I haven't been successful with installation of any OPX version on Ubuntu 18.0.4.1. I have done several test with different Oracle VirtualBox versions (5.1, 5,2) but I have always got the error message VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available). According to the words of developers installation of OPX 3.0.0 has been tested with Ubuntu 16.04 and Oracle VirtualBox 5.2.
1. Openswitch OPX 3.0.0 Installation Ubuntu 18.04.1 Using Nested Virtualization
As I do not posses any spare hardware I decided to do a little workaround with the help of nested virtualization. Nested virtualization refers to virtualization that runs inside an already virtualized environment. In other words, it is the ability to run a hypervisor inside of a virtual machine (VM), which itself runs on a hypervisor. I installed Openswitch OPX 3.0.0 on Ubuntu 16.04 (guest machine) that was run inside WMware Workstation 14 virtual machine. The VMware Workstation was installed on Ubuntu 18.04 (host). Inside the guest machine with Ubuntu 16.04, the Oracle Virtual 5.2 was installed in order to build Openswitch OPX.
The installation includes downloading vm tools for Linux (lvm), ONIE ISO and PKGS binary.
$ wget http://archive.openswitch.net/vm-tools/lvm
$ wget http://archive.openswitch.net/onie/onie-kvm_x86_64-r0.iso
$ wget http://archive.openswitch.net/installers/3.0.0/Dell-EMC/PKGS_OPX-3.0.0-installer-x86_64.bin
Installation process is then easy as a single command.
$ lvm --verbose create openswitch --iso onie-kvm_x86_64-r0.iso --bin PKGS_OPX-2.1.0.0-installer-x86_64.bin
In my environment, nested virtualization has to be enabled for VMware VM otherwise Openswitch OPX installation process fails (Picture 1).
Picture 1 - Error Message During Openswitch OPX Installation Complaining about Missing VT-X
To enable nested virtualization for a particular VM, left click on VM, choose Settings-> Processors and enable the option Virtualize Intel VT-x/EPT or AMD -V/RVI (Picture 2).
Picture 1 - Enabling Nested Virtualization in VMware Workstation 14
Once installation process is finished, VirtualBox VM is created. Copy the disk openswitch.vdi located in the directory ~/temp/.
$ cp ~/temp/openswitch.vdi .
Now we can use Qemu hypervisor to run openswitch VM.
$ /usr/local/bin/qemu-system-x86_64 -m 1024M -enable-kvm openswitch.vdi -serial telnet:127.0.0.1:8888,server,nowait
Connect to the IP address 127.0.0.1 and port 8888. The username is opxUser and password is not set.
$ telnet 127.0.0.1 8888
2. After Installation Steps
I have created after install install.sh for Openswitch OPX 3.0.0 version. The script customizes OPX installation installing FRRouting 5.0.1. The script also reduces timeout needed for assigning IP address during boot to 15 seconds so the boot process is faster. Finally, the script check for appearance of all OPX interfaces.
Copy the the content of my script to the file install.sh. Enter vi install.sh, press "i" and copy & paste the content. The press esc and write :wq!. Run the script with the command.
$ sudo bash install.sh
Note: Customized Openswitch OPX 3.0.0. appliance is available in Openswitch Download section.
3. Testing
Build the same network topology for Openswitch OPX 3.0.0 testing as we did for Openswitch 2.3.2 testing.