The first Virtual Network Function (VNF) that we will create within our lab is VyOs. VyOS started life as a project called Vyatta. Vyatta was designed to be an Open Source Linux Routing Operating System. It came with both a free version and a paid-for version with professional support. In 2012, the paid version was acquired by Brocade and became the “Brocade Vyatta 5400 vRouter”. It was then later sold to AT&T and now finally rests with Ciena. Fortunately for us, in 2013, the Open Source version was forked by a group named VyOS.
So let’s look at how to get VyOS running in our VirtualBox based lab. First, head on over to https://vyos.net/get/snapshots/ and download one of the *.iso snapshots.
Open up VirtualBox, click the “New” button and give it a name. I will be using “vyos-1.3.0-rc6” as this is the name of the snapshot I downloaded. Give it a type of “Linux” and a version of “Other (64-bit)”.
According to https://docs.vyos.io/en/latest/installation/install.html, VyOS requires 512MiB RAM and 2GiB storage. So for our testing, we will select 512MB in VirtualBox.
Select “Create a virtual hard disk now” on the next screen. Then “VDI (VirtualBox Disk Image” is OK, as is “Dynamically allocated” on the next page. Finally, I will give it 4GB of space on the hard drive.
After clicking “Create,” you should be back at the main VirtualBox screen. Before booting the Virtual Machine (VM), there are some settings we need to tweak. Make sure the VM is selected, click “Settings”, and go to the “Network” tab.
For “Adapter 1”, make sure the “Attached to:” to be “Host-only Adapter” – this will be our Management interface.
I also like to change the “Adapter Type” (which is under Advanced) to “Paravirtualized Network (virtio-net)”. Although this is not needed for VyOS, this adapter tends to play best with other vendors later on.
After saving your settings with “OK”, you can now “Start” the VyOS VM. When you first start the VM, VirtualBox will ask you if you want to insert a virtual CD into the CDROM – we do. Select the browse button, then “Add”, navigate to your VyOS ISO file and select it to be added. Once added, press “Start”.
After a while, the VM will be booted, and you will be presented with the login screen. You can type a username and password of “vyos” to log in. (If at any point you cannot get your mouse free from the VM window, press the Right Ctrl button on your keyboard.)
We now have our VyOS instance running in VirtualBox. However, we are not done. This is currently running off the Live ISO CD and is not installed on our hard drive. So, let’s install VyOS on the hard drive.
On the VyOS CLI, type “install image”. Walkthrough the installer questions. You can hit enter for most of the questions, which will accept the default within the square brackets. Just make sure to type “yes” for the continue question, and when it asks you to enter a password, you can do “vyos” for now.
After the install is completed, you can first remove the ISO CD from the drive by going to “Devices” > “Optical Drives” > “Remove disk from the virtual drive” (You may need to click “Force Unmount” after this). After this, type “reboot now” on the CLI and press enter.
VyOs will now reboot, and you will have a fully working version of VyOS running in VirtualBox!