Obtaining required software guideline [Pre-requisite]#

To ensure a smooth experience with the tutorials, it's essential to install required development tools.

If you are starting this tutorial at one of the proctored tutorial > events,then we've already provided you with a virtual machine that has all ofthe required software installed. Ask an instructor for a USB stick withthe VM image. Otherwise, to complete the exercises, you will need to either build a virtual machine or install several dependencies.

To build the virtual machine#

  • Install Vagrant and VirtualBox

  • Clone the repository

  • Before proceeding, ensure that your system has at least 12 Gbytes of free disk space, otherwise the installation can fail in unpredictable ways.

  • cd vm-ubuntu-20.04

  • vagrant up - The time for this step to complete depends upon your computer and Internet access speeds, but for example with a 2015 MacBook pro and 50 Mbps download speed, it took a little less than 20 minutes. It requires a reliable Internet connection throughout the entire process.

  • When the machine reboots, you should have a graphical desktop machine with the required software pre-installed. There are two user accounts on the VM, vagrant (password vagrant) and p4 (password p4). The account p4 is the one you are expected to use.

Note: Before running the vagrant up command, make sure you have enabled virtualization in your environment; otherwise you may get a "VT-x is disabled in the BIOS for both all CPU modes" error. Check this for enabling it in virtualbox and/or BIOS for different system configurations.

You will need the script to execute to completion before you can see the p4 login on your virtual machine's GUI. In some cases, the vagrant up command brings up only the default vagrant login with the password vagrant. Dependencies may or may not have been installed for you to proceed with running P4 programs. Please refer the existing issues to help fix your problem or create a new one if your specific problem isn't addressed there.

To install P4 development tools on an existing system#

There are instructions and scripts in another Github repository that can, starting from a freshly installed Ubuntu 20.04 or 22.04 Linux system with enough RAM and free disk space, install all of the necessary P4 development tools to run the exercises in this repository. You can find those instructions and scripts here (note that you must clone a copy of that entire repository in order for its install scripts to work).