Create virtual machine using Google Cloud

Everton Araújo
2 min readJan 4, 2023

--

Create vm using gcloud command-line tool

To create a virtual machine (VM) using Google Cloud, you can use the Google Cloud Console, the gcloud command-line tool, or the Compute Engine API.

Here are the basic steps to create a VM using the Google Cloud Console:

  1. Go to the Compute Engine page in the Cloud Console.
  2. Click the “Create” button.
  3. In the “Create an instance” form, specify the following details:
  • Name: A name for the VM.
  • Zone: The zone where you want to create the VM.
  • Machine type: The type of VM you want to create. You can choose from a variety of predefined machine types or create a custom machine type.
  • Boot disk: The type of boot disk you want to use for the VM. You can choose from a variety of predefined images or create a custom image.
  • Firewall: Whether you want to allow incoming traffic to the VM.
  1. Click the “Create” button to create the VM.

To create a VM using the gcloud command-line tool, you can use the gcloud compute instances create command. For example:

gcloud compute instances create example-vm \
- zone=us-central1-a \
- machine-type=n1-standard-1 \
- image-family=ubuntu-1604-lts \
- image-project=ubuntu-os-cloud \
- boot-disk-size=10GB \
- boot-disk-type=pd-standard

This will create a new VM named “example-vm” in the us-central1-a zone, using a machine type of n1-standard-1, a boot disk based on the ubuntu-1604-lts image from the ubuntu-os-cloud project, with a size of 10GB and type of pd-standard.

--

--

Everton Araújo
Everton Araújo

No responses yet