public sealed class ComputeScheduling : IMessage<ComputeScheduling>, IEquatable<ComputeScheduling>, IDeepCloneable<ComputeScheduling>, IBufferMessage, IMessage
Reference documentation and code samples for the VM Migration v1 API class ComputeScheduling.
Scheduling information for VM on maintenance/restart behaviour and
node allocation in sole tenant nodes.
public ComputeScheduling.Types.RestartType RestartType { get; set; }
Whether the Instance should be automatically restarted whenever it is
terminated by Compute Engine (not terminated by user).
This configuration is identical to automaticRestart field 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eComputeScheduling\u003c/code\u003e class within the Google Cloud VM Migration v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eComputeScheduling\u003c/code\u003e class manages scheduling information for VMs, including maintenance/restart behavior and node allocation in sole-tenant nodes.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and has properties to define minimum virtual CPUs, node affinities, host maintenance behavior, and restart type.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is 2.6.0, and versions dating back to 1.0.0 are also available.\u003c/p\u003e\n"]]],[],null,["# VM Migration v1 API - Class ComputeScheduling (2.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.0 (latest)](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/latest/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/2.5.0/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/2.4.0/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/2.3.0/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/2.2.0/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/2.1.0/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/2.0.0/Google.Cloud.VMMigration.V1.ComputeScheduling)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/1.0.0/Google.Cloud.VMMigration.V1.ComputeScheduling) \n\n public sealed class ComputeScheduling : IMessage\u003cComputeScheduling\u003e, IEquatable\u003cComputeScheduling\u003e, IDeepCloneable\u003cComputeScheduling\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the VM Migration v1 API class ComputeScheduling.\n\nScheduling information for VM on maintenance/restart behaviour and\nnode allocation in sole tenant nodes. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ComputeScheduling \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ComputeScheduling](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/latest/Google.Cloud.VMMigration.V1.ComputeScheduling), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ComputeScheduling](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/latest/Google.Cloud.VMMigration.V1.ComputeScheduling), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ComputeScheduling](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/latest/Google.Cloud.VMMigration.V1.ComputeScheduling), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.VMMigration.V1](/dotnet/docs/reference/Google.Cloud.VMMigration.V1/latest/Google.Cloud.VMMigration.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.VMMigration.V1.dll\n\nConstructors\n------------\n\n### ComputeScheduling()\n\n public ComputeScheduling()\n\n### ComputeScheduling(ComputeScheduling)\n\n public ComputeScheduling(ComputeScheduling other)\n\nProperties\n----------\n\n### MinNodeCpus\n\n public int MinNodeCpus { get; set; }\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### NodeAffinities\n\n public RepeatedField\u003cSchedulingNodeAffinity\u003e NodeAffinities { get; }\n\nA set of node affinity and anti-affinity configurations for sole tenant\nnodes.\n\n### OnHostMaintenance\n\n public ComputeScheduling.Types.OnHostMaintenance OnHostMaintenance { get; set; }\n\nHow the instance should behave when the host machine undergoes\nmaintenance that may temporarily impact instance performance.\n\n### RestartType\n\n public ComputeScheduling.Types.RestartType RestartType { get; set; }\n\nWhether the Instance should be automatically restarted whenever it is\nterminated by Compute Engine (not terminated by user).\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."]]