To create a vSphere Storage Profile that supports First Class Disk (FCD) storage, you make a POST request with a region ID and you include first class as the disk type property. Optional request body input includes a vSphere storage policy and a vSphere datastore.

Prerequisites

Procedure

  1. Assign the cloud account ID variable.
    vsphere_cloud_account_id='<your_cloud_account_id>'
  2. Look up region IDs associated with the cloud account and in the external region ID Datacenter:datacenter-3.
    curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/regions/?apiVersion=$api_version&"'$filter'"=externalRegionId%20eq%20'Datacenter:datacenter-3'%20and%20cloudAccountId%20eq%20'"$vsphere_cloud_account_id"'"  | jq "."
  3. Examine the response to find the ID for the region that you want.
  4. Assign the region ID variable.
    vsphere_region_id='<your_region_id>'
  5. (Optional) If using a vSphere storage policy, list all vSphere storage policies. If using a default storage policy, skip this step.
    curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/fabric-vsphere-storage-policies/?apiVersion=$api_version" | jq "."
    Examine the response and assign the vSphere storage policy ID.
    vsphere_storage_policy_id='<your_vsphere_storage_policy_id>'
  6. (Optional) If using a vSphere datastore, list all vSphere datastores. If provisioning any datastore or cluster, skip this step.
    curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/fabric-vsphere-datastores/?apiVersion=$api_version" | jq "."
    Examine the response and assign the vSphere datastore ID.
    vsphere_datastore_id='<your_vsphere_datastore_id>'
  7. Create a vSphere Storage Profile with the FCD property.
    curl -X POST \ 
      $url/iaas/api/storage-profiles?apiVersion=$api_version \ 
      -H 'Content-Type: application/json' \ 
      -H "Authorization: Bearer $access_token" \ 
      -d '{ 
        "name": "<your_vsphere_storage_profile_with_FCD>",
        "description": "Example First Class Disk vSphere Storage Profile",
        "defaultItem": true,
        "provisioningType": "thin",
        "diskType": "firstClass",
        "regionId": "'$vsphere_region_id'",
        "tags": [ { "key": "type", "value": "fcd" } ]
        }' | jq "."
  8. Examine the response.
    • "defaultItem": true indicates that this storage profile is the default for the region.
    • Tags help you to locate, manage, and work with the infrastructure resources.

Example: Create vSphere Storage Profile with FCD storage

Assign the required variables including the cloud account ID for a vSphere cloud account.
Note: If your organization uses an API service that is hosted outside of the United States, your URL variable must include a country abbreviation. See Regional Endpoints for VMware Aria Automation APIs.
$ url='https://api.mgmt.cloud.vmware.com'
$ api_version='2022-04-02'
$ vsphere_cloud_account_id='683c647b-413d-4673-a236-08b3694cd652'

Look up region IDs associated with the cloud account and in the external region ID Datacenter:datacenter-3.

$ curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/regions/?apiVersion=$api_version&"'$filter'"=externalRegionId%20eq%20'Datacenter:datacenter-10'%20and%20cloudAccountId%20eq%20'"$vsphere_cloud_account_id"'" | jq "."

A snippet of the response shows the region ID.

...            
      "externalRegionId": "Datacenter:datacenter-3",
      "name": "Example external region name",
      "cloudAccountId": "683c647b-413d-4673-a236-08b3694cd652",
      "id": "0f182edc-1155-4df1-a53a-2c46be7bc373",
...

Assign the vSphere region ID.

$ vsphere_region_id='0f182edc-1155-4df1-a53a-2c46be7bc373'

If using a vSphere storage policy, perform the following steps.

  1. List all vSphere storage policies.
    $ curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/fabric-vsphere-storage-policies/?apiVersion=$api_version" | jq "."

    A snippet of the response shows the storage policy.

    ...
          "externalId": "f31f2442-8247-4517-87c2-8d69d7a6c696",
          "name": "Management Storage Policy - Stretched",
          "description": "Management Storage policy used for VMC stretched cluster",
          "id": "4aad51f0b02b5275572d264d28490",
    ...
  2. Examine the response to assign the vSphere storage policy ID.
    $ vsphere_storage_policy_id='4aad51f0b02b5275572d264d28490'

If provisioning a specific datastore or cluster, perform the following steps.

  1. List all vSphere datastores.
    $ curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/fabric-vsphere-datastores/?apiVersion=$api_version" | jq "."

    A snippet of the response shows the datastore.

    ...
          "externalId": "WorkloadDatastore",
          "name": "WorkloadDatastore",
          "id": "c4f1dd4741d05e75572d264dcc590",
          "createdAt": "2022-04-02",
          "updatedAt": "2022-04-02",
    ...
  2. Examine the response to assign the vSphere datastore ID.
    $ vsphere_datastore_id='c4f1dd4741d05e75572d264dcc590'

Create a vSphere Storage Profile named vsphere-storage-profile-with-FCD.

$ curl -X POST \
  $url/iaas/api/storage-profiles?apiVersion=$api_version \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $access_token" \
  -d '{
    "name": "vsphere-storage-profile-with-FCD",
    "description": "Example First Class Disk vSphere Storage Profile",
    "defaultItem": true,
    "provisioningType": "thin",
    "diskType": "firstClass",
    "regionId": "'$vsphere_region_id'",
    "tags": [ { "key": "type", "value": "fcd" } ]
}' | jq "."

Included with storage profile ID, a snippet of the response shows the tags that you defined for the storage profile.

{      
  "defaultItem": true,
  "tags": [
    {
      "key": "type",
      "value": "fcd"
    }
  ],
  "provisioningType": "thin",
  "externalRegionId": "Datacenter:datacenter-3",
  "cloudAccountId": "683c647b-413d-4673-a236-08b3694cd652",
  "diskType": "firstClass",
  "name": "vsphere-storage-profile-with-FCD",
  "description": "Example First Class Disk vSphere Storage Profile",
  "id": "6037ac02-83e0-41bb-ba6e-ed5784ae1101",
  "createdAt": "2022-04-02",
  "updatedAt": "2022-04-02", 
...

What to do next

Use the tags to create a First Class Disk. See Create a First Class Disk.