public sealed class VirtualMachineConfig : IMessage<VirtualMachineConfig>, IEquatable<VirtualMachineConfig>, IDeepCloneable<VirtualMachineConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the AI Platform Notebooks v1 API class VirtualMachineConfig.
Optional. If true, runtime will only have internal IP
addresses. By default, runtimes are not restricted to internal IP
addresses, and will have ephemeral external IP addresses assigned to each
vm. This internal_ip_only restriction can only be enabled for
subnetwork enabled networks, and all dependencies must be
configured to be accessible without external IP addresses.
Optional. The labels to associate with this runtime.
Label keys must contain 1 to 63 characters, and must conform to
RFC 1035.
Label values may be empty, but, if present, must contain 1 to 63
characters, and must conform to RFC
1035. No more than 32 labels can be
associated with a cluster.
Optional. The Compute Engine network to be used for machine
communications. Cannot be specified with subnetwork. If neither
network nor subnet is specified, the "default" network of
the project is used, if it exists.
Output only. The zone where the virtual machine is located.
If using regional request, the notebooks service will pick a location
in the corresponding runtime region.
On a get request, zone will always be present. Example:
[[["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-09 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eVirtualMachineConfig\u003c/code\u003e class in the AI Platform Notebooks v1 API provides configuration settings for virtual machines, including details like machine type, network settings, and disk options.\u003c/p\u003e\n"],["\u003cp\u003eThis class supports various optional configurations like accelerator settings, boot image metadata, container images, encryption settings, and shielded VM instance configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVirtualMachineConfig\u003c/code\u003e class allows specification of Compute Engine resources such as machine type, network, subnetwork, metadata, and tags for enhanced customization.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class is \u003ccode\u003e2.5.0\u003c/code\u003e, and it implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e for robust functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVirtualMachineConfig\u003c/code\u003e class has required properties like DataDisk, MachineType and properties that can be set for finer control over the virtual machine like Network, Subnet and InternalIpOnly.\u003c/p\u003e\n"]]],[],null,["# AI Platform Notebooks v1 API - Class VirtualMachineConfig (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.4.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.3.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.2.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.1.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.0.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)\n- [1.0.0-beta04](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/1.0.0-beta04/Google.Cloud.Notebooks.V1.VirtualMachineConfig) \n\n public sealed class VirtualMachineConfig : IMessage\u003cVirtualMachineConfig\u003e, IEquatable\u003cVirtualMachineConfig\u003e, IDeepCloneable\u003cVirtualMachineConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the AI Platform Notebooks v1 API class VirtualMachineConfig.\n\nThe config settings for virtual machine. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e VirtualMachineConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[VirtualMachineConfig](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[VirtualMachineConfig](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[VirtualMachineConfig](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig), [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.Notebooks.V1](/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Notebooks.V1.dll\n\nConstructors\n------------\n\n### VirtualMachineConfig()\n\n public VirtualMachineConfig()\n\n### VirtualMachineConfig(VirtualMachineConfig)\n\n public VirtualMachineConfig(VirtualMachineConfig other)\n\nProperties\n----------\n\n### AcceleratorConfig\n\n public RuntimeAcceleratorConfig AcceleratorConfig { get; set; }\n\nOptional. The Compute Engine accelerator configuration for this runtime.\n\n### BootImage\n\n public VirtualMachineConfig.Types.BootImage BootImage { get; set; }\n\nOptional. Boot image metadata used for runtime upgradeability.\n\n### ContainerImages\n\n public RepeatedField\u003cContainerImage\u003e ContainerImages { get; }\n\nOptional. Use a list of container images to use as Kernels in the notebook instance.\n\n### DataDisk\n\n public LocalDisk DataDisk { get; set; }\n\nRequired. Data disk option configuration settings.\n\n### EncryptionConfig\n\n public EncryptionConfig EncryptionConfig { get; set; }\n\nOptional. Encryption settings for virtual machine data disk.\n\n### GuestAttributes\n\n public MapField\u003cstring, string\u003e GuestAttributes { get; }\n\nOutput only. The Compute Engine guest attributes. (see\n[Project and instance\nguest\nattributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).\n\n### InternalIpOnly\n\n public bool InternalIpOnly { get; set; }\n\nOptional. If true, runtime will only have internal IP\naddresses. By default, runtimes are not restricted to internal IP\naddresses, and will have ephemeral external IP addresses assigned to each\nvm. This `internal_ip_only` restriction can only be enabled for\nsubnetwork enabled networks, and all dependencies must be\nconfigured to be accessible without external IP addresses.\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nOptional. The labels to associate with this runtime.\nLabel **keys** must contain 1 to 63 characters, and must conform to\n[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).\nLabel **values** may be empty, but, if present, must contain 1 to 63\ncharacters, and must conform to [RFC\n1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be\nassociated with a cluster.\n\n### MachineType\n\n public string MachineType { get; set; }\n\nRequired. The Compute Engine machine type used for runtimes.\nShort name is valid. Examples:\n\n- `n1-standard-2`\n- `e2-standard-8`\n\n### Metadata\n\n public MapField\u003cstring, string\u003e Metadata { get; }\n\nOptional. The Compute Engine metadata entries to add to virtual machine. (see\n[Project and instance\nmetadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).\n\n### Network\n\n public string Network { get; set; }\n\nOptional. The Compute Engine network to be used for machine\ncommunications. Cannot be specified with subnetwork. If neither\n`network` nor `subnet` is specified, the \"default\" network of\nthe project is used, if it exists.\n\nA full URL or partial URI. Examples:\n\n- `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`\n- `projects/[project_id]/global/networks/default`\n\nRuntimes are managed resources inside Google Infrastructure.\nRuntimes support the following network configurations:\n\n- Google Managed Network (Network \\& subnet are empty)\n- Consumer Project VPC (network \\& subnet are required). Requires configuring Private Service Access.\n- Shared VPC (network \\& subnet are required). Requires configuring Private Service Access.\n\n### NicType\n\n public VirtualMachineConfig.Types.NicType NicType { get; set; }\n\nOptional. The type of vNIC to be used on this interface. This may be gVNIC or\nVirtioNet.\n\n### ReservedIpRange\n\n public string ReservedIpRange { get; set; }\n\nOptional. Reserved IP Range name is used for VPC Peering.\nThe subnetwork allocation will use the range *name* if it's assigned.\n\nExample: managed-notebooks-range-c \n\n PEERING_RANGE_NAME_3=managed-notebooks-range-c\n gcloud compute addresses create $PEERING_RANGE_NAME_3 \\\n --global \\\n --prefix-length=24 \\\n --description=\"Google Cloud Managed Notebooks Range 24 c\" \\\n --network=$NETWORK \\\n --addresses=192.168.0.0 \\\n --purpose=VPC_PEERING\n\nField value will be: `managed-notebooks-range-c`\n\n### ShieldedInstanceConfig\n\n public RuntimeShieldedInstanceConfig ShieldedInstanceConfig { get; set; }\n\nOptional. Shielded VM Instance configuration settings.\n\n### Subnet\n\n public string Subnet { get; set; }\n\nOptional. The Compute Engine subnetwork to be used for machine\ncommunications. Cannot be specified with network.\n\nA full URL or partial URI are valid. Examples:\n\n- `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`\n- `projects/[project_id]/regions/us-east1/subnetworks/sub0`\n\n### Tags\n\n public RepeatedField\u003cstring\u003e Tags { get; }\n\nOptional. The Compute Engine tags to add to runtime (see [Tagging\ninstances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).\n\n### Zone\n\n public string Zone { get; set; }\n\nOutput only. The zone where the virtual machine is located.\nIf using regional request, the notebooks service will pick a location\nin the corresponding runtime region.\nOn a get request, zone will always be present. Example:\n\n- `us-central1-b`"]]