[MUSIC PLAYING]
SPEAKER: Hello.
Today, we are going to learn how to create a Google Compute
Engine virtual machine instance.
You can create a VM using the Google Cloud Console,
the Google Cloud CLI, the Google Cloud Platform API,
or client libraries in languages such as C#, Go, and Java.
First, start with visiting the VM Instances page
in the Compute Engine section.
Here, click on the Create Instance button.
Before we proceed further, decide
how you would like to create the instance.
That is, you could choose to create the new instance
from scratch, using an existing template, a machine
image, or a ready-to-go solution from Google Cloud Platform
Marketplace.
For now, we'll create an instance from scratch.
Next, specify a name for your VM.
Here are some naming convention guidelines
that you need to follow.
The name should be 1 to 63 characters in length.
It must always start with a lowercase letter.
And then it can be followed by a combination of hyphens,
lowercase letters, and numbers.
It should not end with a hyphen.
We'll use the name test-instance1.
Now we'll add a label to the instance.
Labels help you group instances related to a particular task
together.
If you would like to group this instance,
add a key and a value attached to it.
We will add the label as "usage test,"
as this is a test VM for us.
Now choose a region and zone for the VM.
Note region and zone for a VM are permanent configurations
and cannot be changed after a VM starts.
Let's create the instance in us-central1 region
and us-central1-a zone.
Beside the machine configuration for your VM,
based on your requirements you could choose
from one of these options--
general-purpose, compute-optimized,
memory-optimized, and GPU-based machines.
Let's choose the general-purpose E2 machine.
Now select the machine series, machine type, number of CPUs,
CPU platform, amount of RAM, and machine GPUs.
We'll choose any 2-medium type machine
with 2 vCPUs and 4 GB memory.
The CPU would be automatically selected,
and we will not be adding a GPU to this instance.
Next, if you wish to capture or record this VM's screen,
then check the option "Enable display device" on the machine.
We won't be enabling this because we
don't have a requirement of screen recording this VM.
If you want to deploy a container on this instance,
you could walk through the container configuration
settings for the instance.
For now, we aren't deploying a container on this instance,
so we'll skip this.
In the Boot Disk section, you need
to select the type and size of the instance.
Note the default configuration is a Debian image with 10 GB
persistent disk.
You can replace this with public images, custom images,
snapshots, or existing disks.
For this demonstration, we will use the standard Debian GNU
Linux 11 image with a 10 GB persistent disk.
If you want your applications to invoke Google Cloud Platform
APIs, then you need to select a service account in the Identity
and API Access section.
Choose a service account that has the required
level of API access.
We will use a default Compute Engine service account
with default type and level of API access to ground to the VM.
Now let's move to the Firewall section.
If you want to allow HTTP or HTTPS
traffic for your instance, then enable the "Allow HTTP traffic"
and "Allow HTTPS traffic" setting checkboxes.
For our instance, we prefer to enable both these options.
Finally, we are done with specifying all configurations
for our VM instance.
Review the monthly estimate for the VM
with the breakdown of items being used and sustained
use discounts applied.
If you are happy, then click the Create button and start the VM.
Congratulations.
The VM has been created and is ready to use.
For more information about creating VMs,
please refer to our official documentation.
[MUSIC PLAYING]