- JSON representation
- OnInstanceStopAction
- OnHostMaintenance
- NodeAffinity
- Operator
- ProvisioningModel
- InstanceTerminationAction
- GracefulShutdown
Sets the scheduling options for an Instance.
JSON representation |
---|
{ "onHostMaintenance": enum ( |
Fields | |
---|---|
onHostMaintenance |
Defines the maintenance behavior for this instance. For standard instances, the default behavior is
. For preemptible instances, the default and only possible behavior is
. For more information, see Set VM host maintenance policy. |
automaticRestart |
Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to
so an instance is automatically restarted if it is terminated by Compute Engine. |
preemptible |
Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a |
nodeAffinities[] |
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity. |
minNodeCpus |
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. |
locationHint |
An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API. |
maintenanceFreezeDurationHours |
Specifies the number of hours after VM instance creation where the VM won't be scheduled for maintenance. |
maintenanceInterval |
Specifies the frequency of planned maintenance events. The accepted values are: |
availabilityDomain |
Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance. |
provisioningModel |
Specifies the provisioning model of the instance. |
instanceTerminationAction |
Specifies the termination action for the instance. |
hostErrorTimeoutSeconds |
Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used. |
gracefulShutdown |
|
localSsdRecoveryTimeout |
Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour. |
skipGuestOsShutdown |
Default is false and there will be 120 seconds between GCE ACPI G2 Soft Off and ACPI G3 Mechanical Off for Standard VMs and 30 seconds for Spot VMs. |
Union field
|
|
maxRunDuration |
Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration. |
terminationTime |
Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time. |
Union field on_instance_termination_action . Defines the behaviour for instances with the instance_termination_actions. At the end of the run duration or termination time, the instance will be terminated according to the properties defined in the action. There can be only one termination action specified for an instance. on_instance_termination_action can be only one of the following: |
|
onInstanceStopAction |
|
OnInstanceStopAction
Defines the behaviour for instances with the instanceTerminationAction
STOP
.
JSON representation |
---|
{ "discardLocalSsd": boolean } |
Fields | |
---|---|
discardLocalSsd |
If true, the contents of any attached Local SSD disks will be discarded else, the Local SSD data will be preserved when the instance is stopped at the end of the run duration/termination time. |
OnHostMaintenance
Defines the maintenance behavior for this instance, either
TERMINATE
or
MIGRATE
. For standard instances, the default behavior is
MIGRATE
. For preemptible instances, the default, and only possible behavior, is
TERMINATE
. For more information, see Set VM host maintenance policy.
Enums | |
---|---|
TERMINATE |
Tells Compute Engine to terminate and (optionally) restart the instance away from the maintenance activity. If you would like your instance to be restarted, set the
flag to true. Your instance may be restarted more than once, and it may be restarted outside the window of maintenance events. |
MIGRATE |
[Default] Allows Compute Engine to automatically migrate instances out of the way of maintenance events. |
NodeAffinity
Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
JSON representation |
---|
{
"key": string,
"operator": enum ( |
Fields | |
---|---|
key |
Corresponds to the label key of Node resource. |
operator |
Defines the operation of node selection. Valid operators are
for affinity and
for anti-affinity. |
values[] |
Corresponds to the label values of Node resource. |
Operator
Defines the type of node selections.
Enums | |
---|---|
OPERATOR_UNSPECIFIED |
|
IN |
Requires Compute Engine to seek for matched nodes. |
NOT_IN |
Requires Compute Engine to avoid certain nodes. |
ProvisioningModel
Defines the provisioning model for an instance.
Enums | |
---|---|
STANDARD |
Standard provisioning with user controlled runtime, no discounts. |
SPOT |
Heavily discounted, no guaranteed runtime. |
RESERVATION_BOUND |
Bound to the lifecycle of the reservation in which it is provisioned. |
FLEX_START |
Instance is provisioned using the Flex Start provisioning model and has a limited runtime. |
InstanceTerminationAction
Defines the supported termination actions for an instance.
Enums | |
---|---|
INSTANCE_TERMINATION_ACTION_UNSPECIFIED |
Default value. This value is unused. |
DELETE |
Delete the VM. |
STOP |
Stop the VM without storing in-memory content. default action. |
GracefulShutdown
The configuration for gracefully shutting down the instance.
JSON representation |
---|
{
"enabled": boolean,
"maxDuration": {
object ( |
Fields | |
---|---|
enabled |
Opts-in for graceful shutdown. |
maxDuration |
The time allotted for the instance to gracefully shut down. If the graceful shutdown isn't complete after this time, then the instance transitions to the STOPPING state. |