Delete a private cloud
A private cloud consists of one or more vSphere clusters. Deleting a private cloud deletes the entire private cloud. All components of the private cloud are deleted, including all of the private cloud nodes.
The components of a private cloud include the following:
- Nodes
- Virtual machines
- Management VLANs and subnets
- Workload subnets
- All user data stored on the private cloud
- All External access rules
Deleting a private cloud occurs in two stages: soft deletion and permanent deletion. The following happens in each stage:
- Soft deletion: The private cloud enters a seven-day soft-deletion state.
During this stage, the following happens:
- Your billing stops immediately.
- All connectivity to NSX segments and workloads are severed.
- Access to the private cloud's user interface and API are disabled.
- External IP addresses are disabled.
- The private cloud's configuration and data are preserved and your VMs continue to run.
- You can restore the private cloud to its previous state.
- Permanent deletion: After seven days, the private cloud and its resources are permanently deleted. If you want to permanently delete a private cloud that's in the soft-deletion state, then contact support .
Before you begin
If you want to keep any of the data, back up the data to another private cloud, Google Cloud storage, or on-premises storage or other storage.
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.
Console
-
In the Google Cloud console, go to the Private cloudspage.
-
Click Select a projectand then select the organization, folder, or project where you want to delete the private cloud.
-
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 Deleteto 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
request
+
` ZONE
`
:
the
zone
for
this
private
cloud
+
` HOURS
`
:
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
.
Set
ting
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
request
+
` ZONE
`
:
the
zone
for
the
private
cloud
+
` PRIVATE_CLOUD_ID
`
:
the
private
cloud
ID
for
the
private
cloud
+
` HOUR
`
:
the
number
of
hours
to
delay
this
request
;
the
default
is
3.
You
can
set
an
hour
between
0
to
8.
Set
ting
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 soft-deletion period. Use the following steps.
Console
- In the Google Cloud console, go to the Private cloudspage.
- Select the private cloud that you have marked for deletion.
- On the summary page, click Cancel deletionto 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
request
+
` ZONE
`
:
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
request
+
` ZONE
`
:
the
zone
for
the
private
cloud
+
` PRIVATE_CLOUD_ID
`
:
the
private
cloud
ID
for
this
request