Jump to Content
Developers & Practitioners

How to Create a Linux VM instance In Compute Engine

November 29, 2022
Bukola Ayodele

Developer Advocate

There is a new way to supercharge your learning of Google Cloud!  Next time you are interested in learning Google Cloud skills or features, check out embedded interactive tutorials. Interactive tutorials are step by step tutorials that help you learn about Google Cloud. They are embedded directly into the Google Cloud console, so there is no context switching.  These tutorials integrate with Cloud Shell and Cloud Code to provide a preconfigured development environment to allow you to learn quickly. 

In this blog post we’ll walk through how to Create a Linux VM instance In Compute Engine interactive tutorial together. You can find Interactive tutorials directly in the Google Cloud documentation via a "Guide Me" button. This button takes you directly to the tutorial

https://storage.googleapis.com/gweb-cloudblog-publish/images/Guide_Me_Button_1.max-1000x1000.png
Guide Me Button In Create A Linux VM in Compute Engine Documentation

Walk Through

https://storage.googleapis.com/gweb-cloudblog-publish/images/Introduction_Panel__2000__3000_px.max-2000x2000.png
Create Linux VM Start panel

On the first panel of all interactive tutorials users will learn the specific steps of each tutorial and the estimated time to complete this tutorial! We’ll click Start to begin the tutorial. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Step_1_Panel__2000__3000_px.max-2000x2000.png
Create Linux VM Step 1 panel

The first step is to enable the Compute Engine API in a Cloud Project. According to the instructions, we’ll need to first select a project or create a new one. I’ll use an existing project called test-ctd. The next step is to enable the necessary APIs, because the project test-ctd already has this API enabled, which is reflected in the green check mark.

Step 2

https://storage.googleapis.com/gweb-cloudblog-publish/images/Step_2_Panel_2000__5000_px.max-2000x2000.png
Create Linux VM Step 2 panel

The second step walks us through how to create a Linux VM instance. First starting with navigating to the menu and clicking "VM instances", which appears under "Compute Engine". If you are having difficulties finding specific buttons or knowing where to navigate, use the spotlight feature. The spotlight feature is a common feature in interactive tutorials that helps highlight different sections of the web page detailed in the tutorial. Spotlight buttons are either purple or blue buttons. Use them to guide you through the tutorial. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Spotlight_Example_1_1.max-2200x2200.png
https://storage.googleapis.com/gweb-cloudblog-publish/images/Spotlight_Example_2.max-2200x2200.png
Example of Spotlight feature

For the next instruction “Create Instance '', we’ll use the spotlight feature and click on the highlighted show me button. Next we’ll enter an instance name, I’ll use the the name ‘test-instance

https://storage.googleapis.com/gweb-cloudblog-publish/images/Naming_Instance.max-2200x2200.png
Naming VM Instance

We’ll change the following setting on the Public Images tab, to the operating system listed in the tutorial which is Ubuntu 20.04 LTS and click the select button. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Select_Boot_Disk.max-2200x2200.png
Choose Operating System

In the firewall section, we’ll tick the box  Allow HTTP traffic and clicking create

Now we see our new instance  on the VM instances page. Let’s click next to move on to the next instructions

https://storage.googleapis.com/gweb-cloudblog-publish/images/Allow_Firewall.max-2200x2200.png
Choose Firewall

Step 3

The third step is to Connect to the VM instance. To find the Connect column, we’ll use a spotlight to highlight SSH, by clicking it a new cmd dialog opens and shows that we are connected to the  VM terminal!

https://storage.googleapis.com/gweb-cloudblog-publish/images/Showing_Connection_To_VM_Instance.max-2200x2200.png
SSH into VM

Step 4

On the final panel you’ll see other interactive tutorials to learn more about Compute Engine. Finally you’ll see information to clean up the instances so you don’t incur additional charges. We can click FINISH to wrap up this tutorial. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Delete_Instance.max-2200x2200.png
Delete VM Instance

Next Steps

There you have it! You’ve created a Linux VM Instance in Compute Engine with the help of interactive tutorials. If you’d like to follow another interactive tutorial, check out this Create a Windows Server VM instance in Compute Engine tutorial

Posted in