Clusters APIs

Clusters APIs

APIs for managing Clusters

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. Create a Cluster

This method has been deprecated from the VCF 4.5 release. Please refer to section Create a Cluster with Workflow Optimization After you add the VxRail primary cluster, additional clusters can be added to expand the domain.

1.1. Prerequisites API

  • The following data is required

    • Domain Identifier in which the cluster is to be created

    • Cluster details

      • Name of the new cluster that will be added to the specified workload domain

      • VxRail Manager Details

        • admin and root credentials
      • VSAN license key

      • Host details

        • Hostname of ESXi host which is part of the cluster

        • IpAddress of the same ESXi host which is part of the cluster

        • Password of ESXi host which is part of the cluster

      • List of VDS details, For each VDS

        • DVS name

        • Flag to indicate whether this DVS is used by NSX

        • Port group names and the corresponding transport type. Note that EDGE_INFRA_OVERLAY_UPLINK, VREALIZE should not be specified in the input spec. Multiple port groups with transport type PUBLIC can be created.

    • NSX cluster Details, For NSX

      • VLAN ID of Geneve

      • IP Address Pool spec if the TEP IP assignment is done from IP pool (only required in case of non-DHCP option)

        • Name of the IP address pool

        • Description of the IP address pool

        • IP address pool subnet details

          • Subnet cidr

          • Gateway

          • IP Address Pool Ranges

            • First IP address in the IP address range

            • Last IP address in the IP address range

      • For DHCP

        {
          "nsxTClusterSpec" : {
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        }
        
      • For creating new IP pool during domain creation

        {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        }
        
      • For using an existing IP pool during domain creation. For more information on fetching the NSX Cluster details, refer to NSX Clusters

        {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01"
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        }
        

Note : To create a new IP address pool during domain creation, "subnets" , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool

  • Workload Domain must be provisioned.

Note : NSX Manager(s) are configured when domain is created.

  • Host configuration must have minimum two active vmNics.

  • A DHCP server must be configured for NSX VTEPS

1.2. Steps API

  • Through VxRail UI, create a cluster in the VC, which was created as part of the previous invocation of the create domain

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Get the list of unmanaged clusters with names in thus created vi domain, Invoke a call to get clusters to get the details.

Tip : Refer to: Get the unmanaged clusters by criterion

  • Choose the name of one cluster that needs to be imported. Invoke a call to get unmanaged cluster by selected cluster name to get the network and host details.

Tip : Refer to: Get an unmanaged cluster by criterion

  • Create a cluster spec as shown in the curl payload below using the information from previous call

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "8a46ebb0-bc57-4a92-88b4-83854e0fed80",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "dnsName" : "vxrm.vrack.vsphere.local",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ]
  }
}'

HTTP Request

POST /v1/clusters/validations HTTP/1.1
Content-Type: application/json
Content-Length: 3323
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "8a46ebb0-bc57-4a92-88b4-83854e0fed80",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "dnsName" : "vxrm.vrack.vsphere.local",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ]
  }
}

HTTP Response

HTTP/1.1 200 OK
Location: /v1/clusters/validations/bda48ec0-2028-4fc2-9394-826243b90e04
Content-Type: application/json
Content-Length: 142

{
  "id" : "bda48ec0-2028-4fc2-9394-826243b90e04",
  "description" : "Validating Cluster Creation Spec",
  "executionStatus" : "IN_PROGRESS"
}
  • Get Validation response of the cluster specification with id obtained from previous spec validation call

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations/9db317f8-33af-46a4-8cae-4c6ab8487530' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/validations/9db317f8-33af-46a4-8cae-4c6ab8487530 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

{
  "id" : "9db317f8-33af-46a4-8cae-4c6ab8487530",
  "description" : "Validation result",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ ]
}
  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "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.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "f96c8bd6-3c43-414c-95c1-c86f43d18fe0",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "dnsName" : "vxrm.vrack.vsphere.local",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ],
    "skipFailedHosts" : true
  }
}'

HTTP Request

POST /v1/clusters HTTP/1.1
Content-Type: application/json
Content-Length: 3353
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "f96c8bd6-3c43-414c-95c1-c86f43d18fe0",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "dnsName" : "vxrm.vrack.vsphere.local",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ],
    "skipFailedHosts" : true
  }
}

HTTP Response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 341

{
  "errorCode" : "PUBLIC_VXRAIL_CLUSTER_CREATION_CANNOT_SKIP_FAILED_HOSTS",
  "arguments" : [ ],
  "message" : "Failed ESXi Hosts cannot be skipped during VxRail Cluster creation",
  "remediationMessage" : "Remove the optional field \"skipFailedHosts\" from the \"computeSpec\" in the Cluster creation spec",
  "referenceToken" : "FGJFGC"
}
  • 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.

[_validateclustercreationspec] API [_createcluster] API [_getdomains] API [_getdomain] API [_getclusters] API [_getcluster] API [_gethosts] API [_gethost] API [_gettasks] API [_gettask] API [_retrytask] API

2. Create a Cluster with Workflow Optimization

After you add the VxRail primary cluster, additional clusters can be added to expand the domain.

2.1. Prerequisites API

  • The following data is required

    • Domain Identifier in which the cluster is to be created

    • Cluster details

      • Name of the new cluster that will be added to the specified workload domain

      • VxRail Manager Details

        • admin and root credentials

        • DNS Name of VxRail Manager

        • SSH Thumbprint of VxRail Manager

        • SSL Thumbprint of VxRail Manager

        • NIC profile of hosts

        • Networks (details of portgroups such as VSAN, VMOTION, MANAGEMENT.)

      • VSAN license key

      • Host details (the hosts details can be obtained using Get the hosts discovered by HCI manager)

        • Hostname of ESXi host

        • IpAddress of the same ESXi host

        • Credentials of the ESXi host

        • SSH Thumbprint of the ESXi host

        • Serial Number of the ESXi host

        • Host Network Details

        • ESXi License key

      • Network Details

        • List of VDS details, For each VDS

          • DVS name

          • Port group names and the corresponding transport type. Note that EDGE_INFRA_OVERLAY_UPLINK, VREALIZE should not be specified in the input spec.

          • The list of transport zone(s) to be associated with the vSphere Distributed Switch managed by NSX. The supported transport types are OVERLAY and VLAN.

        • NSX cluster Details

          • For each vSphere Distributed Switch that is managed by NSX UplinkProfile needs to be defined inside nsxTClusterSpec . For DHCP transportVlan needs to be provided inside UplinkProfile

            {
              "nsxTClusterSpec" : {
                "uplinkProfiles" : [ {
                  "name" : "Uplink-Profile-1",
                  "teamings" : [ {
                    "policy" : "FAILOVER_ORDER",
                    "activeUplinks" : [ "uplink-1" ],
                    "standByUplinks" : [ "uplink-2" ]
                  } ],
                  "transportVlan" : 2
                } ]
              }
            }
            
          • TEP IP assignment can be done from the Static IP pool. For creating a new IP pool during the domain creation

            {
              "nsxTClusterSpec" : {
                "ipAddressPoolsSpec" : [ {
                  "name" : "static-ip-pool-01",
                  "subnets" : [ {
                    "ipAddressPoolRanges" : [ {
                      "start" : "10.0.11.50",
                      "end" : "10.0.11.70"
                    }, {
                      "start" : "10.0.11.80",
                      "end" : "10.0.11.150"
                    } ],
                    "cidr" : "10.0.11.0/24",
                    "gateway" : "10.0.11.250"
                  } ]
                } ],
                "uplinkProfiles" : [ {
                  "name" : "Uplink-Profile-1",
                  "teamings" : [ {
                    "policy" : "FAILOVER_ORDER",
                    "activeUplinks" : [ "uplink-1" ],
                    "standByUplinks" : [ "uplink-2" ]
                  } ],
                  "transportVlan" : 2
                } ]
              }
            }
            
          • For using an existing IP pool during the domain creation

            {
              "nsxTClusterSpec" : {
                "ipAddressPoolsSpec" : [ {
                  "name" : "static-ip-pool-01"
                } ],
                "uplinkProfiles" : [ {
                  "name" : "Uplink-Profile-1",
                  "teamings" : [ {
                    "policy" : "FAILOVER_ORDER",
                    "activeUplinks" : [ "uplink-1" ],
                    "standByUplinks" : [ "uplink-2" ]
                  } ],
                  "transportVlan" : 2
                } ]
              }
            }
            

