# Vertex AI Notebooks v1 API - Class VirtualMachineConfig (2.6.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.5.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.4.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.3.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.2.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.1.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/2.0.0/Google.Cloud.Notebooks.V1.VirtualMachineConfig)
- [1.0.0-beta04](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/1.0.0-beta04/Google.Cloud.Notebooks.V1.VirtualMachineConfig)

    public sealed class VirtualMachineConfig : IMessage<VirtualMachineConfig>, IEquatable<VirtualMachineConfig>, IDeepCloneable<VirtualMachineConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Vertex AI Notebooks v1 API class VirtualMachineConfig.

The config settings for virtual machine.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> VirtualMachineConfig

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[VirtualMachineConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[VirtualMachineConfig](https://docs.cloud.google.com/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](https://docs.cloud.google.com/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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Notebooks.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1)

## Assembly

Google.Cloud.Notebooks.V1.dll

## Constructors

### VirtualMachineConfig()

    public VirtualMachineConfig()

### VirtualMachineConfig(VirtualMachineConfig)

    public VirtualMachineConfig(VirtualMachineConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig` |

## Properties

### AcceleratorConfig

    public RuntimeAcceleratorConfig AcceleratorConfig { get; set; }

Optional. The Compute Engine accelerator configuration for this runtime.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.RuntimeAcceleratorConfig` |   |

### BootImage

    public VirtualMachineConfig.Types.BootImage BootImage { get; set; }

Optional. Boot image metadata used for runtime upgradeability.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig.Types.BootImage` |   |

### ContainerImages

    public RepeatedField<ContainerImage> ContainerImages { get; }

Optional. Use a list of container images to use as Kernels in the notebook instance.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.ContainerImage` |   |

### DataDisk

    public LocalDisk DataDisk { get; set; }

Required. Data disk option configuration settings.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.LocalDisk` |   |

### EncryptionConfig

    public EncryptionConfig EncryptionConfig { get; set; }

Optional. Encryption settings for virtual machine data disk.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.EncryptionConfig` |   |

### GuestAttributes

    public MapField<string, string> GuestAttributes { get; }

Output only. The Compute Engine guest attributes. (see
[Project and instance
guest
attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### InternalIpOnly

    public bool InternalIpOnly { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. The labels to associate with this runtime.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a cluster.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### MachineType

    public string MachineType { get; set; }

Required. The Compute Engine machine type used for runtimes.
Short name is valid. Examples:

- `n1-standard-2`
- `e2-standard-8`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Metadata

    public MapField<string, string> Metadata { get; }

Optional. The Compute Engine metadata entries to add to virtual machine. (see
[Project and instance
metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Network

    public string Network { get; set; }

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.

A full URL or partial URI. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
- `projects/[project_id]/global/networks/default`

Runtimes are managed resources inside Google Infrastructure.
Runtimes support the following network configurations:

- Google Managed Network (Network \& subnet are empty)
- Consumer Project VPC (network \& subnet are required). Requires configuring Private Service Access.
- Shared VPC (network \& subnet are required). Requires configuring Private Service Access.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### NicType

    public VirtualMachineConfig.Types.NicType NicType { get; set; }

Optional. The type of vNIC to be used on this interface. This may be gVNIC or
VirtioNet.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.VirtualMachineConfig.Types.NicType` |   |

### ReservedIpRange

    public string ReservedIpRange { get; set; }

Optional. Reserved IP Range name is used for VPC Peering.
The subnetwork allocation will use the range *name* if it's assigned.

Example: managed-notebooks-range-c

    PEERING_RANGE_NAME_3=managed-notebooks-range-c
    gcloud compute addresses create $PEERING_RANGE_NAME_3 \
      --global \
      --prefix-length=24 \
      --description="Google Cloud Managed Notebooks Range 24 c" \
      --network=$NETWORK \
      --addresses=192.168.0.0 \
      --purpose=VPC_PEERING

Field value will be: `managed-notebooks-range-c`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ShieldedInstanceConfig

    public RuntimeShieldedInstanceConfig ShieldedInstanceConfig { get; set; }

Optional. Shielded VM Instance configuration settings.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1/latest/Google.Cloud.Notebooks.V1.RuntimeShieldedInstanceConfig` |   |

### Subnet

    public string Subnet { get; set; }

Optional. The Compute Engine subnetwork to be used for machine
communications. Cannot be specified with network.

A full URL or partial URI are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
- `projects/[project_id]/regions/us-east1/subnetworks/sub0`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Tags

    public RepeatedField<string> Tags { get; }

Optional. The Compute Engine tags to add to runtime (see [Tagging
instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Zone

    public string Zone { get; set; }

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:

- `us-central1-b`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |