Error with --enable-display-device in COS Google Compute Engine VM

104 views Asked by At

I'm using Cloud Build to start a Google Cloud Compute Engine VM.

Here's the command I got from Compute Engine by selecting options in the UI and getting the "Equivalent command line", notice the --enable-display-device:

gcloud compute instances create-with-container my-vm 
--project=XXX
--zone=us-central1-a 
--machine-type=g1-small 
--network-interface=network-tier=PREMIUM,subnet=default 
--maintenance-policy=MIGRATE 
--provisioning-model=STANDARD 
--service-account=XXX 
--scopes=https://www.googleapis.com/auth/cloud-platform 
--enable-display-device 
--image=projects/cos-cloud/global/images/cos-stable-97-16919-29-16 
--boot-disk-size=10GB 
--boot-disk-type=pd-balanced 
--boot-disk-device-name=checkmate-dev 
--container-image=XXX 
--container-restart-policy=always 
--no-shielded-secure-boot 
--shielded-vtpm 
--shielded-integrity-monitoring 
--labels=container-vm=cos-stable-97-16919-29-16

This command is placed in the args field of the cloudbuild.yaml which seems to run as intended until Cloud Build spits out an error:

unrecognized arguments: --enable-display-device (did you mean '--boot-disk-device-name'?) 

I don't understand because this flag came from Compute Engine so I figure it's valid. The flag is not actually in the docs in https://cloud.google.com/sdk/gcloud/reference/compute/instances/create-with-container.

But if I use the Compute Engine UI to make a "New VM Instance" as opposed to a container VM, then the flag appears in the command line.

0

There are 0 answers