Note : To create a new IP address pool during domain creation, "subnets" , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool.

  * Once vSphere Distributed Switch, Uplink Profiles and IP Address Pools Spec are defined, they need to be associated in *networkProfiles* in *networkSpec*

    ```json
    [ {
      "name" : "Cluster-1-network-profile01",
      "isDefault" : true,
      "nsxtHostSwitchConfigs" : [ {
        "vdsName" : "sfo-w01-cl01-vds02",
        "uplinkProfileName" : "Uplink-Profile-1",
        "ipAddressPoolName" : "static-ip-pool-01",
        "vdsUplinkToNsxUplink" : [ {
          "vdsUplinkName" : "uplink1",
          "nsxUplinkName" : "uplink-1"
        }, {
          "vdsUplinkName" : "uplink2",
          "nsxUplinkName" : "uplink-2"
        } ]
      } ]
    } ]
    ```

Note : In case of multiple profiles, the profile name needs to be referred in networkProfileName in HostNetworkSpec.

  • Workload Domain must be provisioned.

Note : NSX Manager(s) are configured when domain is created.

  • Host configuration must have minimum two active vmNics

2.2. Steps to perform Optimized Cluster Creation API

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Get the list of the hosts discovered by HCI Manager of the cluster which is to be created

Tip : Refer to: Get the hosts discovered by HCI manager

  • Create a cluster spec as shown in the curl payload below using the information from previous call

  • Validate the input specification.

  • For a vSphere Lifecycle Manager Image (vLCM) based domain add parameter "clusterImageId" : "VCF-VxRail-Cluster-Image" to the cluster spec(s). All the other parameters and steps remain the same.

    •  ---  "clusterSpecs" : [ { "name" : "sfo-w01-cl01", "clusterImageId" : "VCF-VxRail-Cluster-Image", "vxRailDetails" : { "rootCredentials" : { "credentialType" : "SSH", "username" : "admin", "password" : "xxxxxxxx" }...​...​,--

Note : 'VCF-VxRail-Cluster-Image' is the default VxRail vLCM Image. Currently, VCF VxRail supports only default vLCM image for the domain or cluster deployment.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "38130a45-5470-418b-8886-6f46f58a23e9",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        }, {
          "type" : "MANAGEMENT",
          "vlanId" : 1408,
          "subnet" : "10.0.61.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.61.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "skipThumbprintValidation" : false
    } ]
  }
}'

HTTP Request

POST /v1/clusters/validations HTTP/1.1
Content-Type: application/json
Content-Length: 4288
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "38130a45-5470-418b-8886-6f46f58a23e9",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        }, {
          "type" : "MANAGEMENT",
          "vlanId" : 1408,
          "subnet" : "10.0.61.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.61.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "skipThumbprintValidation" : false
    } ]
  }
}

HTTP Response

HTTP/1.1 200 OK
Location: /v1/clusters/validations/f1788ebf-e76b-4995-99c0-a088ba734e5e
Content-Type: application/json
Content-Length: 142

{
  "id" : "f1788ebf-e76b-4995-99c0-a088ba734e5e",
  "description" : "Validating Cluster Creation Spec",
  "executionStatus" : "IN_PROGRESS"
}
  • Get Validation response of the cluster specification with id obtained from previous spec validation call

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations/9db317f8-33af-46a4-8cae-4c6ab8487530' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/validations/9db317f8-33af-46a4-8cae-4c6ab8487530 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

{
  "id" : "9db317f8-33af-46a4-8cae-4c6ab8487530",
  "description" : "Validation result",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ ]
}
  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "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.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "d57c8cfe-8240-45da-b3f6-0cb384b59a08",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        }, {
          "type" : "MANAGEMENT",
          "vlanId" : 1408,
          "subnet" : "10.0.61.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.61.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "skipThumbprintValidation" : false
    } ]
  }
}'

HTTP Request

POST /v1/clusters HTTP/1.1
Content-Type: application/json
Content-Length: 4288
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "d57c8cfe-8240-45da-b3f6-0cb384b59a08",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "xxxxxxxx"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        }, {
          "type" : "MANAGEMENT",
          "vlanId" : 1408,
          "subnet" : "10.0.61.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.61.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "xxxxxxxx"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "nsxtSwitchConfig" : {
            "transportZones" : [ {
              "name" : "sfo-w01-nsx-overlay",
              "transportType" : "OVERLAY"
            }, {
              "name" : "sfo-w01-nsx-vlan01",
              "transportType" : "VLAN"
            } ],
            "hostSwitchOperationalMode" : "STANDARD"
          },
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ],
          "mtu" : 9000
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "ipAddressPoolsSpec" : [ {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            } ],
            "uplinkProfiles" : [ {
              "name" : "Uplink-Profile-1",
              "teamings" : [ {
                "policy" : "FAILOVER_ORDER",
                "activeUplinks" : [ "uplink-1" ],
                "standByUplinks" : [ "uplink-2" ]
              } ],
              "transportVlan" : 2
            } ]
          }
        },
        "networkProfiles" : [ {
          "name" : "sfo-w01-cl02-network-profile01",
          "isDefault" : true,
          "nsxtHostSwitchConfigs" : [ {
            "vdsName" : "sfo-w01-cl02-vds01",
            "uplinkProfileName" : "Uplink-Profile-1",
            "ipAddressPoolName" : "static-ip-pool-01",
            "vdsUplinkToNsxUplink" : [ {
              "vdsUplinkName" : "uplink1",
              "nsxUplinkName" : "uplink-1"
            }, {
              "vdsUplinkName" : "uplink2",
              "nsxUplinkName" : "uplink-2"
            } ]
          } ]
        } ]
      },
      "skipThumbprintValidation" : false
    } ]
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/41566b22-fd30-4e86-8a6e-ce5f153da90d
Content-Length: 218

