Manage private cloud resources and activity

After you create a private cloud, you can view detailed information about it, manage its resources and activity, and access its VMware management appliances. Each private cloud contains one or more clusters, and each cluster contains nodes that correspond to ESXi hosts.

The autoscale policies applied to clusters in a private cloud monitor resource consumption and automatically add or remove nodes from the cluster. You can also manually expand or shrink a private cloud by adding or removing nodes from clusters in that private cloud. For example, you can create a private cloud based on current needs and then expand the private cloud by adding nodes as consumption grows.

To view a list of your private clouds, start by accessing its resource summary page:

  1. Access the Google Cloud VMware Engine portal.
  2. From the main navigation, go to Resources.
  3. Select the private cloud you want to manage from the list of private clouds.

gcloud and API requirements

To use the gcloud command line tool or the API to manage your VMware Engine resources, we recommend configuring the tools as described below.

gcloud

  1. Set your default project ID:

    gcloud config set project PROJECT_ID
    
  2. Set a default region and/or zone:

    gcloud config set compute/region REGION
    gcloud config set compute/zone ZONE

For more information on the gcloud vmware tool, reviewing the Cloud SDK reference docs.

API

API examples in this documentation set use the cURL command-line tool to query the API. A valid access token is required as part of the cURL request. There are many ways to get a valid access token; the following steps use the gcloud tool to generate a access token:

  1. Login to Google Cloud

    gcloud auth login
    
  2. Generate access token and export to TOKEN

    export TOKEN=`gcloud auth print-access-token`
    
  3. Verify that TOKEN is set properly

    echo $TOKEN
    
    Output:
    TOKEN
    

Now, use the authorization token in your requests to the API. For example:

curl -X GET -H "Authorization: Bearer \"$TOKEN\""  -H "Content-Type: application/json; charset=utf-8" https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations

Python

Python code samples in this documentation use the VMware Engine library to communicate with the API. To be able to use this approach, the library needs to be installed and the Application Default Credentials should be configured.

  1. Download and install the Python library

     pip install google-cloud-vmwareengine
    
  2. Configure the ADC information by executing those command in your shell

      gcloud auth application-default login
    

    or use a Service Account key file

      export GOOGLE_APPLICATION_CREDENTIALS="FILE_PATH"
    

For more information about the library, visit the reference page or view code samples on GitHub.

Verify IP address layout version

Private clouds created after November 2022 adhere to IP address layout (IP Plan) version 2.0 subnet allocations. Almost all private clouds created before November 2022 adhere to IP Plan version 1.0 subnet allocations.

To find out which version your private cloud adheres to, complete the following steps:

  1. Access the Google Cloud VMware Engine portal.
  2. On the Resources page, click Summary.

The version number is displayed with IP Plan version.

Viewing a private cloud summary

The summary provides information about your private cloud including its name, number of vSphere clusters, number of nodes, location, operational state, and more. The summary page also includes the DNS servers deployed on the private cloud.

From the private cloud summary page, you can perform the following actions:

Adding nodes to a private cloud

A private cloud consists of one or more vSphere clusters, each containing multiple nodes. When adding nodes to a private cloud, you add nodes to the existing cluster or create a new cluster. A private cloud can be expanded multiple times, provided that you stay within the overall node limits. Each time you expand a private cloud, you add to the existing cluster or create a new one.

As part of the new cluster configuration, Google configures the VMware infrastructure. The settings include storage settings for vSAN disk groups, VMware High Availability, and Distributed Resource Scheduler (DRS).

To add nodes to a private cloud, do the following:

Console

  1. On the private cloud summary page, click Add Nodes.
  2. Choose whether to add nodes to one of your existing clusters or create a new vSphere cluster. As you make changes, the summary information on the page updates.
  3. To add nodes to one of your existing clusters, select Add nodes to existing. Select the cluster you want to expand and enter the number of nodes to add.
  4. To add a new cluster, select Create new. Then, provide the following details:
    1. Enter a name for the cluster.
    2. Select an existing vSphere data center or enter a name to create a new data center.
    3. Select the number of nodes. Each new cluster must have at least three nodes.
    4. Optional: Click the Customize Cores toggle if you want to reduce the number of available cores for each node in the management cluster. For details, see Custom core counts.
  5. Click Submit.

gcloud

