Hosts APIs
APIs for managing Hosts
Table of Contents
Note : The ipAddress field in request payload or response body are deprecated and will be removed. Please use fqdn field instead.
1. Commission the Hosts
1.1. Prerequisites API
The following data is required
Username of each host
Password of each host
FQDN of each host
Network pool name to which each host has to be associated with (Optional)
Network pool ID to which each host has to be associated with
Tip : Refer to: Get the Network Pools and Get a Network of a Network Pool
The host, if intended to be used for a vSAN domain, should be vSAN compliant and certified as per the VMware Hardware Compatibility Guide.
BIOS, HBA, SSD, HDD, etc. of the host must match the VMware Hardware Compatibility Guide.
The host must have the drivers and firmware versions specified in the VMware Hardware Compatibility Guide.
The host must have the supported version of ESXi (i.e 6.7.0-13006603) pre-installed on it.
SSH and syslog must be enabled on the host.
The host must be configured with DNS server for forward and reverse lookup and FQDN.
The host name must be same as the FQDN.
The host must have a standard switch with two NIC ports with a minimum 10 Gbps speed.
The management IP must be configured to the first NIC port.
Ensure that the host has a standard switch and the default uplinks with 10Gb speed are configured starting with traditional numbering (e.g., vmnic0) and increasing sequentially.
Ensure that the host hardware health status is healthy without any errors.
All disk partitions on HDD / SSD are deleted.
The hosts, if intended to be used for vSAN, domain must be associated with vSAN enabled network pool.
The hosts, if intended to be used for vSAN ESA, domain must be associated with vSAN enabled network pool.
The hosts, if intended to be used for NFS, domain must be associated with NFS enabled network pool.
The hosts, if intended to be used for VMFS on FC, domain must be associated with either a NFS enabled or vMotion enabled network pool.
The hosts, if intended to be used for VVOL, domain must be associated with either a NFS enabled or vMotion enabled network pool.
The hosts, if intended to be used for VSAN_REMOTE, domain must be associated with vSAN enabled network pool.
1.2. Steps API
- Validate the input specification.
For VSAN storage type
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts/validations HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/b90740d3-21e5-4110-a954-f3aae5967982
Content-Type: application/json
Content-Length: 526
{
"id" : "b90740d3-21e5-4110-a954-f3aae5967982",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "IN_PROGRESS",
"validationChecks" : [ {
"description" : "Validating input specification",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host sfo01-m01-esx01.rainpole.io",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host sfo01-m01-esx02.rainpole.io",
"resultStatus" : "UNKNOWN"
} ]
}
For VSAN ESA storage type
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_ESA",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_ESA",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts HTTP/1.1
Content-Type: application/json
Content-Length: 676
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_ESA",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_ESA",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/748428da-df42-41eb-9038-b36db6eae188
Content-Type: application/json
Content-Length: 298
{
"id" : "748428da-df42-41eb-9038-b36db6eae188",
"name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:43.495Z",
"isCancellable" : false,
"isRetryable" : false
}
For vVol storage type
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VVOL",
"vvolStorageProtocolType" : "ISCSI",
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VVOL",
"vvolStorageProtocolType" : "NFS",
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts/validations HTTP/1.1
Content-Type: application/json
Content-Length: 694
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VVOL",
"vvolStorageProtocolType" : "ISCSI",
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VVOL",
"vvolStorageProtocolType" : "NFS",
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/c04630e2-ab14-404b-90c4-64113b64a51c
Content-Type: application/json
Content-Length: 526
{
"id" : "c04630e2-ab14-404b-90c4-64113b64a51c",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "IN_PROGRESS",
"validationChecks" : [ {
"description" : "Validating input specification",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host sfo01-m01-esx01.rainpole.io",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host sfo01-m01-esx02.rainpole.io",
"resultStatus" : "UNKNOWN"
} ]
}
For vSAN Remote storage type
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_REMOTE",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_REMOTE",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts/validations HTTP/1.1
Content-Type: application/json
Content-Length: 704
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_REMOTE",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN_REMOTE",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/3495fd66-cc85-4337-9c72-901064d39238
Content-Type: application/json
Content-Length: 526
{
"id" : "3495fd66-cc85-4337-9c72-901064d39238",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "IN_PROGRESS",
"validationChecks" : [ {
"description" : "Validating input specification",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host sfo01-m01-esx01.rainpole.io",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host sfo01-m01-esx02.rainpole.io",
"resultStatus" : "UNKNOWN"
} ]
}
- Poll until "executionStatus" is not "IN_PROGRESS" using the "id" from the previous response.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations/b90740d3-21e5-4110-a954-f3aae5967982' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts/validations/b90740d3-21e5-4110-a954-f3aae5967982 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 436
{
"id" : "b90740d3-21e5-4110-a954-f3aae5967982",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "IN_PROGRESS",
"validationChecks" : [ {
"description" : "Validating host sfo01-m01-esx01.rainpole.io",
"resultStatus" : "SUCCEEDED"
}, {
"description" : "Validating host sfo01-m01-esx02.rainpole.io",
"resultStatus" : "UNKNOWN"
} ]
}
- In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations/b90740d3-21e5-4110-a954-f3aae5967982' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts/validations/b90740d3-21e5-4110-a954-f3aae5967982 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 442
{
"id" : "b90740d3-21e5-4110-a954-f3aae5967982",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "Validating input specification",
"resultStatus" : "SUCCEEDED"
}, {
"description" : "Validating input specification",
"resultStatus" : "SUCCEEDED"
} ]
}
- In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".
Note : Make changes to the input specification and re-validate using a new API invocation.
- Trigger the task using the valid input specification.
Note : It is recommended to validate host commission input specification before triggering the host commission operation.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/7528142d-6619-433b-9f46-6a740afece32
Content-Type: application/json
Content-Length: 298
{
"id" : "7528142d-6619-433b-9f46-6a740afece32",
"name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:42.714Z",
"isCancellable" : false,
"isRetryable" : false
}
Note : To skip failed hosts during commission workflow set the query parameter skipFailedHosts to true as follows.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=true' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts?skipFailedHosts=true HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/9c7d7f4f-12fa-4eab-a90c-2e9ef1ded0fa
Content-Type: application/json
Content-Length: 298
{
"id" : "9c7d7f4f-12fa-4eab-a90c-2e9ef1ded0fa",
"name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:43.715Z",
"isCancellable" : false,
"isRetryable" : false
}
Note : By default skip failed hosts flag is enabled, to disable skip failed hosts flag during commission workflow set the query parameter skipFailedHosts to false as follows.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=false' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]'
HTTP Request
POST /v1/hosts?skipFailedHosts=false HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool",
"sshThumbprint" : null,
"sslThumbprint" : null
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"vvolStorageProtocolType" : null,
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool",
"sshThumbprint" : "sshThumbprint",
"sslThumbprint" : "sslThumbprint"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/b21fc510-234d-4d94-84a8-66623e2abedd
Content-Type: application/json
Content-Length: 298
{
"id" : "b21fc510-234d-4d94-84a8-66623e2abedd",
"name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:41.913Z",
"isCancellable" : false,
"isRetryable" : false
}
- Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
Tip : Refer to: Get a Task.
If the "status" is "SUCCESSFUL", the task is completed successfully.
If the "status" is "FAILED", the task can be re-executed.
Tip : Refer to: Retry a Task.
1.3. Related APIs API
[_validatehostsoperations] API [_validatehostcommissionspec] API> [_commissionhosts] API [_gettask] API [_retrytask] API [_getnetworkpools] API [_getnetworksofnetworkpool] API [_getnetworkofnetworkpool] API [_createnetworkpool] API [_addippooltonetworkofnetworkpool] API [_deleteippoolfromnetworkofnetworkpool] API
2. Get the Hosts
2.1. Prerequisites API
None
Get All Hosts
2.2. Steps API
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4957
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
}, {
"id" : "8045e44e-974e-4f43-9862-7f0326782638",
"serialNumber" : null,
"esxiVersion" : "6.5.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.101",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"status" : "UNASSIGNED_USEABLE",
"hybrid" : true
}, {
"id" : "8045e44e-974e-4f43-9862-7f0326782637",
"serialNumber" : null,
"esxiVersion" : "6.5.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx03.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.102",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"status" : "UNASSIGNED_UNUSEABLE",
"hybrid" : true
} ]
}
Get ASSIGNED Hosts
This API can be used to fetch all the hosts that are currently assigned to any domain and hence cannot be used for other domain tasks
2.3. Steps API
- Invoke the API by specifying the "status" as "ASSIGNED".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?status=ASSIGNED' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?status=ASSIGNED HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1789
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
} ]
}
Get UNASSIGNED_USEABLE Hosts
This API can be used to fetch all the hosts that are currently not assigned to any domain and hence can be used for other domain tasks
2.4. Steps API
- Invoke the API by specifying the "status" as "UNASSIGNED_USEABLE".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?status=UNASSIGNED_USEABLE' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?status=UNASSIGNED_USEABLE HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1604
{
"elements" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782638",
"serialNumber" : null,
"esxiVersion" : "6.5.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx02.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.101",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"status" : "UNASSIGNED_USEABLE",
"hybrid" : true
} ]
}
Get UNASSIGNED_UNUSEABLE Hosts
This API can be used to fetch all the hosts that are currently not assigned to any domain and can be used for other domain tasks after completion of cleanup operation
Note : Cleanup operations must be performed to get these host back into "UNASSIGNED" and "USEABLE" state.
2.5. Steps API
- Invoke the API by specifying the "status" as "UNASSIGNED_UNUSEABLE".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?status=UNASSIGNED_UNUSEABLE' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?status=UNASSIGNED_UNUSEABLE HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1606
{
"elements" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782637",
"serialNumber" : null,
"esxiVersion" : "6.5.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx03.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.102",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"status" : "UNASSIGNED_UNUSEABLE",
"hybrid" : true
} ]
}
Get Hosts by Domain
This API can be used to fetch all the hosts that are currently assigned to a given domain.
2.6. Steps API
- Invoke the API by specifying the "domainId".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?domainId=377236f7-4965-4179-895e-eeb4eb9a6ad1' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?domainId=377236f7-4965-4179-895e-eeb4eb9a6ad1 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1789
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
} ]
}
Get Hosts by Cluster
This API can be used to fetch all the hosts that are currently assigned to a given cluster.
2.7. Steps API
- Invoke the API by specifying the "clusterId".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?clusterId=4205afdd-94f5-403e-a051-1a9bba09ef40' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?clusterId=4205afdd-94f5-403e-a051-1a9bba09ef40 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1789
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
} ]
}
Get Hosts by Network Pool
This API can be used to fetch all the hosts that are currently assigned to a given network pool.
2.8. Steps API
- Invoke the API by specifying the "networkpoolId".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?networkpoolId=1205afdd-84f5-403e-a052-1a9bba09ef41' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?networkpoolId=1205afdd-84f5-403e-a052-1a9bba09ef41 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1789
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
} ]
}
Get Hosts by Storage Type
This API can be used to fetch all the hosts that are currently configured with the given storage type.
Note : Supported storage type is "VMFS_FC" , "VVOL".
2.9. Steps API
- Invoke the API by specifying the "storageType".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?storageType=VMFS_FC' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?storageType=VMFS_FC HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1789
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
} ]
}
Get Hosts by Datastore Name
This API can be used to fetch all the hosts that are currently configured with the given datastore.
2.10. Steps API
- Invoke the API by specifying the "datastoreName".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?datastoreName=datastore1' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts?datastoreName=datastore1 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1789
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
} ]
}
2.11. Related APIs API
[_gethosts] API [_gethost] API
3. Get a Host
3.1. Prerequisites API
The following data is required
- ID of the host
3.2. Steps API
- Invoke the API by providing the ID of the host as input.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/c0703437-6746-470b-9e1c-f9d3bbc9b1c1' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts/c0703437-6746-470b-9e1c-f9d3bbc9b1c1 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1634
{
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"serialNumber" : null,
"esxiVersion" : "6.7.0-13006603",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"isPrimary" : false,
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"usedFrequencyMHz" : 0.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0,
"usedCapacityMB" : 0.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"usedCapacityMB" : 0.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2",
"speed" : 0,
"unit" : "MB"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3",
"speed" : 0,
"unit" : "MB"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"networkpool" : {
"id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED",
"compatibleStorageType" : "VMFS_FC",
"hybrid" : false
}
3.3. Related APIs API
[_gethosts] API [_gethost] API
4. Get the Hosts based on a Criterion
This API is used to get the hosts that meets a specific criterion.
4.1. Prerequisites API
None
Get the hosts based on a criterion
4.2. Steps API
- Invoke the Get Host Criterion API to list all the criteria supported.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/criteria' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts/criteria HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1217
{
"elements" : [ {
"name" : "HOST_COMPATIBLE_WITH_CLUSTER_USING_PNICS",
"arguments" : {
"storageType" : "Storage type of host",
"clusterId" : "ID of the cluster"
},
"description" : "Return all hosts that are compatible with a cluster"
}, {
"name" : "UNMANAGED_HOSTS_IN_HCIMGR",
"arguments" : {
"hciManagerFqdn" : "HCI Manager FQDN",
"hciManagerSslThumbprint" : "HCI Manager SSL Thumbprint"
},
"description" : "Return all the unmanaged hosts discovered by HCI manager through auto discovery"
}, {
"name" : "UNMANAGED_HOSTS_IN_HCIMGR_MANUAL_DISCOVERY",
"subCriteria" : [ {
"name" : "UNMANAGED_HOSTS_IN_HCIMGR_MANUAL_DISCOVERY",
"arguments" : {
"managementIp" : "Un-managed host management IP address",
"rootPassword" : "Un-managed host root password"
},
"description" : "Return all the unmanaged hosts discovered by HCI manager through manual discovery"
} ],
"arguments" : {
"hciManagerFqdn" : "HCI Manager FQDN",
"hciManagerSslThumbprint" : "HCI Manager SSL Thumbprint"
},
"description" : "Return all the unmanaged hosts discovered by HCI manager through manual discovery"
} ]
}
- Pick one of the criterion and post a query
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/queries' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"name" : "HOST_COMPATIBLE_WITH_CLUSTER_USING_PNICS",
"arguments" : {
"storageType" : "VSAN",
"clusterId" : ""
},
"description" : "fetch all the hosts compatible with a cluster"
}'
HTTP Request
POST /v1/hosts/queries HTTP/1.1
Content-Type: application/json
Content-Length: 196
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"name" : "HOST_COMPATIBLE_WITH_CLUSTER_USING_PNICS",
"arguments" : {
"storageType" : "VSAN",
"clusterId" : ""
},
"description" : "fetch all the hosts compatible with a cluster"
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/hosts/queries/f310c511-a357-4728-8402-f604531bab21
Content-Type: application/json
Content-Length: 183
{
"queryInfo" : {
"status" : "IN_PROGRESS",
"queryId" : "f310c511-a357-4728-8402-f604531bab21",
"completed" : false,
"processing" : true,
"failure" : false
}
}
Read the tracking URL returned as Location header in the previous step.
Poll the tracking URL until the "status" is not "IN_PROGRESS".
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/queries/23dbc8bc-4981-4006-bf2d-5f0c9467ab79' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/hosts/queries/23dbc8bc-4981-4006-bf2d-5f0c9467ab79 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3486
{
"queryInfo" : {
"status" : "COMPLETED",
"queryId" : "dummy_query_id",
"completed" : true,
"processing" : false,
"failure" : false
},
"result" : {
"elements" : [ {
"id" : "44806db8-4401-4d74-be0a-f9067d048314",
"serialNumber" : null,
"esxiVersion" : "6.7.0-14320388",
"sshThumbprint" : null,
"sslThumbprint" : null,
"fqdn" : "sfo01-m01-esx01.rainpole.io",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
}, {
"ipAddress" : "10.0.4.3",
"type" : "VSAN"
}, {
"ipAddress" : "10.0.8.3",
"type" : "VMOTION"
} ],
"cpu" : {
"frequencyMHz" : 19155.640625,
"usedFrequencyMHz" : 767.0,
"cores" : 8,
"cpuCores" : [ {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
}, {
"frequencyMHz" : 2394.455078125,
"model" : "intel",
"manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
} ]
},
"memory" : {
"totalCapacityMB" : 63999.42578125,
"usedCapacityMB" : 29454.0
},
"storage" : {
"totalCapacityMB" : 1757712.0,
"usedCapacityMB" : 587753.125,
"disks" : [ {
"capacityMB" : 146484.375,
"diskType" : "HDD"
}, {
"capacityMB" : 146484.375,
"diskType" : "HDD"
}, {
"capacityMB" : 146484.375,
"diskType" : "FLASH"
}, {
"capacityMB" : 146484.375,
"diskType" : "HDD"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:ed:4e:e1:e2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:ed:f3:29:03"
}, {
"deviceName" : "vmnic2",
"macAddress" : "02:00:ed:f0:44:b6"
}, {
"deviceName" : "vmnic3",
"macAddress" : "02:00:ed:f0:91:45"
} ],
"domain" : {
"id" : "7572b048-51b3-44c6-bf62-356b3baef8f9"
},
"networkpool" : {
"id" : "bea95488-1fbb-4fe7-8bf7-e431c4afdd68",
"name" : "bringup-networkpool"
},
"cluster" : {
"id" : "a481407c-7e00-4489-afb1-c89f21dc8c84"
},
"status" : "ASSIGNED",
"bundleRepoDatastore" : "lcm-bundle-repo",
"hybrid" : false
} ]
}
}
5. Decommission the Hosts
5.1. Prerequisites API
The following data is required
- FQDN of each host
The host must not be assigned to a domain i.e "status" must be "UNASSIGNED_USEABLE".
Tip : Refer to: Get the Hosts to fetch the hosts with the required "status"
5.2. Steps API
- Invoke the API
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]'
HTTP Request
DELETE /v1/hosts HTTP/1.1
Content-Type: application/json
Content-Length: 94
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/c7d9ba4d-aabe-4c28-aa52-d271ab72f770
Content-Type: application/json
Content-Length: 300
{
"id" : "c7d9ba4d-aabe-4c28-aa52-d271ab72f770",
"name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:42.528Z",
"isCancellable" : false,
"isRetryable" : false
}
Note : To skip failed hosts during decommission workflow set the query parameter skipFailedHosts to true as follows.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=true' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]'
HTTP Request
DELETE /v1/hosts?skipFailedHosts=true HTTP/1.1
Content-Type: application/json
Content-Length: 94
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/32000e5e-c57a-4e72-8156-89b50f3c9f17
Content-Type: application/json
Content-Length: 300
{
"id" : "32000e5e-c57a-4e72-8156-89b50f3c9f17",
"name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:42.986Z",
"isCancellable" : false,
"isRetryable" : false
}
Note : By default skip failed hosts flag is enabled, to disable skip failed hosts flag during decommission workflow set the query parameter skipFailedHosts to false as follows.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=false' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]'
HTTP Request
DELETE /v1/hosts?skipFailedHosts=false HTTP/1.1
Content-Type: application/json
Content-Length: 94
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
[ {
"fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
"fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/ab60a570-a1bc-4009-8aff-4cc0b590a575
Content-Type: application/json
Content-Length: 300
{
"id" : "ab60a570-a1bc-4009-8aff-4cc0b590a575",
"name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T19:58:43.072Z",
"isCancellable" : false,
"isRetryable" : false
}
- Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
Tip : Refer to: Get a Task.
If the "status" is "SUCCESSFUL", the task is completed successfully.
If the "status" is "FAILED", the task can be re-executed.
Tip : Refer to: Retry a Task.
5.3. Related APIs API
[_decommissionhosts] API [_gettask] API [_retrytask] API [_gethosts] API [_gethost] API
Last updated 2024-08-27 16:13:54 -0700