Glcoud command to create VM:

Use below mentioned gcloud command to create VM and which can be used to automate VM creation through script.

gcloud compute instances create sdktest –project=playground –zone=us-east4-a –machine-type=e2-medium –network-interface=network-tier=PREMIUM,subnet=default –maintenance-policy=MIGRATE –provisioning-model=STANDARD –service-account=11236264529@developer.gserviceaccount.com –scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append –enable-display-device –tags=http-server,https-server –create-disk=auto-delete=yes,boot=yes,device-name=sdktest,image=projects/debian-cloud/global/images/debian-11-bullseye-v20220719,mode=rw,size=10,type=projects/playground/zones/us-central1-a/diskTypes/pd-balanced –no-shielded-secure-boot –shielded-vtpm –shielded-integrity-monitoring –reservation-affinity=any

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s