The update command lets you change the total node count for the cluster. This command requires the name of the cluster and private cloud.

  1. List the clusters.

    gcloud vmware private-clouds clusters list \
     --private-cloud=PC_NAME \
     --location=ZONE
  2. Update the cluster. For example, the following commands changes the number of nodes to 4.

    gcloud vmware private-clouds clusters update CLUSTER_NAME \
    --location=ZONE \
    --private-cloud=PC_NAME --node-type-config=type=standard-72,count=4

    Replace the following:

    • CLUSTER_NAME: the name for the cluster to update in this private cloud
    • ZONE: the zone for the private cloud
    • PC_NAME: the name for the private cloud
    • PROJECT_ID: the project ID for this request

API

The update API lets you change the total node count for the cluster. This command requires the name of the cluster and private cloud.

  1. List the clusters.

    curl -L -X GET -H "Authorization: Bearer TOKEN" "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PC_NAME/clusters"
    
  2. Update the clusters. For example, the following updates the cluster to standard-72 and changes the number of nodes to 4.

    curl -L -X PATCH -H "Authorization: Bearer TOKEN" \
    -H "Content-Type: application/json" \
    "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PC_NAME/clusters/CLUSTER_NAME?updateMask=node_type_configs.*.node_count" \
    -d '{
    "nodeTypeConfigs": {
      "standard-72" : {
        "nodeCount": 4
      }
    }
    }'

    Replace the following:

    • PROJECT_ID: the project ID for this request
    • ZONE: the zone for the private cloud
    • PC_NAME: the name for the private cloud
    • CLUSTER_NAME: the name for the cluster to update in this private cloud

Python

The cluster update method lets you change the total node count for the cluster. This method requires the name of the cluster and private cloud.

  1. List the clusters.
from typing import Iterable

from google.cloud import vmwareengine_v1


def list_clusters(
    project_id: str, zone: str, private_cloud_name: str
) -> Iterable[vmwareengine_v1.Cluster]:
    """
    Retrieves a list of clusters in private cloud.

    Args:
        project_id: name of the project hosting the private cloud.
        zone: zone in which the private cloud is located.
        private_cloud_name: name of the cloud of which you want to list cluster.

    Returns:
        An iterable collection of Cluster objects.
    """
    client = vmwareengine_v1.VmwareEngineClient()
    return client.list_clusters(
        parent=f"projects/{project_id}/locations/{zone}/privateClouds/{private_cloud_name}"
    )

  1. Update the clusters. The following method allows you to modify the number of standard-72 nodes in the cluster.
from google.api_core import operation
from google.cloud import vmwareengine_v1


def update_cluster_node_count(
    project_id: str,
    zone: str,
    private_cloud_name: str,
    cluster_name: str,
    node_count: int,
) -> operation.Operation:
    """
    Modify the number of nodes in a cluster in a private cloud.

    Modifying a cluster is a long-running operation and it may take over an hour.

    Args:
        project_id: name of the project you want to use.
        zone: zone in which your private cloud is located.
        private_cloud_name: name of the private cloud hosting the cluster.
        cluster_name: name of the cluster.
        node_count: desired number of nodes in the cluster.

    Returns:
        An Operation object related to cluster modification operation.
    """
    if node_count < 3:
        raise RuntimeError("Cluster needs to have at least 3 nodes")
    client = vmwareengine_v1.VmwareEngineClient()
    request = vmwareengine_v1.UpdateClusterRequest()
    request.cluster = vmwareengine_v1.Cluster()
    request.cluster.name = (
        f"projects/{project_id}/locations/{zone}/privateClouds/{private_cloud_name}"
        f"/clusters/{cluster_name}"
    )
    request.cluster.node_type_configs = {
        "standard-72": vmwareengine_v1.NodeTypeConfig()
    }
    request.cluster.node_type_configs["standard-72"].node_count = node_count
    request.update_mask = "nodeTypeConfigs.*.nodeCount"
    return client.update_cluster(request)

Add a new cluster to a private cloud

To add a new cluster to an existing private cloud, do the following:

gcloud

Add the new cluster and give it a name. For example:

gcloud vmware private-clouds clusters create CLUSTER_NAME \
   --location=ZONE --private-cloud=PC_NAME \
   --node-type-config=type=standard-72,count=4

API

Add the new cluster and give it a name. For example:

curl -L -X POST -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" \
"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PC_NAME/clusters?clusterId=CLUSTER_NAME" \
-d '{
  "nodeTypeConfigs": {
    "standard-72": {
      "nodeCount": 4
      }
  }
}'

Python

Add the new cluster and give it a name.

from google.api_core import operation
from google.cloud import vmwareengine_v1


