gcloud alpha compute instances set-scheduling
INSTANCE_NAME
[--clear-min-node-cpu
] [--[no-]graceful-shutdown
] [--graceful-shutdown-max-duration
=GRACEFUL_SHUTDOWN_MAX_DURATION
] [--host-error-timeout-seconds
=HOST_ERROR_TIMEOUT_SECONDS
] [--local-ssd-recovery-timeout
=LOCAL_SSD_RECOVERY_TIMEOUT
] [--min-node-cpu
=MIN_NODE_CPU
] [--[no-]preemptible
] [--provisioning-model
=PROVISIONING_MODEL
] [--[no-]restart-on-failure
] [--[no-]skip-guest-os-shutdown
] [--zone
=ZONE
] [--clear-discard-local-ssds-at-termination-timestamp
| --discard-local-ssds-at-termination-timestamp
=DISCARD_LOCAL_SSDS_AT_TERMINATION_TIMESTAMP
] [--clear-instance-termination-action
| --instance-termination-action
=INSTANCE_TERMINATION_ACTION
] [--clear-max-run-duration
| --max-run-duration
=MAX_RUN_DURATION
] [--clear-node-affinities
| --node
=NODE
| --node-affinity-file
=PATH_TO_FILE
| --node-group
=NODE_GROUP
] [--clear-termination-time
| --termination-time
=TERMINATION_TIME
] [--maintenance-policy
=MAINTENANCE_POLICY
| --on-host-maintenance
=MAINTENANCE_POLICY
] [GCLOUD_WIDE_FLAG …
]
(ALPHA)
$gcloud alpha compute instances set-scheduling
is used to update scheduling options for VM instances. You can only call this method on a VM instance that is stopped (a VM instance in a TERMINATED
state).
gcloud alpha compute instances set-scheduling example-instance --maintenance-policy=TERMINATE --zone=us-central1-b
INSTANCE_NAME
--clear-min-node-cpu
--[no-]graceful-shutdown
--graceful-shutdown
to enable and --no-graceful-shutdown
to disable.
--graceful-shutdown-max-duration
=GRACEFUL_SHUTDOWN_MAX_DURATION
--host-error-timeout-seconds
=HOST_ERROR_TIMEOUT_SECONDS
--local-ssd-recovery-timeout
=LOCAL_SSD_RECOVERY_TIMEOUT
--min-node-cpu
=MIN_NODE_CPU
--[no-]preemptible
--preemptible
to enable and --no-preemptible
to disable.
--provisioning-model
=PROVISIONING_MODEL
PROVISIONING_MODEL
must be one of:
RESERVATION_BOUND
SPOT
STANDARD
--[no-]restart-on-failure
--restart-on-failure
to enable and --no-restart-on-failure
to disable.
--[no-]skip-guest-os-shutdown
--skip-guest-os-shutdown
to enable and --no-skip-guest-os-shutdown
to disable.
--zone
=ZONE
gcloud
attempts to identify the appropriate zone by searching for resources in your currently active project. If the zone cannot be determined, gcloud
prompts you for a selection with all available Google Cloud Platform zones.
To avoid prompting when this flag is omitted, the user can set the
property:compute/zone
gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
gcloud compute zones list
To unset the property, run:
gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE
At most one of these can be specified:
--clear-discard-local-ssds-at-termination-timestamp
--discard-local-ssds-at-termination-timestamp
=DISCARD_LOCAL_SSDS_AT_TERMINATION_TIMESTAMP
true
and only allowed for VMs that have one or more local SSDs, use --instance-termination-action=STOP, and use either --max-run-duration or --termination-time.
This flag indicates the value that you want Compute Engine to use for the --discard-local-ssd
flag in the automatic gcloud compute instances stop
command. This flag only supports the true
value, which discards local SSD data when automatically stopping this VM during its terminationTimestamp
.
For more information about the --discard-local-ssd
flag, see https://cloud.google.com/compute/docs/disks/local-ssd#stop_instance.
At most one of these can be specified:
--clear-instance-termination-action
--instance-termination-action
=INSTANCE_TERMINATION_ACTION
INSTANCE_TERMINATION_ACTION
must be one of:
DELETE
STOP
At most one of these can be specified:
--clear-max-run-duration
--max-run-duration
=MAX_RUN_DURATION
30m
for a duration of 30 minutes or specify 1d2h3m4s
for a duration of 1 day, 2 hours, 3 minutes, and 4 seconds. Alternatively, to specify a timestamp, use --termination-time instead.
If neither --max-run-duration nor --termination-time is specified (default), the VM instance runs until prompted by a user action or system event. If either is specified, the VM instance is scheduled to be automatically terminated at the VM's termination timestamp (terminationTimestamp
) using the action specified by --instance-termination-action.
Note: The terminationTimestamp
is removed whenever the VM is stopped or suspended and redefined whenever the VM is rerun. For --max-run-duration specifically, the terminationTimestamp
is the sum of MAX_RUN_DURATION and the time when the VM last entered the RUNNING
state, which changes whenever the VM is rerun.
At most one of these can be specified:
--clear-node-affinities
--node
=NODE
--node-affinity-file
=PATH_TO_FILE
The file should contain a list of a JSON/YAML objects. For an example, see https://cloud.google.com/compute/docs/nodes/provisioning-sole-tenant-vms#configure_node_affinity_labels. The following list describes the fields:
key
operator
IN
: Requires Compute Engine to seek for matched nodes. NOT_IN
: Requires Compute Engine to avoid certain nodes.
values
Use a full or relative path to a local file containing the value of node_affinity_file.
--node-group
=NODE_GROUP
At most one of these can be specified:
--clear-termination-time
--termination-time
=TERMINATION_TIME
If neither --termination-time nor --max-run-duration is specified (default), the VM instance runs until prompted by a user action or system event. If either is specified, the VM instance is scheduled to be automatically terminated at the VM's termination timestamp (terminationTimestamp
) using the action specified by --instance-termination-action.
Note: The terminationTimestamp
is removed whenever the VM is stopped or suspended and redefined whenever the VM is rerun. For --termination-time specifically, the terminationTimestamp
remains the same whenever the VM is rerun, but any requests to rerun the VM fail if the specified timestamp is in the past.
At most one of these can be specified:
--maintenance-policy
=MAINTENANCE_POLICY
The --maintenance-policy flag is now deprecated. Please use --on-host-maintenance
instead. MAINTENANCE_POLICY
must be one of:
MIGRATE
TERMINATE
--on-host-maintenance
=MAINTENANCE_POLICY
MAINTENANCE_POLICY
must be one of:
MIGRATE
TERMINATE
--access-token-file
, --account
, --billing-project
, --configuration
, --flags-file
, --flatten
, --format
, --help
, --impersonate-service-account
, --log-http
, --project
, --quiet
, --trace-token
, --user-output-enabled
, --verbosity
.
Run $ gcloud help
for details.
gcloud compute instances set-scheduling
gcloud beta compute instances set-scheduling
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4