Compute Engine
Run virtual machines in Google's data centres
To check for the defaults
To set defaults
To create your VM through command-line, run the following command:
Command details
gcloud compute
allows you to manage your Compute Engine resources in a format that's simpler than the Compute Engine API.instances create
creates a new instance.gcelab2
is the name of the VM.The
--machine-type
flag specifies the machine type as n1-standard-2.The
--zone
flag specifies where the VM is created.If you omit the
--zone
flag, thegcloud
tool can infer your desired zone based on your default properties. Other required instance settings, such asmachine type
andimage
, are set to default values if not specified in thecreate
command.
To SSH through command line
Make sure to add your zone, or omit the --zone
flag if you've set the option globally.
To list your instances
Last updated