{
  "id" : "41566b22-fd30-4e86-8a6e-ce5f153da90d",
  "name" : "Add Cluster Workflow",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2024-06-21T02:32:34.129Z",
  "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.

[_validateclustercreationspec] API [_createcluster] API [_getdomains] API [_getdomain] API [_getclusters] API [_getcluster] API [_usecase_getHostsDiscoveredByHCIMgr] [_gethosts] API [_gethost] API [_gettasks] API [_gettask] API [_retrytask] API

3. Get the Clusters

3.1. Prerequisites API

None

3.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1394

{
  "elements" : [ {
    "id" : "8045e44e-974e-4f43-9862-7f0326782655",
    "domain" : {
      "id" : "4fb47280-3beb-46d3-89cf-e5209febb21f"
    },
    "name" : "sfo-m01-cl01",
    "primaryDatastoreName" : "sfo-m01-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : false,
    "vcenter" : {
      "id" : "ed2c9f30-db7f-48d2-9c9c-d38c5d3718e4",
      "fqdn" : "vcenter-1.vrack.vsphere.local",
      "vcInstanceId" : "abe05e93-cffb-41ca-a367-2352f54f815d"
    },
    "managedObjectReferenceId" : "domain-c8",
    "vsanClusterMode" : "NONE"
  }, {
    "id" : "2345e44e-974e-4f43-9862-7f0326782898",
    "domain" : {
      "id" : "4fb47280-3beb-46d3-89cf-e5209febb21f"
    },
    "name" : "sfo-w04-cl01",
    "primaryDatastoreName" : "sfo-w04-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : true,
    "vcenter" : {
      "id" : "ed2c9f30-db7f-48d2-9c9c-d38c5d3718e4",
      "fqdn" : "vcenter-1.vrack.vsphere.local",
      "vcInstanceId" : "abe05e93-cffb-41ca-a367-2352f54f815d"
    },
    "managedObjectReferenceId" : "domain-c8",
    "vsanClusterMode" : "NONE"
  } ]
}

Get the Stretched Clusters

3.3. Prerequisites API

None

3.4. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters?isStretched=true' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters?isStretched=true HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 707

{
  "elements" : [ {
    "id" : "2345e44e-974e-4f43-9862-7f0326782898",
    "domain" : {
      "id" : "4fb47280-3beb-46d3-89cf-e5209febb21f"
    },
    "name" : "sfo-w04-cl01",
    "primaryDatastoreName" : "sfo-w04-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : true,
    "vcenter" : {
      "id" : "ed2c9f30-db7f-48d2-9c9c-d38c5d3718e4",
      "fqdn" : "vcenter-1.vrack.vsphere.local",
      "vcInstanceId" : "abe05e93-cffb-41ca-a367-2352f54f815d"
    },
    "managedObjectReferenceId" : "domain-c8",
    "vsanClusterMode" : "NONE"
  } ]
}

Get the Vanilla Clusters

3.5. Prerequisites API

None

3.6. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters?isStretched=false' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters?isStretched=false HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 708

{
  "elements" : [ {
    "id" : "8045e44e-974e-4f43-9862-7f0326782655",
    "domain" : {
      "id" : "4fb47280-3beb-46d3-89cf-e5209febb21f"
    },
    "name" : "sfo-m01-cl01",
    "primaryDatastoreName" : "sfo-m01-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : false,
    "vcenter" : {
      "id" : "ed2c9f30-db7f-48d2-9c9c-d38c5d3718e4",
      "fqdn" : "vcenter-1.vrack.vsphere.local",
      "vcInstanceId" : "abe05e93-cffb-41ca-a367-2352f54f815d"
    },
    "managedObjectReferenceId" : "domain-c8",
    "vsanClusterMode" : "NONE"
  } ]
}

[_getclusters] API [_getcluster] API

4. Get the unmanaged clusters by criterion

This API is used to get the unmanaged clusters from vCenter that meets a specific criterion.

4.1. Prerequisites API

  • Domain should already been created.

  • There must be a cluster already added to the VCenter.

  • The following data is required

  • ID of the created domain

Get the unmanaged clusters from vCenter based on a criterion

4.2. Steps API

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Invoke the Get clusters Criteria API to list all the criteria supported.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 359

{
  "elements" : [ {
    "name" : "UNMANAGED_CLUSTERS_IN_VCENTER",
    "arguments" : { },
    "description" : "All unmanaged clusters that are not in inventory but there in vCenter"
  }, {
    "name" : "UNMANAGED_CLUSTER_IN_VCENTER",
    "arguments" : { },
    "description" : "Specific unmanaged cluster that is not in inventory but there in vCenter"
  } ]
}
  • Pick one of the criterion and post a query with its name attribute

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "UNMANAGED_CLUSTERS_IN_VCENTER"
}'

HTTP Request

POST /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries HTTP/1.1
Content-Type: application/json
Content-Length: 46
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "UNMANAGED_CLUSTERS_IN_VCENTER"
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c
Content-Type: application/json
Content-Length: 224

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "queryId" : "622671d0ab32-2d54bb6c-637a-49a4-a94c",
    "completed" : false,
    "processing" : true,
    "failure" : false
  },
  "result" : {
    "elements" : [ ]
  }
}
  • 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/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 285

{
  "queryInfo" : {
    "status" : "COMPLETED",
    "completed" : true,
    "processing" : false,
    "failure" : false
  },
  "result" : {
    "elements" : [ {
      "name" : "sfo-w01-cl01",
      "primaryDatastoreName" : "vsan-ds",
      "primaryDatastoreType" : "VSAN"
    } ]
  }
}

5. Get a Cluster

5.1. Prerequisites API

The following data is required

  • ID of the cluster

5.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/8045e44e-974e-4f43-9862-7f0326782655' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/8045e44e-974e-4f43-9862-7f0326782655 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1861

{
  "id" : "8045e44e-974e-4f43-9862-7f0326782655",
  "domain" : {
    "id" : "4fb47280-3beb-46d3-89cf-e5209febb21f"
  },
  "name" : "sfo-m01-cl01",
  "status" : "ACTIVE",
  "hciMeshData" : {
    "name" : "sfo-m01-cl01",
    "isHciMeshEnabled" : true,
    "primaryDataStoreId" : "8045e44e-974e-4f43-9862-7f0326783766",
    "vsanDataStores" : [ "sfo-m01-cl01-ds-vsan01" ],
    "remoteDatastoreInfos" : [ {
      "serverCluster" : "8045e44e-974e-4f43-9862-7f0326784877",
      "remoteDatastore" : "8045e44e-974e-4f43-9862-7f0326785988"
    } ],
    "isServer" : false,
    "isClient" : true,
    "computeOnlyClient" : false,
    "numberOfClients" : 1,
    "numberOfServers" : 1
  },
  "primaryDatastoreName" : "sfo-m01-cl01-ds-vsan01",
  "primaryDatastoreType" : "VSAN",
  "hosts" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
  }, {
    "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
  } ],
  "isStretched" : false,
  "isDefault" : true,
  "failuresToTolerate" : 1,
  "isImageBased" : true,
  "capacity" : {
    "cpu" : {
      "used" : {
        "value" : 9.745999724364296,
        "unit" : "GHz"
      },
      "total" : {
        "value" : 67.03999810397931,
        "unit" : "GHz"
      },
      "numberOfCores" : 32
    },
    "memory" : {
      "used" : {
        "value" : 127.80859375,
        "unit" : "GB"
      },
      "total" : {
        "value" : 312.484375,
        "unit" : "GB"
      }
    },
    "storage" : {
      "used" : {
        "value" : 224.15609374642372,
        "unit" : "GB"
      },
      "total" : {
        "value" : 858.1875,
        "unit" : "GB"
      }
    }
  },
  "vcenter" : {
    "id" : "ed2c9f30-db7f-48d2-9c9c-d38c5d3718e4",
    "fqdn" : "vcenter-1.vrack.vsphere.local",
    "vcInstanceId" : "abe05e93-cffb-41ca-a367-2352f54f815d"
  },
  "managedObjectReferenceId" : "domain-c8",
  "vsanClusterMode" : "NONE"
}

5.3. Get list of VDSes of a cluster API

Prerequisites API

None

