Running netlab in a Public Cloud¶
You can run netlab on a Ubuntu instance in any public cloud that supports nested virtualization. Create a Ubuntu instance, verify that it has virtualization capabilities (kvm-ok
is usually a good way to find that out), and follow Ubuntu Server Installation instructions.
Nested virtualization seems to be supported on AWS bare-metal instances (they tend to be expensive), some Azure instances, in Google Cloud, by Packet (bare-metal provider) and by Digital Ocean.
Google Cloud¶
The following procedure worked for Oswaldo Lamothe who found the trick in EVE-NG documentation (EVE-NG also needs nested virtualization).
GCP does not provide nested virtualization by default. You must begin with setting up a custom image for that purpose from the genuine Ubuntu 20.04 image.
I have used the following command for doing so (from the Google Cloud CLI):
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
Then, create a new VM with the image you’ve just created (name nested-ubuntu-focal).