---
title: "POST /v1/{+name}:mountDatastore"
method: POST
path: "/v1/{+name}:mountDatastore"
tags: ["projects"]
---

# POST /v1/{+name}:mountDatastore

`POST /v1/{+name}:mountDatastore`

Mounts a `Datastore` on a cluster resource

## Path parameters

- `name` string, required

## Request body

- MountDatastoreRequest — Mount Datastore Request message
  - `ignoreColocation` boolean — Optional. If set to true, the colocation requirement will be ignored. If set to false, the colocation requirement will be enforced. If not set, the colocation requirement will be enforced. Colocation requirement is the requirement that the cluster must be in the same region/zone of datastore(regional/zonal datastore).
  - `datastoreMountConfig` DatastoreMountConfig — The Datastore Mount configuration
    - `fileShare` string — Output only. File share name.
    - `servers` string[] — Output only. Server IP addresses of the NFS volume. For NFS 3, you can only provide a single server IP address or DNS names.
    - `accessMode` 'ACCESS_MODE_UNSPECIFIED' | 'READ_ONLY' | 'READ_WRITE' — Optional. The access mode of the NFS volume. Optional. Default value used will be READ_WRITE
    - `datastore` string — Required. The resource name of the datastore to mount. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/datastores/my-datastore`
    - `nfsVersion` 'NFS_VERSION_UNSPECIFIED' | 'NFS_V3' — Optional. The NFS protocol supported by the NFS volume. Default value used will be NFS_V3
    - `datastoreNetwork` DatastoreNetwork — The network configuration for the datastore.
      - `mtu` integer — Optional. MTU value is set on the VMKernel adapter for the NFS traffic. By default standard 1500 MTU size is set in MountDatastore API which is good for typical setups. However google VPC networks supports jumbo MTU 8896. We recommend to tune this value based on the NFS traffic performance. Performance can be determined using benchmarking I/O tools like fio (Flexible I/O Tester) utility.
      - `networkPeering` string — Output only. The resource name of the network peering, used to access the file share by clients on private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. e.g. projects/my-project/locations/us-central1/networkPeerings/my-network-peering
      - `connectionCount` integer — Optional. connection_count is used to set multiple connections from NFS client on ESXi host to NFS server. A higher number of connections results in better performance on datastores. In MountDatastore API by default max 4 connections are configured. User can set value of connection_count between 1 to 4. Connection_count is supported from vsphere 8.0u1 for earlier version 1 connection count is set on the ESXi hosts.
      - `subnet` string — Required. The resource name of the subnet Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. e.g. projects/my-project/locations/us-central1/subnets/my-subnet
  - `validateOnly` boolean — Optional. If set to `true`, only validates the request but doesn’t execute the request. If set to `false`, validates and executes the request.
  - `requestId` string — Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/vmwareengine.md) · [All operations](https://skmtc.dev/google/apis/vmwareengine/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/vmwareengine/revisions/23816cc0f25a/schema)