Steps API
  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/vdses' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/vdses HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 703

[ {
  "id" : "bbcb8e27-2af5-4662-9631-d7982e132bbc",
  "name" : "sfo-w01-cl01-vds01",
  "isUsedByNsxt" : false,
  "mtu" : 1500,
  "portGroups" : [ {
    "name" : "sfo-w01-cl01-vds01-pg-mgmt",
    "transportType" : "MANAGEMENT",
    "portBindingType" : "EPHEMERAL",
    "vlanId" : 0
  }, {
    "name" : "sfo-w01-cl01-vds01-pg-vsan",
    "transportType" : "VSAN",
    "portBindingType" : "EPHEMERAL",
    "vlanId" : 0
  }, {
    "name" : "sfo-w01-cl01-vds01-pg-vmotion",
    "transportType" : "VMOTION",
    "portBindingType" : "EPHEMERAL",
    "vlanId" : 0
  } ],
  "nsxtSwitchConfig" : {
    "transportZones" : [ {
      "name" : "sfo-m01-tz-overlay01",
      "transportType" : "OVERLAY"
    } ]
  }
} ]

[_getclusters] API [_getcluster] API

6. Get an unmanaged cluster by criterion

This API is used to get the unmanaged cluster by cluster name from vCenter that meets a specific criterion.

6.1. Prerequisites API

  • Domain should already been created.

  • There must be a cluster already added to the VCenter.

  • The following data is required

    • ID of the created domain

    • List of unmanaged clusters with names

Tip : Refer to: Get the unmanaged clusters by criterion.

  • Choose one cluster name that need to be imported

  • Get the unmanaged cluster from vCenter for domain update based on a criterion*

6.2. Steps API

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Invoke the Get Clusters Criteria API to list all the criteria supported.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 359

{
  "elements" : [ {
    "name" : "UNMANAGED_CLUSTERS_IN_VCENTER",
    "arguments" : { },
    "description" : "All unmanaged clusters that are not in inventory but there in vCenter"
  }, {
    "name" : "UNMANAGED_CLUSTER_IN_VCENTER",
    "arguments" : { },
    "description" : "Specific unmanaged cluster that is not in inventory but there in vCenter"
  } ]
}
  • Pick one of the criterion and post a query with its name attribute

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "UNMANAGED_CLUSTER_IN_VCENTER"
}'

HTTP Request

POST /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries HTTP/1.1
Content-Type: application/json
Content-Length: 45
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "UNMANAGED_CLUSTER_IN_VCENTER"
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c
Content-Type: application/json
Content-Length: 224

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "queryId" : "622671d0ab32-2d54bb6c-637a-49a4-a94c",
    "completed" : false,
    "processing" : true,
    "failure" : false
  },
  "result" : {
    "elements" : [ ]
  }
}
  • 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/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2064

{
  "queryInfo" : {
    "status" : "COMPLETED",
    "completed" : true,
    "processing" : false,
    "failure" : false
  },
  "result" : {
    "elements" : [ {
      "name" : "sfo-w01-cl01",
      "primaryDatastoreName" : "vsan-ds",
      "primaryDatastoreType" : "VSAN",
      "hosts" : [ {
        "ipAddress" : "10.0.0.100",
        "fqdn" : "sfo-w01-esx01.sfo.rainpole.io",
        "vmNics" : [ {
          "name" : "vmnic2",
          "linkSpeedMB" : 10000,
          "isInUse" : false,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        }, {
          "name" : "vmnic3",
          "linkSpeedMB" : 10000,
          "isInUse" : false,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        }, {
          "name" : "vmnic0",
          "linkSpeedMB" : 10000,
          "isInUse" : true,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        }, {
          "name" : "vmnic1",
          "linkSpeedMB" : 10000,
          "isInUse" : true,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        } ]
      } ],
      "vdsSpecs" : [ {
        "name" : "sfo-w01-cl01-vds01",
        "isUsedByNsxt" : false,
        "portGroupSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01-pg-mgmt",
          "transportType" : "MANAGEMENT",
          "activeUplinks" : null,
          "standByUplinks" : null,
          "teamingPolicy" : null,
          "vlanId" : null,
          "portgroupType" : null
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vsan",
          "transportType" : "VSAN",
          "activeUplinks" : null,
          "standByUplinks" : null,
          "teamingPolicy" : null,
          "vlanId" : null,
          "portgroupType" : null
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vmotion",
          "transportType" : "VMOTION",
          "activeUplinks" : null,
          "standByUplinks" : null,
          "teamingPolicy" : null,
          "vlanId" : null,
          "portgroupType" : null
        } ]
      } ]
    } ]
  }
}

7. Expand a Cluster

Importing an individual host into a vcf cluster adds that host to the vcf cluster. You can import multiple hosts at a time to a cluster.

7.1. Prerequisites API

  • The following data is required

    • ID of the cluster

    • For each host

      • ip address of the host

      • username of the host

      • password of the host

      • The network profile name if the host is intended to be part of a NSX sub cluster. The host could be added to a new sub cluster defined by the network profile in the spec or to an existing NSX sub cluster. Hosts that do not define "networkProfileName" will be associated with the global config of the cluster

Tip : Refer to the get cluster network configuration API to get all the existing sub clusters: Query the cluster network configuration

  • The cluster network specification. Creation of sub clusters and sub transport node profiles is supported from NSX version 4.1.2 onwards. This network spec is needed if the hosts used for cluster expansion needs to have a different NSX network configurations than the cluster.

    • The NSX cluster specification

      • To use DHCP for host TEP IP assignment

      • The list of IP address pool specifications if the host TEP IP assignment is done from a static IP pool

{
  "name" : "sfo-w01-cl02-ip-pool-01",
  "description" : "static ip pool for az2",
  "subnets" : [ {
    "ipAddressPoolRanges" : [ {
      "start" : "10.0.8.30",
      "end" : "10.0.8.50"
    } ],
    "cidr" : "10.0.8.0/24",
    "gateway" : "10.0.8.250"
  } ]
}

Note : The spec allows user to either define new IP pools or reuse existing ones. To reuse existing IP pool only the "ipAddressPoolName" has to be defined while "subnets" will be null

  • Define the uplink profiles
{
  "name" : "sfo-w01-cl02-uplink-profile-01",
  "teamings" : [ {
    "policy" : "FAILOVER_ORDER",
    "activeUplinks" : [ "uplink-1" ],
    "standByUplinks" : [ "uplink-2" ]
  } ],
  "transportVlan" : 100
}
  • The network profile is equivalent to the transport node profile and sub transport profiles in NSX. This contains the cluster VDSes used by NSX and the network configurations to be applied on the VDS. The below details are required to create a new network profile

    • The name of the network profile

    • The list of NSX Host switch configurations

      • The VDS name (should be a VDS used by NSX)

      • The name of the uplink profile to be associated with the VDS (should be one of the uplink profiles defined in the spec)

      • The name of the IP address pool specification (should be one of the IP address pools defined in the spec)

      • VDS uplink to NSX uplink mappings

{
  "name" : "sfo-w01-cl02-network-profile-01",
  "description" : "Network profile 02",
  "nsxtHostSwitchConfigs" : [ {
    "vdsName" : "sfo-w01-cl02-vds01",
    "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
    "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
    "vdsUplinkToNsxUplink" : [ {
      "vdsUplinkName" : "uplink1",
      "nsxUplinkName" : "uplink-1"
    }, {
      "vdsUplinkName" : "uplink2",
      "nsxUplinkName" : "uplink-2"
    } ]
  } ]
}

