View a markdown version of this page

Delete a host (VCF 9.x) - Amazon Elastic VMware Service

Delete a host (VCF 9.x)

You can delete a host from a Self-deployed environment when you no longer need it. You remove the host from its cluster with VMware Cloud Foundation (VCF) 9.x tools first, and then delete it with the Amazon Elastic VMware Service console or the AWS CLI. Before you delete a host, make sure that the cluster keeps enough hosts for your VCF topology.

For minimum host counts, see the Broadcom documentation for VCF.

Warning

Don’t use the Amazon EC2 console to stop, start, or terminate Amazon EVS hosts. On hosts with local storage, these actions cause the loss of the vSAN data on the instance store volumes. To create, replace, or delete a host, use the Amazon EVS console, the AWS CLI, or the Amazon EVS API. Deleting a host from the Amazon EC2 console can leave your environment in an inconsistent state.

To delete every host and the environment, see Clean up a Self-deployed environment instead. For EVS-deployed environments (VCF 5.2.x), see Delete a host (VCF 5.x).

Step 1: Remove the host from VCF

In VCF

  1. Place the host in maintenance mode in the vSphere Client, and migrate its VMs to the other hosts in the cluster.

  2. Remove the host from its cluster and from the VCF inventory.

For the procedures, see the Broadcom documentation for VCF.

For a diskless host, the datastores of the cluster are on external storage, so removing the host doesn’t delete them.

Step 2: Delete the host

To delete the host in the Amazon EVS console or with the AWS CLI, use the following steps.

Example
Console
  1. Open the Amazon EVS console.

  2. In the navigation pane, choose Environments, and then choose your environment.

  3. Choose the Hosts tab.

  4. Select the host and choose Delete > Delete host. Repeat this step for each host that you want to delete.

  5. To verify completion, check that the host no longer appears in the Hosts tab, or that its Host state is Deleted.

AWS CLI
  1. Run the delete-environment-host command. Replace the example environment ID and host name with your own values. Replace <region-code> with the Region where you created the environment.

    aws evs delete-environment-host \ --environment-id env-abcde12345 \ --host-name esx05 \ --region <region-code>
  2. To verify completion, list the hosts and confirm that the host is no longer listed or that its state is DELETED. Replace the example environment ID with your own value. Replace <region-code> with the Region where you created the environment.

    aws evs list-environment-hosts \ --environment-id env-abcde12345 \ --query 'environmentHosts[].[hostName,hostState]' \ --output table \ --region <region-code>

You have deleted the host. To check the environment after the change, see Monitor environment status.