Google Cloud Platform Install Ubuntu Minimal 1804 LTS and GNS3 Server

How to install Ubuntu Minimal 180.4 LTS and GNS3 Server on Google Cloud Platform (GCP).

I assume you already have a GCP account and create a project.

Now, open your cloud shell.

- To show list image available
gcloud compute images list

gcloud compute images list | grep minimal
ubuntu-minimal-1604-xenial-v20191113                  ubuntu-os-cloud    ubuntu-minimal-1604-lts                       READY
ubuntu-minimal-1804-bionic-v20191113                  ubuntu-os-cloud    ubuntu-minimal-1804-lts                       READY
ubuntu-minimal-1904-disco-v20191113                   ubuntu-os-cloud    ubuntu-minimal-1904                           READY
ubuntu-minimal-1910-eoan-v20191113                    ubuntu-os-cloud    ubuntu-minimal-1910                           READY

- To show list zones (I'm at Asia)
gcloud compute zones list

gcloud compute zones list | grep asia
asia-east1-b               asia-east1               UP
asia-east1-a               asia-east1               UP
asia-east1-c               asia-east1               UP
asia-southeast1-b          asia-southeast1          UP
asia-southeast1-a          asia-southeast1          UP
asia-southeast1-a          asia-southeast1          UP
asia-northeast1-b          asia-northeast1          UP
asia-northeast1-c          asia-northeast1          UP
asia-northeast1-a          asia-northeast1          UP
asia-south1-c              asia-south1              UP
asia-south1-b              asia-south1              UP
asia-south1-a              asia-south1              UP
asia-east2-a               asia-east2               UP
asia-east2-b               asia-east2               UP
asia-east2-c               asia-east2               UP
asia-northeast2-a          asia-northeast2          UP
asia-northeast2-b          asia-northeast2          UP
asia-northeast2-c          asia-northeast2          UP

Check the best latency for you at http://www.gcping.com/

- Create image that support "Nested Virtualization"
gcloud compute images create nested-virt-minimal \
--source-image-project=ubuntu-os-cloud \
--source-image-family=ubuntu-minimal-1804-lts \
--licenses="https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"

- Install new instance using image that we have just created
gcloud compute instances create gns3-server \
--zone asia-southeast1-a \
--image nested-virt-minimal \
--machine-type n1-standard-4

- Show running instance
gcloud compute instances list

- Get static IP, change below IP_ADDRESS to your running instance Ephemeral IP
gcloud compute instances create gns3-server --address IP_ADDRESS

- Update firewall
gcloud compute --project=gns3-tngops firewall-rules create allow-gns3server 
--description="Let it all through" 
--direction=INGRESS 
--priority=100 
--network=default 
--action=ALLOW 
--rules=all 
--source-ranges=0.0.0.0/0


Next, SSH to new instance gns3-server.

- To confirm virtualization is working.
lscpu 
...
Virtualization : VT-x
Hypervisor vendor : KVM
Virtualization type : full
...

- Install GNS3Server
cd /tmp
curl https://raw.githubusercontent.com/GNS3/gns3-server/master/scripts/remote-install.sh > gns3-remote-install.sh
sudo bash gns3-remote-install.sh --with-iou --with-i386-repository

- Check GNS3 server version
gns3server -v


Done.

Later,  we'll continue to how to connect GNS3 GUI to our GCP GNS server.

0 comments:

Post a Comment