Note : The spec allows user to either define new network profiles or apply an existing network profile on the incoming host(s). To add host(s) to an existing sub cluster define "networkProfileName" under "hostNetworkSpec". If the cluster is stretched, hosts in one availability zone cannot reuse the network profile of hosts in the other availability zone.

  • The cluster in a domain to which hosts are to be added must exist.

  • There must be a host already added to the cluster VCenter.

  • Ensure that the host you want to add is in an active state.

  • Prefer to use get unmanaged hosts calls to get the valid hosts ready for addition using query API

Tip : Refer to: Get the unmanaged hosts based on a Criterion.

7.2. Steps API

  • Validate the input specification async.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-04.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-02"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 2022
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-04.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-02"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/183c4e65-7a02-4c3b-96da-f92fb6028396
Content-Type: application/json
Content-Length: 143

{
  "id" : "183c4e65-7a02-4c3b-96da-f92fb6028396",
  "description" : "Validating Cluster Expansion Spec",
  "executionStatus" : "IN_PROGRESS"
}
  • Get Validation response of the cluster expansion specification from id obtained from previous spec validation call

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/217689b3-bc02-4290-9951-cb1e13afe7f4' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/217689b3-bc02-4290-9951-cb1e13afe7f4 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

{
  "id" : "217689b3-bc02-4290-9951-cb1e13afe7f4",
  "description" : "Validation result",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ ]
}
  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "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.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-04.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-02"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 2022
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-04.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-02"
      }
    }, {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "esxi-05.vrack.vsphere.local",
      "username" : "root"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/null
Content-Length: 54

{
  "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.

[_validateclustercreationspec] API [_updatecluster] API [_gethosts] API [_gethost] API [_gettasks] API [_gettask] API [_retrytask] API [_usecase_getUnManagedHostsByCriterion]

8. Compact a Cluster

When a host is removed from a cluster in a domain, the vSAN members are reduced. Ensure that you have enough hosts remaining to facilitate the configured vSAN availability. Failure to do so might result in the datastore being marked as read-only or in data loss.

8.1. Prerequisites API

The following data is required

  • For each host to be removed

    • ID of the host

8.2. Steps API

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "0f64b038-5003-4c13-9b9a-de5735809d8f"
    } ]
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 115
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "0f64b038-5003-4c13-9b9a-de5735809d8f"
    } ]
  }
}

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 296

{
  "id" : "f70ad194-58fd-4cbd-875a-b62eaa0857e7",
  "description" : "Validating Cluster Compaction Spec",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ {
    "description" : "ClusterCompactionSpecValidation",
    "resultStatus" : "SUCCEEDED"
  } ]
}
  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "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.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "07668771-acb8-434e-b9e0-0b2621b8df80"
    } ]
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 115
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "07668771-acb8-434e-b9e0-0b2621b8df80"
    } ]
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/null
Content-Length: 54

{
  "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.

[_validateclustercreationspec] API [_updatecluster] API [_gethosts] API [_gethost] API [_gettasks] API [_gettask] API [_retrytask] API

9. Prepare for Stretch

Prepare a Standard VxRail vSAN cluster prior to converting it to a Stretched cluster. This will ensure that the VMs on the existing hosts (availability zone) of the cluster do not get migrated to the hosts (second availability zone) that get added to the cluster.

Note : A cluster cannot be stretched if it has remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then try the prepare stretch operation. Also, remote vSAN datastores cannot be configured on stretched clusters. Please refer to the 'VMware Cloud Foundation Administration Guide' for more details.

9.1. Prerequisites API

  • The following data is required

    • ID of the cluster

    • Boolean indicating the cluster has been marked for prepare.

  • The cluster must exist and the id should be valid.

  • The cluster must not be stretched.

9.2. Steps API

  • Trigger the Prepare for Stretch task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "prepareForStretch" : true
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 32
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "prepareForStretch" : true
}

HTTP Response

HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 282

{
  "errorCode" : "PUBLIC_INTERNAL_SERVER_ERROR",
  "arguments" : [ ],
  "message" : "InternalServerError",
  "causes" : [ {
    "type" : "java.lang.UnsupportedOperationException",
    "message" : "vSAN ESA stretch for VxRail is not supported"
  } ],
  "referenceToken" : "E7RARE"
}
  • Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.

  • Track the task status using the "id" from the previous response.

    • If the "status" is "IN_PROGRESS", the task is still in progress.

    • 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.

[_validateclustercreationspec] API [_updatecluster] API [_getclusters] API [_gettasks] API [_gettask] API [_retrytask] API

10. Stretch a Cluster

Convert a Standard VxRail vSAN cluster to a Stretched cluster

Note : A cluster cannot be stretched if it has remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then try the stretch operation. Also, remote vSAN datastores cannot be configured on stretched clusters. Please refer to the 'VMware Cloud Foundation Administration Guide' for more details.

10.1. Prerequisites API

  • The Witness VM is not managed by SDDC and should be added to the datacenter corresponding to the cluster provided. Please refer to the 'Deploying a vSAN Witness Appliance' section in the 'VMware Cloud Foundation Administration Guide'.

  • The vMotion, vSAN, and VXLAN networks require L3 routing between the availability zones. vSAN networks must also have L3 routing to the vSAN network of the witness host. Please refer to the 'Prerequisites for Stretching a Cluster' section in the 'VMware Cloud Foundation Administration Guide'.

  • Hosts in the second availability zone being used for stretch should not already be a part of SDDC and should be added to the given VxRail cluster through the VxRail cluster expansion flow in vCenter. For more information to expand a VxRail cluster, contact Dell EMC Support.

  • The 'Prepare for Stretch' API should be executed before starting with the Stretch workflow.

  • A valid 'Stretched Cluster' license should be applied to the VxRail vSAN Cluster before executing stretch.

  • The following data is required

    • ID of the cluster

    • For each host in the second availability zone which needs to be used for the stretch operation

      • IP Address of the host

      • Hostname (fqdn) of the host

      • SSH Username

      • SSH Password

    • For the witness VM

      • vSAN IP

      • IP address or the fqdn

        • If the witness is managed in vCenter by the fqdn, the the same needs to be provided, else the IP address.
      • vSAN subnet cidr

    • For each availability zone

      • vSAN Gateway IP

      • vSAN subnet cidr

  • The cluster network specification. Creation of sub clusters and sub transport node profiles is supported from NSX version 4.1.2 onwards. This network spec is needed if the hosts used for the secondary availability zone (az) need to have a different NSX network configuration than the primary availability zone. This enables user to use static IP pool for host TEP IP assignment for secondary az hosts.

    • The NSX cluster specification

      • To use DHCP for host TEP IP assignment

      • The list of IP address pool specifications if the host TEP IP assignment is done from a static IP pool

{
  "name" : "sfo-w01-cl02-ip-pool-01",
  "description" : "static ip pool for az2",
  "subnets" : [ {
    "ipAddressPoolRanges" : [ {
      "start" : "10.0.8.30",
      "end" : "10.0.8.50"
    } ],
    "cidr" : "10.0.8.0/24",
    "gateway" : "10.0.8.250"
  } ]
}

Note : The spec allows user to either define new IP pools or reuse existing ones. To reuse existing IP pool only the "ipAddressPoolName" has to be defined while "subnets" will be null

  • Define the uplink profiles
{
  "name" : "sfo-w01-cl02-uplink-profile-01",
  "teamings" : [ {
    "policy" : "FAILOVER_ORDER",
    "activeUplinks" : [ "uplink-1" ],
    "standByUplinks" : [ "uplink-2" ]
  } ],
  "transportVlan" : 100
}

