How to install PNETLab on GCP
1. Open cloud console in GCP once you are in the CLI, run below command depending on the PNETLab version you want to install.
- PNETLab version 5 (Ubuntu 18.04):
gcloud compute images create nested-ubuntu-bionic --source-image-family=ubuntu-1804-lts --source-image-project=ubuntu-os-cloud --licenses
https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
- PNETLab version 6 (Ubuntu 20.04):
gcloud compute images create nested-ubuntu-focal --source-image-family=ubuntu-2004-lts --source-image-project=ubuntu-os-cloud --licenses
https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
2. Create a VM instance with the specs you want.
Recommendations:
CPU: Intel CPUs Skylake or Cascade
Disk: SSD for better performance
- For the boot disk, select the nested image that you created in step 1
- Allow HTTP and HTTPS traffic
- "Deploy a container image” must be UNCHECKED
- After the VM is created, ssh to it and switch to the root user:
sudo -i
3. Run the installation script for the corresponding PNETLab version: check the installation instructions for each version by issuing the command /notes in PNETLab's group.
Once installation is completed reboot the VM with this command:
reboot
Wait for few seconds while the VM reboots and ssh to it again.
When the setup wizard screen appears, press ctrl + c and type the below command to switch to the root user:
sudo -i
You'll get setup wizard again. When it asks you to enter your new root password, enter it twice, give a hostname of choice, domain name of choice, and select DHCP (don't use static ip ), and leave NTP blank.
And that's it. Enjoy PNETLab!