Creating Your First VM using Compute Engine [DEMO] 2000201001
This guide walks you step-by-step through launching a Google Compute Engine VM
Hafeez Baig
34 steps
8 minutes
Google Cloud
Project Setup
Refer to this guide to learn how to create a Google Cloud Platform Account.\ <https://scribehow.com/shared/Creating_GCP__Google_Cloud_Platform__kcxx4ZDuTuOqMhoAaqBzHQ>
1
Go to Google Cloud Console
2
Type and Select "**Compute Engine**" in the search bar
**What is Compute Engine?** Compute Engine is GCP's IaaS offering that lets you create and run virtual machines (VMs) on Google's infrastructure. You get full control over the OS, CPU, memory, and disk, with flexible options like custom machine types and Spot VMs. It's ideal for hosting apps, batch jobs, and lift-and-shift migrations.
3
Navigate and Click on "**VM instances**" from the left bar
4
Click "**Enable**" to activate Compute Engine API
VM Instance Configuration
5
**Overview** wizard will open, click on the **Create Instance** button on the top left to create a new instance
**What is an Instance?**\ \ An instance is a virtual machine (VM) running on Google Cloud Platform's Compute Engine, providing the necessary resources and environment to run applications and workloads.
6
**Create an instance** wizard will open, give the Name as - **my-first-vm**
7
In the **Regions** and **Zone** dropdown, you can select the region closest to you **Note:** For this demo, we will be selecting the region **us-central1 (Iowa)** and **Any** for Zone
8
Scroll to the **Machine configuration** section, click on the **General purpose** option
**What are General purpose Machines?**\ \ General purpose machines in Google Cloud Platform are VM instances optimized for a balanced mix of compute, memory, and network resources, suitable for a wide variety of workloads such as web servers, applications, and development environments.
9
Click on the **Compute optimized** option to view compute optimized machines for VM
**What are Compute optimized Machines?** \ \ Compute optimized machines in Google Cloud Platform are VM instances designed for high-performance computing tasks that require significant computational power, such as scientific simulations, machine learning, and data analysis.
10
Click on the **Memory optimized** option to view Memory optimized machines for VM
**What are Memory optimized Machines?**\ \ Memory optimized machines in Google Cloud Platform are VM instances optimized for workloads that require a large amount of memory relative to CPU, such as in-memory databases, real-time analytics, and high-performance computing applications that manipulate large data sets in memory.
11
Click on the **Network optimized** option to view Network optimized machines for VM
**What are Network-Optimized Machines?** Network-optimized machines are Compute Engine VM types designed for very high network bandwidth and low latency. They support significantly higher throughput than standard VMs, making them ideal for HPC, large-scale data transfers, and network-intensive distributed workloads.
12
Click on the **Storage optimized** option to view Storage optimized machines for VM
**What are Storage optimized Machines?**\ \ Storage optimized machines in Google Cloud Platform are VM instances designed for workloads that require high disk throughput and storage capacity, such as databases, data warehousing, and big data processing tasks that rely heavily on local disk performance.
13
Click on the **GPUs** option to view the GPU machines for VM
**What are GPUs ?**\ \ GPUs, or Graphics Processing Units, are specialized hardware accelerators used to enhance the performance of compute-intensive tasks, particularly those involving parallel processing. In the context of Google Cloud Platform (GCP), GPUs are available as virtual machine instances within Compute Engine and are used for tasks such as machine learning, scientific simulations, video transcoding, and more. They excel at handling large volumes of data and performing complex calculations efficiently.
14
Click on the **TPUs** option to view the TPU machines for VM
**What are TPUs?** TPUs (Tensor Processing Units) are Google's custom-built hardware accelerators designed specifically to speed up machine learning workloads, especially training and inference of deep learning models. They are optimized for large-scale matrix/tensor operations, making them faster and more cost-efficient than CPUs/GPUs for many AI tasks like neural network training.
15
For this demo, we will choose the **General Purpose** option. Then, select the Series **E2**.
**What is E2 in General Purpose Machine?**\ \ E2 instances in Google Cloud Platform's Compute Engine are part of the general-purpose machine family optimized for cost-effective performance. They offer a balanced mix of CPU and memory resources suitable for a wide range of applications, from web servers to enterprise applications, providing flexibility and cost efficiency.
16
Click here
17
Scroll to the **Machine type** section and click on the **Machine type** dropdown. Select e2-medium (2 vCPU, 1 core, 4 GB memory) **Note:** You can stay on the **Preset** tab and pick from the shared-core, Standard, High memory, or High CPU options depending on your CPU and memory needs. For this demo, we use the recommended default, **e2-medium**.
**What is Machine type?**\ \ The machine type sets the exact amount of vCPU and memory allocated to your VM. Within the E2 series, e2-medium provides 1–2 vCPUs (1 shared core) and 4 GB of memory, a balanced, low-cost option suited to everyday workloads and testing.
18
Navigate to the **OS and storage** section by selecting it from the left-hand sidebar.
**What is OS and storage?**\ \ OS and storage refers to the operating system a machine runs and the disk configuration used to store it.
19
Here you can review the **Operating system**, **Type**, **Size**, and **Image** for your VM's boot disk.
20
To change the configuration, click on the **Change** button
21
Here you can set the **Operating system**, **Version**, **Boot disk type**, and **Size** for your VM.
**What is a Boot disk?**\ \ A boot disk is a storage disk that contains the operating system and the files required to start a machine.
22
Once done, click the **Select** button
23
Scroll the page and click on the **Create** button **Note:** Creating a VM instance takes some time, and it will become visible on the VM instance dashboard once it is ready.
Connectivity and Verification
24
The VM instance named **my-first-vm** has been created, and you should see it listed on the screen.
25
On the right side, click on the three dots and here you can view more options for the vm instance
26
In the **Connect** column, click the **SSH** button to initiate the connection
27
Click "**Authorize**" to permit SSH access
28
You are now logged in and can run commands directly against the machine.
**What is SSH-in-browser?**\ \ SSH-in-browser is a built-in terminal that lets you connect to a virtual machine and run commands from within the web browser, without installing a separate SSH client.
29
In the terminal, type "whoami" and press **Enter**. This prints the username of the currently logged-in user.
**What is whoami?**\ \ whoami is a Linux command that displays the username of the user currently logged into the system.
30
Type `pwd` and press **Enter**. This prints the full path of the directory you are currently in.
**What is pwd?**\ \ `pwd` (print working directory) is a Linux command that displays the path of the current working directory.
31
Type `ls` and press **Enter** to list the files in the current directory.
**What is ls?**\ \ `ls` (list) is a Linux command that lists the files and directories within the current directory.
32
[[Type ]]`exit`[[ and press ]]**[[Enter]]**[[ to disconnect from the VM and close the SSH session.]]
**What is exit?**\ \ `exit` is a Linux command that ends the current session and closes the terminal connection.
Resource Cleanup
33
Click the **More actions** icon for your instance, then select **Delete**
34
Confirm by clicking **Delete** again in the dialog. **Note:** Keep VMs running only for as long as you need them. Deleting the instance once you're done ensures you don't waste your free trial credits on unused resources.
**Note:** For this demo, we leave the advanced options such as Graceful shutdown, Automatic restart, and On host maintenance at their default values, no changes are needed for a basic VM. You only need to adjust these when you have specific availability or shutdown-handling requirements.
Congratulations on completing this lab and creating your first VM!
Creating Your First VM using Compute Engine [DEMO] 2000201001
This guide walks you step-by-step through launching a Google Compute Engine VM
Hafeez Baig
34 steps
8 minutes
Google Cloud
Project Setup
Refer to this guide to learn how to create a Google Cloud Platform Account.\ <https://scribehow.com/shared/Creating_GCP__Google_Cloud_Platform__kcxx4ZDuTuOqMhoAaqBzHQ>
1
Go to Google Cloud Console
2
Type and Select "**Compute Engine**" in the search bar
**What is Compute Engine?** Compute Engine is GCP's IaaS offering that lets you create and run virtual machines (VMs) on Google's infrastructure. You get full control over the OS, CPU, memory, and disk, with flexible options like custom machine types and Spot VMs. It's ideal for hosting apps, batch jobs, and lift-and-shift migrations.
3
Navigate and Click on "**VM instances**" from the left bar
4
Click "**Enable**" to activate Compute Engine API
VM Instance Configuration
5
**Overview** wizard will open, click on the **Create Instance** button on the top left to create a new instance
**What is an Instance?**\ \ An instance is a virtual machine (VM) running on Google Cloud Platform's Compute Engine, providing the necessary resources and environment to run applications and workloads.
6
**Create an instance** wizard will open, give the Name as - **my-first-vm**
7
In the **Regions** and **Zone** dropdown, you can select the region closest to you **Note:** For this demo, we will be selecting the region **us-central1 (Iowa)** and **Any** for Zone
8
Scroll to the **Machine configuration** section, click on the **General purpose** option
**What are General purpose Machines?**\ \ General purpose machines in Google Cloud Platform are VM instances optimized for a balanced mix of compute, memory, and network resources, suitable for a wide variety of workloads such as web servers, applications, and development environments.
9
Click on the **Compute optimized** option to view compute optimized machines for VM
**What are Compute optimized Machines?** \ \ Compute optimized machines in Google Cloud Platform are VM instances designed for high-performance computing tasks that require significant computational power, such as scientific simulations, machine learning, and data analysis.
10
Click on the **Memory optimized** option to view Memory optimized machines for VM
**What are Memory optimized Machines?**\ \ Memory optimized machines in Google Cloud Platform are VM instances optimized for workloads that require a large amount of memory relative to CPU, such as in-memory databases, real-time analytics, and high-performance computing applications that manipulate large data sets in memory.
11
Click on the **Network optimized** option to view Network optimized machines for VM
**What are Network-Optimized Machines?** Network-optimized machines are Compute Engine VM types designed for very high network bandwidth and low latency. They support significantly higher throughput than standard VMs, making them ideal for HPC, large-scale data transfers, and network-intensive distributed workloads.
12
Click on the **Storage optimized** option to view Storage optimized machines for VM
**What are Storage optimized Machines?**\ \ Storage optimized machines in Google Cloud Platform are VM instances designed for workloads that require high disk throughput and storage capacity, such as databases, data warehousing, and big data processing tasks that rely heavily on local disk performance.
13
Click on the **GPUs** option to view the GPU machines for VM
**What are GPUs ?**\ \ GPUs, or Graphics Processing Units, are specialized hardware accelerators used to enhance the performance of compute-intensive tasks, particularly those involving parallel processing. In the context of Google Cloud Platform (GCP), GPUs are available as virtual machine instances within Compute Engine and are used for tasks such as machine learning, scientific simulations, video transcoding, and more. They excel at handling large volumes of data and performing complex calculations efficiently.
14
Click on the **TPUs** option to view the TPU machines for VM
**What are TPUs?** TPUs (Tensor Processing Units) are Google's custom-built hardware accelerators designed specifically to speed up machine learning workloads, especially training and inference of deep learning models. They are optimized for large-scale matrix/tensor operations, making them faster and more cost-efficient than CPUs/GPUs for many AI tasks like neural network training.
15
For this demo, we will choose the **General Purpose** option. Then, select the Series **E2**.
**What is E2 in General Purpose Machine?**\ \ E2 instances in Google Cloud Platform's Compute Engine are part of the general-purpose machine family optimized for cost-effective performance. They offer a balanced mix of CPU and memory resources suitable for a wide range of applications, from web servers to enterprise applications, providing flexibility and cost efficiency.
16
Click here
17
Scroll to the **Machine type** section and click on the **Machine type** dropdown. Select e2-medium (2 vCPU, 1 core, 4 GB memory) **Note:** You can stay on the **Preset** tab and pick from the shared-core, Standard, High memory, or High CPU options depending on your CPU and memory needs. For this demo, we use the recommended default, **e2-medium**.
**What is Machine type?**\ \ The machine type sets the exact amount of vCPU and memory allocated to your VM. Within the E2 series, e2-medium provides 1–2 vCPUs (1 shared core) and 4 GB of memory, a balanced, low-cost option suited to everyday workloads and testing.
18
Navigate to the **OS and storage** section by selecting it from the left-hand sidebar.
**What is OS and storage?**\ \ OS and storage refers to the operating system a machine runs and the disk configuration used to store it.
19
Here you can review the **Operating system**, **Type**, **Size**, and **Image** for your VM's boot disk.
20
To change the configuration, click on the **Change** button
21
Here you can set the **Operating system**, **Version**, **Boot disk type**, and **Size** for your VM.
**What is a Boot disk?**\ \ A boot disk is a storage disk that contains the operating system and the files required to start a machine.
22
Once done, click the **Select** button
23
Scroll the page and click on the **Create** button **Note:** Creating a VM instance takes some time, and it will become visible on the VM instance dashboard once it is ready.
Connectivity and Verification
24
The VM instance named **my-first-vm** has been created, and you should see it listed on the screen.
25
On the right side, click on the three dots and here you can view more options for the vm instance
26
In the **Connect** column, click the **SSH** button to initiate the connection
27
Click "**Authorize**" to permit SSH access
28
You are now logged in and can run commands directly against the machine.
**What is SSH-in-browser?**\ \ SSH-in-browser is a built-in terminal that lets you connect to a virtual machine and run commands from within the web browser, without installing a separate SSH client.
29
In the terminal, type "whoami" and press **Enter**. This prints the username of the currently logged-in user.
**What is whoami?**\ \ whoami is a Linux command that displays the username of the user currently logged into the system.
30
Type `pwd` and press **Enter**. This prints the full path of the directory you are currently in.
**What is pwd?**\ \ `pwd` (print working directory) is a Linux command that displays the path of the current working directory.
31
Type `ls` and press **Enter** to list the files in the current directory.
**What is ls?**\ \ `ls` (list) is a Linux command that lists the files and directories within the current directory.
32
[[Type ]]`exit`[[ and press ]]**[[Enter]]**[[ to disconnect from the VM and close the SSH session.]]
**What is exit?**\ \ `exit` is a Linux command that ends the current session and closes the terminal connection.
Resource Cleanup
33
Click the **More actions** icon for your instance, then select **Delete**
34
Confirm by clicking **Delete** again in the dialog. **Note:** Keep VMs running only for as long as you need them. Deleting the instance once you're done ensures you don't waste your free trial credits on unused resources.
**Note:** For this demo, we leave the advanced options such as Graceful shutdown, Automatic restart, and On host maintenance at their default values, no changes are needed for a basic VM. You only need to adjust these when you have specific availability or shutdown-handling requirements.
Congratulations on completing this lab and creating your first VM!