Note : The "secondaryAzOverlayVlanId" is deprecated in favour of "transportVlan" in "uplinkProfiles" . If the NSX version is less than 4.1.2 where sub TNP is not supported, the "secondaryAzOverlayVlanId" is still mandatory.

  • The network profile is equivalent to the transport node profile and sub transport profiles in NSX. This contains the cluster VDSes used by NSX and the network configurations to be applied on the VDS. The below details are required to create a new network profile

    • The name of the network profile

    • The list of NSX Host switch configurations

      • The VDS name (should be a VDS used by NSX)

      • The name of the uplink profile to be associated with the VDS (should be one of the uplink profiles defined in the spec)

      • The name of the IP address pool specification (should be one of the IP address pools defined in the spec)

      • VDS uplink to NSX uplink mappings

{
  "name" : "sfo-w01-cl02-network-profile-01",
  "description" : "Network profile 02",
  "nsxtHostSwitchConfigs" : [ {
    "vdsName" : "sfo-w01-cl02-vds01",
    "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
    "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
    "vdsUplinkToNsxUplink" : [ {
      "vdsUplinkName" : "uplink1",
      "nsxUplinkName" : "uplink-1"
    }, {
      "vdsUplinkName" : "uplink2",
      "nsxUplinkName" : "uplink-2"
    } ]
  } ]
}

Note : The spec should only define new network profiles to be used for hosts in secondary availability zone.

  • The cluster should not be stretched and the id provided should be valid.

  • You must have a valid ESXi license specified with adequate sockets available for the host to be added.

  • Ensure that the given host should be in active state.

  • Underlying physical network should have proper MTUs and vSAN/vMotion connectivity between availability zones and the witness.

10.2. Steps API

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "witnessTrafficSharedWithVsanTraffic" : false,
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "ip-address-pool",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "uplink-profile-1",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "az2-sub-tnp",
        "description" : "AZ2 Sub-TNP",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "uplink-profile-1",
          "ipAddressPoolName" : "ip-address-pool",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 1745
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "witnessTrafficSharedWithVsanTraffic" : false,
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "ip-address-pool",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "uplink-profile-1",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "az2-sub-tnp",
        "description" : "AZ2 Sub-TNP",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "uplink-profile-1",
          "ipAddressPoolName" : "ip-address-pool",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/aab45a93-000a-4e09-a7e3-4180d2fa3c15
Content-Type: application/json
Content-Length: 145

{
  "id" : "aab45a93-000a-4e09-a7e3-4180d2fa3c15",
  "description" : "Stretch Cluster Validation Workflow",
  "executionStatus" : "IN_PROGRESS"
}
  • If the "executionStatus" is "IN_PROGRESS", the spec validation task is still in progress.

  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "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.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "witnessTrafficSharedWithVsanTraffic" : false,
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "ip-address-pool",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "uplink-profile-1",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "az2-sub-tnp",
        "description" : "AZ2 Sub-TNP",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "uplink-profile-1",
          "ipAddressPoolName" : "ip-address-pool",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 1745
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      }
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "witnessTrafficSharedWithVsanTraffic" : false,
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "ip-address-pool",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "uplink-profile-1",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "az2-sub-tnp",
        "description" : "AZ2 Sub-TNP",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "uplink-profile-1",
          "ipAddressPoolName" : "ip-address-pool",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    }
  }
}

HTTP Response

HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 282

{
  "errorCode" : "PUBLIC_INTERNAL_SERVER_ERROR",
  "arguments" : [ ],
  "message" : "InternalServerError",
  "causes" : [ {
    "type" : "java.lang.UnsupportedOperationException",
    "message" : "vSAN ESA stretch for VxRail is not supported"
  } ],
  "referenceToken" : "SLCIAI"
}
  • Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.

  • Track the task status using the "id" from the previous response.

    • If the "status" is "IN_PROGRESS", the task is still in progress.

    • 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.

[_validateclustercreationspec] API [_updatecluster] API [_getclusters] API [_gettasks] API [_gettask] API [_retrytask] API

11. Expand a Stretched Cluster

The expansion workflow on a VxRail stretched cluster adds new hosts from a different availability zone to VCF. The hosts that are part of the expansion are already a part of the VxRail cluster.You can import multiple hosts at a time to a cluster.

11.1. Prerequisites API

  • Hosts in the second availability zone being used for expansion should not already be a part of SDDC and should be added to the given VxRail cluster through the VxRail cluster expansion flow in vCenter. For more information to expand a VxRail cluster, contact Dell EMC Support. Please refer to the 'Cluster Spanning for VMware Cloud Foundation on VxRail' section in the 'VMware Cloud Foundation Administration Guide' for more information on expanding clusters that need cluster spanning.

  • The Witness VM is not managed by SDDC and should be added to the datacenter corresponding to the cluster provided. Please refer to the 'Deploying a vSAN Witness Appliance' section in the 'VMware Cloud Foundation Administration Guide'.

  • The vMotion, vSAN, and VXLAN networks require L3 routing between the availability zones. vSAN networks must also have L3 routing to the vSAN network of the witness host. Please refer to the 'Prerequisites for Stretching a Cluster' section in the 'VMware Cloud Foundation Administration Guide'.

  • The following data is required

    • ID of the cluster

    • For each host in the second availability zone which needs to be used for the expansion operation

      • IP Address of the host

      • Hostname (fqdn) of the host

      • SSH Username

      • SSH Password

      • Name of the availability zone which the new host belongs to

        • The availability zone name can be fetched from the vCenter
      • The network profile name if the host is intended to be part of a NSX sub cluster. The host could be added to a new sub cluster defined by the network profile in the spec or to an existing NSX sub cluster. Hosts that do not define "networkProfileName" will be associated with the global config of the cluster

Tip : Refer to the get cluster network configuration API to get all the existing sub clusters: Query the cluster network configuration

  • For the witness VM

    • vSAN IP

    • IP address or the fqdn

      • If the witness is managed in vCenter by the fqdn, the the same needs to be provided, else the IP address.
    • vSAN subnet cidr

  • For each availability zone

    • vSAN Gateway IP

    • vSAN subnet cidr

  • The cluster network specification. Creation of sub clusters and sub transport node profiles is supported from NSX version 4.1.2 onwards. This network spec is needed if the hosts used for cluster expansion needs to have a different NSX network configurations than the cluster.

    • The NSX cluster specification

      • To use DHCP for host TEP IP assignment

      • The list of IP address pool specifications if the host TEP IP assignment is done from a static IP pool

{
  "name" : "sfo-w01-cl02-ip-pool-01",
  "description" : "static ip pool for az2",
  "subnets" : [ {
    "ipAddressPoolRanges" : [ {
      "start" : "10.0.8.30",
      "end" : "10.0.8.50"
    } ],
    "cidr" : "10.0.8.0/24",
    "gateway" : "10.0.8.250"
  } ]
}