def create_cluster(
    project_id: str,
    zone: str,
    private_cloud_name: str,
    cluster_name: str,
    node_count: int = 4,
) -> operation.Operation:
    """
    Create a new cluster in a private cloud.

    Creation of a new cluster is a long-running operation and it may take over an hour.

    Args:
        project_id: name of the project you want to use.
        zone: region in which your private cloud is located.
        private_cloud_name: name of the private cloud hosting the new cluster.
        cluster_name: name of the new cluster.
        node_count: number of nodes in the new cluster. (Must be >= 3)

    Returns:
        An Operation object related to started cluster creation operation.

    Raises:
        ValueError in case an incorrect number of nodes is provided.
    """
    if node_count < 3:
        raise ValueError("Cluster needs to have at least 3 nodes")

    request = vmwareengine_v1.CreateClusterRequest()
    request.parent = (
        f"projects/{project_id}/locations/{zone}/privateClouds/{private_cloud_name}"
    )

    request.cluster = vmwareengine_v1.Cluster()
    request.cluster.name = cluster_name

    # Currently standard-72 is the only supported node type.
    request.cluster.node_type_configs = {
        "standard-72": vmwareengine_v1.NodeTypeConfig()
    }
    request.cluster.node_type_configs["standard-72"].node_count = node_count

    client = vmwareengine_v1.VmwareEngineClient()
    return client.create_cluster(request)

Create a new cluster with custom core count configuration

To create a new cluster with custom core count configuration, do the following:

gcloud

Add the new cluster and specify the core count configuration. For example, the following creates a new cluster of standard-72 node type with 3 nodes and a custom core count of 28.

gcloud vmware private-clouds clusters create CLUSTER_NAME \
    --location=ZONE \
    --private-cloud=PC_NAME \
    --node-type-config=type=standard-72,count=4,custom-core-count=28

API

Add the new cluster and specify the core count configuration. For example, the following creates a new cluster of standard-72 node type with 4 nodes and a custom core count of 28.

curl -L -X POST -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" \
"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PROJECT_ID/clusters?clusterId=CLUSTER_NAME" \
-d '{
      "nodeTypeConfigs": {
      "standard-72": {
        "nodeCount": 4,
        "customCoreCount": 28
        }
    }
}'

Python

Add the new cluster and specify the core count configuration. For example, the following creates a new cluster of standard-72 node type with configurable amount of nodes and core count.

from google.api_core import operation
from google.cloud import vmwareengine_v1


def create_custom_cluster(
    project_id: str,
    zone: str,
    private_cloud_name: str,
    cluster_name: str,
    node_count: int = 4,
    core_count: int = 28,
) -> operation.Operation:
    """
    Create a new cluster with custom number of cores in its nodes
    in a private cloud.

    Creation of a new cluster is a long-running operation and it may take over an hour.

    Args:
        project_id: name of the project you want to use.
        zone: region in which your private cloud is located.
        private_cloud_name: name of the private cloud hosting the new cluster.
        cluster_name: name of the new cluster.
        node_count: number of nodes in the new cluster.
        core_count: number of CPU cores in the new cluster nodes.

    Returns:
        An Operation object related to started cluster creation operation.

    Raises:
        ValueError in case an incorrect number of nodes is provided.
    """
    if node_count < 3:
        raise ValueError("Cluster needs to have at least 3 nodes")

    request = vmwareengine_v1.CreateClusterRequest()
    request.parent = (
        f"projects/{project_id}/locations/{zone}/privateClouds/{private_cloud_name}"
    )

    request.cluster = vmwareengine_v1.Cluster()
    request.cluster.name = cluster_name

    # Currently standard-72 is the only supported node type.
    request.cluster.node_type_configs = {
        "standard-72": vmwareengine_v1.NodeTypeConfig()
    }
    request.cluster.node_type_configs["standard-72"].node_count = node_count
    request.cluster.node_type_configs["standard-72"].custom_core_count = core_count

    client = vmwareengine_v1.VmwareEngineClient()
    return client.create_cluster(request)

Removing nodes or delete a cluster

When removing nodes from a private cloud, you remove nodes from the existing cluster or delete the entire cluster.

To remove nodes from a private cloud, update the cluster with a few number of nodes.

Console

  1. On the private cloud summary page, click Remove nodes.
  2. Select the cluster that you want to shrink or delete.
  3. Select Remove one node.
  4. Verify the cluster capacity.
  5. Click Submit to begin the process of removing nodes.

To monitor the progress, select Activity > Tasks. This process requires resynchronization in vSAN and can take a few hours, depending on the data.

