Delete a private cloud
A private cloud consists of one or more vSphere clusters. When you delete a private cloud, all clusters and their nodes are deleted.
Before you begin
Deleting a private cloud deletes the entire private cloud. All components of the private cloud are deleted, including all of the private cloud nodes. If you want to keep any of the data, back up the data to on-premises storage or other storage.
The components of a private cloud include:
- Nodes
- Virtual machines
- Management VLANs and subnets
- Workload subnets
- All user data stored on the private cloud
- All External access rules
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
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.
Delete a private cloud
If you want your workload network IP CIDRs to be available right away, shut down all your VMs in your private cloud before starting the private cloud deletion.
When you delete a private cloud, your billing stops immediately, however, the private cloud might not be deleted for 24 hours. During this time, your private cloud remains in the Google Cloud console and your VMs continues to run.
Console
In the Google Cloud console, go to the Private clouds page.
Select the private cloud you want to delete.
On the summary page, click Delete this Private Cloud.
On the confirmation page, you're prompted to verify all of the results of the delete action. Read these carefully and continue with the deletion only if you're ready to accept the results. When you are ready to accept the results, select all of the checkboxes.
Enter a number of hours to wait before running the deletion (1‑8 hours). Within that period, you can cancel the deletion by clicking Cancel.
To verify that you know which private cloud you are deleting, enter the name of the private cloud to delete.
Click Delete to mark the private cloud for deletion.
The deletion process starts after the specified delay, in hours, and runs to completion.
gcloud
To delete a private cloud using the Google Cloud CLI, use the
gcloud vmware private-clouds delete
command.
gcloud vmware private-clouds delete PRIVATE_CLOUD_ID \ --location=ZONE [--delay-hours=HOURS]
Replace the following:
PRIVATE_CLOUD_ID
: the private cloud ID for this requestZONE
: the zone for this private cloudHOURS
: the numbers of hours to delay this request. By default, this is set to 3 hours, but you can set this from 0 to 8 hours. Setting this value to 0 means the deletion request will start immediately.
API
To delete a private cloud using the VMware Engine API, make a DELETE
request:
curl -X DELETE -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json; charset=utf-8" https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds?privateCloudId=PRIVATE_CLOUD_ID&mps;delayHours=HOUR
Replace the following:
TOKEN
: the authorization token for this request.PROJECT_ID
: the project for this requestZONE
: the zone for the private cloudPRIVATE_CLOUD_ID
: the private cloud ID for the private cloudHOUR
: the number of hours to delay this request; the default is 3. You can set an hour between 0 to 8. Setting this value to 0 starts the deletion request immediately.
Python
Deleting a private cloud with the VMWare Engine library is a one-step process compared to using the Google Cloud console. Be very careful when calling private cloud deletion methods.
Cancel deletion of a private cloud
You can cancel the deletion of a private cloud within the wait period. Use the following steps.
Console
In the Google Cloud console, go to the Private clouds page.
Select the private cloud that you have marked for deletion.
On the summary page, click Cancel deletion to cancel the deletion of the private cloud.
gcloud
To cancel deletion of a private cloud using the Google Cloud CLI, use the gcloud vmware private-clouds undelete
command:
gcloud vmware private-clouds undelete PRIVATE_CLOUD_ID \ --location=ZONE
Replace the following:
PRIVATE_CLOUD_ID
: the private cloud ID for this requestZONE
: the zone for this private cloud
API
To cancel deletion of a private cloud using the VMware Engine API, make a
POST
request:
curl -X POST -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json; charset=utf-8" https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds?privateCloudId=PRIVATE_CLOUD_ID:undelete
Replace the following:
TOKEN
: the authorization token for this request.PROJECT_ID
: the project ID for this requestZONE
: the zone for the private cloudPRIVATE_CLOUD_ID
: the private cloud ID for this request