Create a VMware Engine network
This document describes how to create a Standard VMware Engine Network using the VMware Engine portal, gcloud CLI, or API. You can create multiple VMware Engine networks to isolate private clouds and define unique VPC network peerings. VMware Engine networks handle connections to and from private clouds according to a network policy that you define separately.
Before you begin
Google Cloud CLI 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
Set your default project ID:
gcloud config set project PROJECT_ID
Set a default region and zone:
gcloud config set compute/region REGION
gcloud config set compute/zone ZONE
For more information on the gcloud vmware
tool,
see 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:
Login to Google Cloud:
gcloud auth login
Generate access token and export to TOKEN:
export TOKEN=`gcloud auth print-access-token`
Verify that TOKEN is set properly:
echo $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.
Download and install the Python library:
pip install google-cloud-vmwareengine
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.
Create a VMware Engine network
Create a VMware Engine network using the Google Cloud console, gcloud CLI, or VMware Engine API:
Console
To create a VMware Engine network using the VMware Engine:
In the Google Cloud console, go to the VMware Engine networks page.
Click Create. A VMware Engine network creation form opens.
Enter a VMware Engine network name.
Enter a description for the network, for example "My standard VEN 1", and then click Create.
Optional: Confirm the creation of your network by navigating to the VMware Engine networks menu item. All VMware Engine networks are listed in the table on this page.
The following list describes each field during network creation in more detail:
- Name: Permanent unique identifier of the VMware Engine network.
- Description: Additional information that's visible on the details page of the VMware Engine network.
- Network type: Network type identifier used to support networking use cases and standard private cloud deployments.
Region: This depends on whether you are using Standard VMware Engine or Legacy VMware Engine networks.
- For legacy networks, this is the region where the network has connectivity.
- For standard networks, this field is always set to global.
gcloud
To create a VMware Engine network using the gcloud CLI:
Run
gcloud vmware networks create
command:gcloud vmware networks create NETWORK_ID \ --type=STANDARD \ --description="DESCRIPTION"
Replace the following:
NETWORK_ID
: the network name for this requestDESCRIPTION
: a description for this network
Optional: If you want to list all VMware Engine networks to confirm the creation of the new network, use the
gcloud vmware networks list
command:gcloud vmware networks list \ --location=global
API
To create a VMware Engine network using the VMware Engine API, do the following:
To create a VMware Engine network, make a
POST
request:POST "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks?vmware_engine_network_id=NETWORKD_ID" '{ "type": "standard", "description": "DESCRIPTION" }'
Replace the following:
PROJECT_ID
: the project ID for this request.NETWORK_ID
: the network name for this request.DESCRIPTION
: a description for this network.
Optional: To list all VMware Engine networks to confirm the creation of the new network, make a
GET
request. ReplacePROJECT_ID
with the project ID for this request.GET https://vmwareengine.googleapis.com/v1/projects/
/locations/global/vmwareEngineNetworks
Update a VMware Engine network
Update a VMware Engine network using the Google Cloud console, gcloud CLI, or VMware Engine API:
Console
In the Google Cloud console, go to the VMware Engine networks page.
Click the name of the network that you want to update.
On the network details page, edit the description and then click Save.
Optional: To view the updated description, navigate to the VMware Engine networks menu item and click the network to see the details.
gcloud
To update a VMware Engine network using the gcloud CLI, do the following:
Update the description of a VMware Engine network by running the
gcloud vmware networks update
command:gcloud vmware networks update NETWORK_ID \ --description='DESCRIPTION'
Replace the following:
NETWORK_ID
: the network name for this request.DESCRIPTION
: an updated description for this network.
Optional: If you want to view the updated attribute, use the
gcloud vmware networks describe
command:gcloud vmware networks describe NETWORK_ID
Replace
NETWORK_ID
with the network name for this request.
API
To update a VMware Engine network using the VMware Engine API, do the following:
To update the description of a VMware Engine network, make a
PATCH
request:PATCH "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/vmwareEngineNetworks/NETWORK_ID?update_mask=description" '{ "description":"DESCRIPTION" }'
Replace the following:
PROJECT_ID
: the project for this requestLOCATION
: the location of the network, eitherglobal
for legacy networks or the region for standard networksNETWORK_ID
: the network name for this requestDESCRIPTION
: an updated description for this network
Optional: If you want to view the updated attribute, make a
GET
request:GET "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks/NETWORK_ID"
What's next
- Get sign-in credentials for management appliances.
- Manage your private cloud resources and activity.