Google Cloud Platform – Creating a VM instance

How to create virtual machines with VirtualBox

Let’s look at deploying a virtual machine instance using an machine image. Once the image is deployed, the compute engine automatically starts the instance. The following diagram describes the high-level process of how a machine image can be used to deploy a compute instance. The image archive, which consists of the master boot records and the relevant partitions, is uploaded to cloud storage. You can then create a template/image, persistent disks, and then create a compute instance to boot off these disks:

You can create an instance from an image using the Google Cloud Platform console, the gcloud command-line tool or the API by following these steps:

  1. Log in to your Google Cloud Platform console, select a project and click on VM Instances.
Remember to have the right permissions set on your account to allow you to create instances.
  1. Click on the CREATE INSTANCE button.
In production, remember to have generic friendly names for your resources and instances. These names are displayed in support and operational dashboards in GCP and masking their names will help enhance security.
  1. Enter an instance name and select a zone where the instance will be deployed. You will also see the cost of deploying the instance on the right.
  2. You can click on the machine type or customize it to create a custom machine type with your desired CPU and memory.
  3. Depending on the zone, you will be able to deploy GPUs.
  4. Select a boot disk to deploy the image from. Click on Change if you want to pick another operating system image to deploy. You also get to set a size for your persistent boot disk and can pick between disk types. We will discuss storage disks further in this chapter.
  5. You can create labels, set disk behavior upon instance deletion, add additional disks, and pick network interfaces. We will discuss network interfaces in further chapters.
  6. Click Create when done. You will see the instance created, as shown in the following screenshot:

  1. You can Start, Stop, and manage the instance as shown:
  1. To get more details about the instance, click on the instance name. We will look into monitoring and utilization in greater detail in upcoming chapters:
Did you know that you can enable interactive access to an instance’s serial console so you can connect and troubleshoot instances. You can find more information here—

Comments are closed.