Create a VMware Engine single node private cloud

This document describes how to create a single node private cloud. Single node private clouds help you get started with your Google Cloud VMware Engine experience with non-production usage such as pilots and proof-of-concept evaluations. Single node private clouds contain only one node and one cluster, are time limited, and automatically removed after 60 days. You can expand your single node private cloud to three nodes at any time to convert it to a standard private cloud.

See Single node private clouds for conceptual information about single node 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.

Before you begin

Create a single node private cloud

Create a single node private cloud using the Google Cloud CLI or VMware Engine API:

gcloud

To create a single node private cloud using the gcloud CLI, do the following:

  1. Optional: If you don't know the names of available regions and zones for your project, you can list them by running the gcloud vmware locations list command:

    gcloud vmware locations list
    
  2. To create a single node private cloud, which expires after 60 days, use the gcloud vmware private-clouds create command:

      gcloud vmware private-clouds create PRIVATE_CLOUD_ID 
    --description= ""
    --location=ZONE
    --cluster="CLUSTER_ID"
    --node-type-config=type=standard-72, count=1
    --management-range=IP_ADDRESS
    --vmware-engine-network="REGION"
    --type=TIME_LIMITED

    Replace the following:

    • CLUSTER_ID: the cluster ID for this request.
    • ZONE: the zone for this private cloud.
    • IP_ADDRESS: the IP address and range for this private cloud, for example 192.168.1.0/24.
    • REGION: the region for this private cloud.

    Output example:

    Create in progress for private cloud [projects//locations//operations/].
    

  3. Optional: If you want to check the status of the private cloud creation, use the gcloud vmware operations describe and gcloud vmware private-clouds list commands. This might take up to two hours.

      gcloud vmware operations describe OPERATION_ID 
    --location=ZONE
      gcloud vmware private-clouds list 
    --location=ZONE

    Output example:

    NAME                  PROJECT       LOCATION
    CREATE_TIME STATE                   VCENTER_FQDN
    -private-cloud     2023-03-01T13:08:21.507Z
    CREATING .
    
  4. Optional: If you want to check the details of the private cloud, run the gcloud vmware private-clouds describe command:

      gcloud vmware private-clouds describe PRIVATE_CLOUD_ID-private-cloud 
    --location=ZONE

  5. Get the vCenter and NSX-T credentials, respectively, by running gcloud vmware private-clouds credentials describe commands:

      gcloud vmware private-clouds vcenter credentials describe PRIVATE_CLOUD_ID-private-cloud 
    --location=ZONE
        gcloud vmware private-clouds nsx credentials describe PRIVATE_CLOUD_ID-private-cloud 
    --location=ZONE

API

To create a single node private cloud using the VMware Engine API, do the following:

  1. Create a single node private cloud (expires after 60 days) by making a POST request:

    POST "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds?private_cloud_id=PRIVATE_CLOUD_ID-private-cloud
    " -d '{
      "description": "test private cloud for user guide",
      "network_config": {
        "vmware_engine_network": "projects/PROJECT_ID/locations/REGION/vmwareEngineNetworks/REGION-default",
        "management_cidr": "192.168.0.0/24"
    },
        "management_cluster": {
        "cluster_id": "PRIVATE_CLOUD_ID-cluster",
        "node_type_configs": {
          "standard-72": {
            "node_count": 1
          }
        }
      },
      "type": "TIME_LIMITED"
    }'
    

    Replace the following:

    • PROJECT_ID: the project for this request.
    • ZONE: the zone for this private cloud.
    • PRIVATE_CLOUD_ID: the private cloud ID for this request.
    • REGION: the region for this private cloud.
  2. Optional: Check the status of the private cloud creation (may take up to two hours) by making a POST request:

    POST "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/operations/OPERATION_ID
    

    List the private clouds in a zone by making a POST request:

    POST "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds
  3. Optional: Get details of the private cloud by making a GET request:

    GET "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PRIVATE_CLOUD_ID-private-cloud"
    
  4. Get the vCenter and NSX-T credentials, respectively, by making separate GET requests:

    GET "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PRIVATE_CLOUD_ID-private-cloud:showVcenterCredentials"
    
    GET "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PRIVATE_CLOUD_ID-private-cloud:showNsxCredentials"
    

What's next