Note : The spec allows user to either define new IP pools or reuse existing ones. To reuse existing IP pool only the "ipAddressPoolName" has to be defined while "subnets" will be null

  • Define the uplink profiles
{
  "name" : "sfo-w01-cl02-uplink-profile-01",
  "teamings" : [ {
    "policy" : "FAILOVER_ORDER",
    "activeUplinks" : [ "uplink-1" ],
    "standByUplinks" : [ "uplink-2" ]
  } ],
  "transportVlan" : 100
}
  • The network profile is equivalent to the transport node profile and sub transport profiles in NSX. This contains the cluster VDSes used by NSX and the network configurations to be applied on the VDS. The below details are required to create a new network profile

    • The name of the network profile

    • The list of NSX Host switch configurations

      • The VDS name (should be a VDS used by NSX)

      • The name of the uplink profile to be associated with the VDS (should be one of the uplink profiles defined in the spec)

      • The name of the IP address pool specification (should be one of the IP address pools defined in the spec)

      • VDS uplink to NSX uplink mappings

{
  "name" : "sfo-w01-cl02-network-profile-01",
  "description" : "Network profile 02",
  "nsxtHostSwitchConfigs" : [ {
    "vdsName" : "sfo-w01-cl02-vds01",
    "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
    "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
    "vdsUplinkToNsxUplink" : [ {
      "vdsUplinkName" : "uplink1",
      "nsxUplinkName" : "uplink-1"
    }, {
      "vdsUplinkName" : "uplink2",
      "nsxUplinkName" : "uplink-2"
    } ]
  } ]
}

Note : The spec allows user to either define new network profiles or apply an existing network profile on the incoming host(s). To add host(s) to an existing sub cluster define "networkProfileName" under "hostNetworkSpec". If the cluster is stretched, hosts in one availability zone cannot reuse the network profile of hosts in the other availability zone.

  • The cluster should be stretched and the id provided should be valid.

  • You must have a valid ESXi license specified with adequate sockets available for the host to be added.

  • Ensure that the given host should be in active state.

  • Underlying physical network should have proper MTUs and vSAN/vMotion connectivity between availability zones and the witness.

11.2. Steps API

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      },
      "azName" : "sfo-w01-cl02-az-02"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    },
    "witnessTrafficSharedWithVsanTraffic" : false
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 1718
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      },
      "azName" : "sfo-w01-cl02-az-02"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    },
    "witnessTrafficSharedWithVsanTraffic" : false
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/db5c9a10-7c02-4fb2-abfd-ede4bea62a14
Content-Type: application/json
Content-Length: 142

{
  "id" : "db5c9a10-7c02-4fb2-abfd-ede4bea62a14",
  "description" : "Validate Expand Cluster Workflow",
  "executionStatus" : "IN_PROGRESS"
}
  • If the "executionStatus" is "IN_PROGRESS", the spec validation task is still in progress.

  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "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.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      },
      "azName" : "sfo-w01-cl02-az-02"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    },
    "witnessTrafficSharedWithVsanTraffic" : false
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 1718
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "hostNetworkSpec" : {
        "networkProfileName" : "sfo-w01-cl02-network-profile-01"
      },
      "azName" : "sfo-w01-cl02-az-02"
    } ],
    "networkSpec" : {
      "nsxClusterSpec" : {
        "ipAddressPoolsSpec" : [ {
          "name" : "sfo-w01-cl02-ip-pool-01",
          "description" : "static ip pool for az2",
          "subnets" : [ {
            "ipAddressPoolRanges" : [ {
              "start" : "10.0.8.30",
              "end" : "10.0.8.50"
            } ],
            "cidr" : "10.0.8.0/24",
            "gateway" : "10.0.8.250"
          } ]
        } ],
        "uplinkProfiles" : [ {
          "name" : "sfo-w01-cl02-uplink-profile-01",
          "teamings" : [ {
            "policy" : "FAILOVER_ORDER",
            "activeUplinks" : [ "uplink-1" ],
            "standByUplinks" : [ "uplink-2" ]
          } ],
          "transportVlan" : 100
        } ]
      },
      "networkProfiles" : [ {
        "name" : "sfo-w01-cl02-network-profile-01",
        "description" : "Network profile 02",
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl02-vds01",
          "uplinkProfileName" : "sfo-w01-cl02-uplink-profile-01",
          "ipAddressPoolName" : "sfo-w01-cl02-ip-pool-01",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          }, {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          } ]
        } ]
      } ]
    },
    "witnessTrafficSharedWithVsanTraffic" : false
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/null
Content-Length: 54

{
  "isCancellable" : false,
  "isRetryable" : false
}
  • Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.

  • Track the task status using the "id" from the previous response.

    • If the "status" is "IN_PROGRESS", the task is still in progress.

    • 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.

[_validateclustercreationspec] API [_updatecluster] API [_gethosts] API [_gethost] API [_gettasks] API [_gettask] API [_retrytask] API

12. Delete a Cluster

Warning : Datastores on the ESXi hosts in the cluster that will be deleted are destroyed.

Note : You cannot delete the last cluster in a domain. Instead, the domain can be deleted. A cluster cannot be deleted if it has remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then retry cluster deletion. Please refer to the 'VMware Cloud Foundation On Dell EMC VxRail Administration Guide' for more details.

12.1. Prerequisites API

  • The following data is required

    • ID of the cluster to be deleted
  • Ensure that a cluster with the given ID exists.

  • The cluster has been marked for deletion.

  • Migrate or backup the VMs and data on the data store associated with the cluster to another location.

12.2. Steps API

  • Initialize the deletion.

Warning : It is not possible to delete a cluster without having marked it for deletion. This 2-step deletion ensures that a cluster is not deleted accidentally.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "markForDeletion" : true
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 30
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "markForDeletion" : true
}

HTTP Response

HTTP/1.1 200 OK
  • Trigger the deletion.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X DELETE \
    -H 'Accept-Language: de' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

DELETE /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Accept-Language: de
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/93db5f6b-9f64-40d0-86ef-691d47367c2e
Content-Length: 212

{
  "id" : "93db5f6b-9f64-40d0-86ef-691d47367c2e",
  "name" : "Remove Cluster",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2024-06-21T02:32:43.714Z",
  "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.

[_getdomains] API [_getdomain] API [_getclusters] API [_getcluster] API [_updatecluster] API [_gettask] API [_retrytask] API

13. Get Cluster Network Configuration Query Criteria

This API is used to get supported criteria for query on cluster network configuration.

13.1. Prerequisites API

The following data is required:

  • ID of the Cluster

13.2. Steps API

  • Invoke the Get Cluster Network Configuration Query Criteria.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/network/criteria' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/network/criteria HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 525

{
  "elements" : [ {
    "name" : "VCENTER_NSXT_NETWORK_CONFIG",
    "description" : "Cluster networking configuration at vCenter and NSX"
  }, {
    "name" : "VCENTER_NETWORK_CONFIG_SUMMARY",
    "description" : "Cluster network configuration summary at the vCenter"
  }, {
    "name" : "NSX_NETWORK_CONFIG_PREVIEW_POST_DRIFT",
    "description" : "Preview of cluster network configuration at NSX after cluster auto reconfigures with the Sub-TNP feature - grouping host transport nodes of the same NSX configuration"
  } ]
}

[_getclusternetworkconfiguration] API [_getclusternetworkconfigurationqueryresponse] API

14. Query Cluster Network Configuration using criteria

This API is used to initiate a network configuration query on the cluster.

14.1. Prerequisites API

The following data is required:

  • ID of the Cluster

  • Query Criteria

14.2. Steps API

  • Invoke the API to initiate a query based on criteria on the cluster.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/network/queries' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "VCENTER_NSXT_NETWORK_CONFIG"
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/network/queries HTTP/1.1
Content-Type: application/json
Content-Length: 44
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "VCENTER_NSXT_NETWORK_CONFIG"
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/network/queries/5c108d4a-b4db-48f3-86d0-4521419338f0
Content-Type: application/json
Content-Length: 183

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "queryId" : "5c108d4a-b4db-48f3-86d0-4521419338f0",
    "completed" : false,
    "processing" : true,
    "failure" : false
  }
}
  • Poll the query response until "status" is not "IN_PROGRESS" using the "id" from the previous response.