gcloud

gcloud vmware private-clouds clusters update CLUSTER_NAME \
  --location=ZONE \
  --private-cloud=PC_NAME --node-type-config=type=standard-72,count=3

API

curl -L -X PATCH -H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PC_NAME/clusters/CLUSTER_NAME?update_mask=node_type_configs.*.node_count" \
-d '{
  "nodeTypeConfigs": {
    "standard-72" : {
      "nodeCount": 3
    }
  }
}'

Python

from google.api_core import operation
from google.cloud import vmwareengine_v1


def update_cluster_node_count(
    project_id: str,
    zone: str,
    private_cloud_name: str,
    cluster_name: str,
    node_count: int,
) -> operation.Operation:
    """
    Modify the number of nodes in a cluster in a private cloud.

    Modifying a cluster is a long-running operation and it may take over an hour.

    Args:
        project_id: name of the project you want to use.
        zone: zone in which your private cloud is located.
        private_cloud_name: name of the private cloud hosting the cluster.
        cluster_name: name of the cluster.
        node_count: desired number of nodes in the cluster.

    Returns:
        An Operation object related to cluster modification operation.
    """
    if node_count < 3:
        raise RuntimeError("Cluster needs to have at least 3 nodes")
    client = vmwareengine_v1.VmwareEngineClient()
    request = vmwareengine_v1.UpdateClusterRequest()
    request.cluster = vmwareengine_v1.Cluster()
    request.cluster.name = (
        f"projects/{project_id}/locations/{zone}/privateClouds/{private_cloud_name}"
        f"/clusters/{cluster_name}"
    )
    request.cluster.node_type_configs = {
        "standard-72": vmwareengine_v1.NodeTypeConfig()
    }
    request.cluster.node_type_configs["standard-72"].node_count = node_count
    request.update_mask = "nodeTypeConfigs.*.nodeCount"
    return client.update_cluster(request)

To delete a whole cluster, do the following:

Console

  1. On the private cloud summary page, click Remove nodes.
  2. Select the cluster that you want to shrink or delete.
  3. Select Delete the whole cluster.
  4. Verify the cluster capacity.
  5. Click Submit to begin the process of removing nodes.

gcloud

gcloud vmware private-clouds clusters delete CLUSTER_NAME \
  --location=ZONE \
  --private-cloud=PC_NAME

API

curl -L -X DELETE -H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PC_NAME/clusters/CLUSTER_NAME"

Python

from google.api_core import operation
from google.cloud import vmwareengine_v1


def delete_cluster(
    project_id: str, zone: str, private_cloud_name: str, cluster_name: str
) -> operation.Operation:
    """
    Delete a cluster from private cloud.

    Deleting a cluster is a long-running operation and it may take over an hour..

    Args:
        project_id: name of the project you want to use.
        zone: region in which your private cloud is located.
        private_cloud_name: name of the private cloud hosting the new cluster.
        cluster_name: name of the new cluster.

    Returns:
        An Operation object related to started cluster deletion operation.
    """
    client = vmwareengine_v1.VmwareEngineClient()
    request = vmwareengine_v1.DeleteClusterRequest()
    request.name = (
        f"projects/{project_id}/locations/{zone}/privateClouds/{private_cloud_name}"
        f"/clusters/{cluster_name}"
    )
    return client.delete_cluster(request)

Restrictions

The process of removing nodes from your private cloud has the following restrictions:

  • The vSphere cluster must have at least three nodes. You can't remove nodes from a cluster with 3 or fewer nodes.
  • The total storage consumed can't exceed the total capacity after removing nodes from a cluster.
  • You can't delete the first cluster that was created when the private cloud was created.
  • If vSphere DRS rules (affinity and anti-affinity) are applied to all the nodes of a cluster, nodes cannot be removed from the cluster. You can delete the rules and retry the node removal operation.

Viewing subnets

To view the list of defined management subnets for your private cloud, select the Subnets tab. The list includes the HCX subnets created when the private cloud was created. The list of subnets also includes the attached firewall table for each subnet.

Viewing activity information

To view the activity information for your private cloud, select the Activity tab. The displayed information is a filtered list of all activities for your private cloud. This page shows up to 25 recent activities. For a full list of activities and associated actions, see Monitoring VMware Engine activity.

Viewing vSphere management network

To view the list of VMware management resources and virtual machines that are currently configured on your private cloud, select the vSphere Management Network tab. Information includes the software version, fully qualified domain name (FQDN), and IP address of the resources.