Remove a host from a cluster of hosts within a specific SDDC.

Prerequisites

  • If you want to remove a host with NFS enabled, verify that the NFS mount is active.
  • You must have the required privileges to perform this task.

Procedure

  • Send the following DELETE request to the server. The session ID is sent in the header and the host specification is sent in the body of the request.
    https://{{server_ip}}:9443/api/v1/sddc/{{sddc_id}}/hosts/{{host_name}}
    curl --location --request DELETE "https://{{server_ip}}:9443/api/v1/sddc/1/hosts/SEC_CLU" \
      --header "Content-Type: application/json" \
      --header "JSESSIONID: {{JSESSIONID}}" \
      --data "{...}"
    

Results

A successful call returns the ID with the status:
{
    "task_id": "1"
}

Example: Body of the Request with and Without NFS

With NFS:

{
                            "username": "root",
                            "password": "Skoda1!",
                            "type": "SECONDARY",
                            "vmknicSpecs": {
                                "esxiMgmt": {
                                    "ipSpec": {
                                        "ip": "192.168.101.105",
                                        "subnet": "255.255.255.0",
                                        "fqdn": "esxmb5.cloud.vmw",
                                        "gw": "192.168.101.1"
                                    },
                                    "type": "ESXi_MGMT",
                                    "name": "vmk0",
                                    "vlanId": 0
                                },
                                "vsan": {
                                    "ipSpec": {
                                        "ip": "192.168.102.105",
                                        "subnet": "255.255.255.0",
                                        "gw": "192.168.102.1"
                                    },
                                    "type": "VSAN",
                                    "name": "vmk1",
                                    "vlanId": 0
                                },
                                "vmotion": {
                                    "ipSpec": {
                                        "ip": "192.168.103.105",
                                        "subnet": "255.255.255.0",
                                        "gw": "192.168.103.1"
                                    },
                                    "type": "VMOTION_PG",
                                    "name": "vmk2",
                                    "vlanId": 0
                                } ,
                                "nfs": {
                                    "ipSpec": {
                                        "ip": "192.168.104.105",
                                        "subnet": "255.255.255.0",
                                        "gw": "192.168.104.1"
                                    },
                                    "type": "NFS",
                                    "name": "vmk3",
                                    "vlanId": 0
                                }
                            },
                            "pnicSpec": {
                                "uplink1": {
                                    "name": "vmnic0"
                                },
                                "uplink2": {
                                    "name": "vmnic1"
                                }
                            },
                            "vsanDiskSpec": {
                                "autoDiskGroups": true,
                                "diskGroups": []
                            }
}

Without NFS:

{
                            "username": "root",
                            "password": "Skoda1!",
                            "type": "SECONDARY",
                            "vmknicSpecs": {
                                "esxiMgmt": {
                                    "ipSpec": {
                                        "ip": "192.168.101.105",
                                        "subnet": "255.255.255.0",
                                        "fqdn": "esxmb5.cloud.vmw",
                                        "gw": "192.168.101.1"
                                    },
                                    "type": "ESXi_MGMT",
                                    "name": "vmk0",
                                    "vlanId": 0
                                },
                                "vsan": {
                                    "ipSpec": {
                                        "ip": "192.168.102.105",
                                        "subnet": "255.255.255.0",
                                        "gw": "192.168.102.1"
                                    },
                                    "type": "VSAN",
                                    "name": "vmk1",
                                    "vlanId": 0
                                },
                                "vmotion": {
                                    "ipSpec": {
                                        "ip": "192.168.103.105",
                                        "subnet": "255.255.255.0",
                                        "gw": "192.168.103.1"
                                    },
                                    "type": "VMOTION_PG",
                                    "name": "vmk2",
                                    "vlanId": 0
                                }
                            },
                            "pnicSpec": {
                                "uplink1": {
                                    "name": "vmnic0"
                                },
                                "uplink2": {
                                    "name": "vmnic1"
                                }
                            },
                            "vsanDiskSpec": {
                                "autoDiskGroups": true,
                                "diskGroups": []
                            }
                        }