Tip : Refer to: Get Cluster Network Configuration Query Response.

  • If the "status" is "SUCCESSFUL", the query response is completed successfully.

[_getclusternetworkconfigurationcriteria] API [_getclusternetworkconfigurationqueryresponse] API

15. Get Cluster Network Configuration Query Response

API is used to get response for submitted query for network configuration on a cluster.

15.1. Prerequisites API

The following data is required:

  • ID of the Cluster

  • ID of the Query

15.2. Steps API

  • Invoke the API to get the response for submitted query for network configuration on a cluster.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/e46fa08f-9053-4ac0-b6ed-af438381faae/network/queries/610cf079-0342-453b-a565-8204cd816b66' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/e46fa08f-9053-4ac0-b6ed-af438381faae/network/queries/610cf079-0342-453b-a565-8204cd816b66 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4060

{
  "queryInfo" : {
    "status" : "COMPLETED",
    "queryId" : "72a1da56-0c99-47d1-aaf0-7c3597d8a055",
    "completed" : true,
    "processing" : false,
    "failure" : false
  },
  "result" : {
    "elements" : [ {
      "hostDetails" : [ {
        "id" : "3a20bfcb-cd69-4d26-99ae-54a488ff8aee",
        "hostName" : "sfo01-m01-esx01",
        "hostNetworkConfiguration" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "7fb60d2c-e9a9-46ce-92d1-47d360030ef7",
        "hostName" : "sfo01-m01-esx02",
        "hostNetworkConfiguration" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "b198ebc7-2261-4301-8430-0a826d798218",
        "hostName" : "sfo01-m01-esx03",
        "hostNetworkConfiguration" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          } ]
        }
      } ],
      "vdsConfigurations" : [ {
        "name" : "sfo-w01-cl01-vds01",
        "portGroups" : [ {
          "name" : "sfo-w01-cl01-vds01-pg-management",
          "transportType" : "MANAGEMENT",
          "activeUplinks" : [ "uplink1", "uplink2" ],
          "standByUplinks" : [ ],
          "policy" : "loadbalance_loadbased",
          "vlanId" : 0
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vsan",
          "transportType" : "VSAN",
          "activeUplinks" : [ "uplink1", "uplink2" ],
          "standByUplinks" : [ ],
          "policy" : "loadbalance_loadbased",
          "vlanId" : 0
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vmotion",
          "transportType" : "VMOTION",
          "activeUplinks" : [ "uplink1", "uplink2" ],
          "standByUplinks" : [ ],
          "policy" : "loadbalance_loadbased",
          "vlanId" : 0
        } ],
        "nsxtSwitchConfig" : {
          "transportZones" : [ {
            "name" : "vlan-tz-sfo-w01-cl01-vds01",
            "transportType" : "VLAN"
          }, {
            "name" : "overlay-tz-nsxt-vip.vrack.vsphere.local",
            "transportType" : "OVERLAY"
          } ]
        },
        "uplinks" : [ "uplink2", "uplink1" ]
      } ],
      "ipAddressPools" : [ {
        "name" : "static-ip-pool-1",
        "description" : "Static ip pool 1",
        "availableIpAddresses" : 185,
        "totalIpAddresses" : 191,
        "staticSubnets" : [ {
          "ipAddressPoolRanges" : [ {
            "start" : "10.0.1.10",
            "end" : "10.0.1.200"
          } ],
          "gateway" : "10.0.1.253",
          "cidr" : "10.0.1.0/24"
        } ]
      } ],
      "uplinkProfiles" : [ {
        "name" : "vcenter-1-new-vi-cluster1-sfo-w01-cl01-vds01",
        "teamings" : [ {
          "policy" : "LOADBALANCE_SRCID",
          "activeUplinks" : [ "uplink-2", "uplink-1" ],
          "standByUplinks" : [ ]
        } ],
        "transportVlan" : 0,
        "supportedTeamingPolicies" : null
      } ],
      "networkProfiles" : [ {
        "isDefault" : true,
        "nsxtHostSwitchConfigs" : [ {
          "vdsName" : "sfo-w01-cl01-vds01",
          "uplinkProfileName" : "vcenter-1-new-vi-cluster1-sfo-w01-cl01-vds01",
          "ipAddressPoolName" : "static-ip-pool-1",
          "vdsUplinkToNsxUplink" : [ {
            "vdsUplinkName" : "uplink2",
            "nsxUplinkName" : "uplink-2"
          }, {
            "vdsUplinkName" : "uplink1",
            "nsxUplinkName" : "uplink-1"
          } ]
        } ]
      } ]
    } ]
  }
}

[_getclusternetworkconfigurationcriteria] API [_getclusternetworkconfiguration] API
Last updated 2024-06-21 01:22:12 -0700

Operations
POST
Add Datastore To Cluster
Mount a datastore to a cluster
PUT
Assign Tags To Cluster
Assign Tags to Cluster
POST
Create Cluster
Create a cluster and add to an existing domain
DELETE
Delete Cluster
Delete a cluster from a domain if it has been previously initialized for deletion
GET
Get Cluster
Get a cluster by its ID
GET
Get Cluster Create Validation
Get the status of the validations for cluster deployment
GET
Get Cluster Datastores
Get the list of all datastores associated with the cluster.
POST
Get Cluster Network Configuration
Get cluster network configuration
GET
Get Cluster Network Configuration Criteria
Get cluster network configuration criteria
GET
Get Cluster Network Configuration Query Response
Get cluster network configuration query response
GET
Get Clusters
Retrieve a list of clusters
GET
Get Cluster Tag Manager Url
Get Cluster Tag Manager Url
GET
Get Cluster Update Validation
Get the status of the validations for cluster updates
GET
Get Datastore Criterion 1
Get a criterion to query for datastore
GET
Get Datastore Query Response 1
Get Datastore query response
GET
Get Datastores Criteria 1
Get all datastore criteria
GET
Get Host Criteria
Get all host criteria
GET
Get Host Criterion
Get a criterion to query for host
GET
Get Host Query Response 1
Get query response
GET
Get Tag Assignable For Cluster
Get tags assignable to a cluster
GET
Get Tags Assigned To Cluster
Get tags assigned to a cluster by its ID
GET
Get Tags Assigned To Clusters
Get tags assigned to clusters
GET
Get Vdses
Get the list of VDSes of a cluster.
POST
Import Vds To Inventory
Import Vds to inventory for the given cluster
POST
Post Datastore Query 1
Post a datastore query
POST
Post Host Query
Post a host query
DELETE
Remove Datastore From Cluster
Unmount a datastore from a cluster
DELETE
Remove Tags From Cluster
Remove tags from a cluster
PATCH
Update Cluster
Update a Cluster by adding or removing Hosts, Stretching a standard vSAN cluster, Unstretching a stretched cluster or by marking for deletion
POST
Validate Cluster Creation Spec
Perform validation of the ClusterCreationSpec specification
POST
Validate Cluster Update Spec
Perform validation of the ClusterUpdateSpec specification
POST
Validate Vsan Remote Datastore Mount Spec
Perform validation of the DatastoreMountSpec specification
POST
Validate Vsan Remote Datastore Spec Deprecated
Perform validation of the DatastoreMountSpec specification