Reference documentation and code samples for the Google Cloud Vm Migration V1 Client class ComputeScheduling.
Scheduling information for VM on maintenance/restart behaviour and
node allocation in sole tenant nodes.
Generated from protobuf messagegoogle.cloud.vmmigration.v1.ComputeScheduling
Namespace
Google \ Cloud \ VMMigration \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ on_host_maintenance
int
How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
↳ restart_type
int
Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical toautomaticRestartfield in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.
A set of node affinity and anti-affinity configurations for sole tenant nodes.
↳ min_node_cpus
int
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.
getOnHostMaintenance
How the instance should behave when the host machine undergoes
maintenance that may temporarily impact instance performance.
Returns
Type
Description
int
setOnHostMaintenance
How the instance should behave when the host machine undergoes
maintenance that may temporarily impact instance performance.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getRestartType
Whether the Instance should be automatically restarted whenever it is
terminated by Compute Engine (not terminated by user).
This configuration is identical toautomaticRestartfield in Compute
Engine create instance under scheduling.
It was changed to an enum (instead of a boolean) to match the default
value in Compute Engine which is automatic restart.
Returns
Type
Description
int
setRestartType
Whether the Instance should be automatically restarted whenever it is
terminated by Compute Engine (not terminated by user).
This configuration is identical toautomaticRestartfield in Compute
Engine create instance under scheduling.
It was changed to an enum (instead of a boolean) to match the default
value in Compute Engine which is automatic restart.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getNodeAffinities
A set of node affinity and anti-affinity configurations for sole tenant
nodes.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Vm Migration V1 Client - Class ComputeScheduling (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-vm-migration/latest/V1.ComputeScheduling)\n- [1.0.4](/php/docs/reference/cloud-vm-migration/1.0.4/V1.ComputeScheduling)\n- [0.6.5](/php/docs/reference/cloud-vm-migration/0.6.5/V1.ComputeScheduling)\n- [0.5.2](/php/docs/reference/cloud-vm-migration/0.5.2/V1.ComputeScheduling)\n- [0.4.2](/php/docs/reference/cloud-vm-migration/0.4.2/V1.ComputeScheduling)\n- [0.3.2](/php/docs/reference/cloud-vm-migration/0.3.2/V1.ComputeScheduling)\n- [0.2.3](/php/docs/reference/cloud-vm-migration/0.2.3/V1.ComputeScheduling) \nReference documentation and code samples for the Google Cloud Vm Migration V1 Client class ComputeScheduling.\n\nScheduling information for VM on maintenance/restart behaviour and\nnode allocation in sole tenant nodes.\n\nGenerated from protobuf message `google.cloud.vmmigration.v1.ComputeScheduling`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ VMMigration \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getOnHostMaintenance\n\nHow the instance should behave when the host machine undergoes\nmaintenance that may temporarily impact instance performance.\n\n### setOnHostMaintenance\n\nHow the instance should behave when the host machine undergoes\nmaintenance that may temporarily impact instance performance.\n\n### getRestartType\n\nWhether the Instance should be automatically restarted whenever it is\nterminated by Compute Engine (not terminated by user).\n\nThis configuration is identical to `automaticRestart` field in Compute\nEngine create instance under scheduling.\nIt was changed to an enum (instead of a boolean) to match the default\nvalue in Compute Engine which is automatic restart.\n\n### setRestartType\n\nWhether the Instance should be automatically restarted whenever it is\nterminated by Compute Engine (not terminated by user).\n\nThis configuration is identical to `automaticRestart` field in Compute\nEngine create instance under scheduling.\nIt was changed to an enum (instead of a boolean) to match the default\nvalue in Compute Engine which is automatic restart.\n\n### getNodeAffinities\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n### setNodeAffinities\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n### getMinNodeCpus\n\nThe minimum number of virtual CPUs this instance will consume when\nrunning on a sole-tenant node. Ignored if no node_affinites are\nconfigured.\n\n### setMinNodeCpus\n\nThe minimum number of virtual CPUs this instance will consume when\nrunning on a sole-tenant node. Ignored if no node_affinites are\nconfigured."]]