This article applies to VMware Tanzu Application Service (TAS) for VMs and VMware Tanzu Kubernetes Grid Integrated Edition (TKGI 1.15.x and above).
In some cases, there is a need to create a custom disk_types because the current predefined templates are not the configuration that is required. For example, to create 1.5 TB of disk for the VM.
Bosh created vms
The following pre-defined disk_type templates available currently in Bosh. The following list is a snapshot taken at the time of writing this article.
You should execute step 3 below to retrieve the list from your system:
RESPONSE BODY:
{
"disk_types": [
{
"name": "1024",
"builtin": true,
"size_mb": 1024
},
{
"name": "2048",
"builtin": true,
"size_mb": 2048
},
{
"name": "5120",
"builtin": true,
"size_mb": 5120
},
{
"name": "10240",
"builtin": true,
"size_mb": 10240
},
{
"name": "20480",
"builtin": true,
"size_mb": 20480
},
{
"name": "30720",
"builtin": true,
"size_mb": 30720
},
{
"name": "51200",
"builtin": true,
"size_mb": 51200
},
{
"name": "76800",
"builtin": true,
"size_mb": 76800
},
{
"name": "102400",
"builtin": true,
"size_mb": 102400
},
{
"name": "153600",
"builtin": true,
"size_mb": 153600
},
{
"name": "204800",
"builtin": true,
"size_mb": 204800
},
{
"name": "307200",
"builtin": true,
"size_mb": 307200
},
{
"name": "512000",
"builtin": true,
"size_mb": 512000
},
{
"name": "768000",
"builtin": true,
"size_mb": 768000
},
{
"name": "1048576",
"builtin": true,
"size_mb": 1048576
},
{
"name": "2097152",
"builtin": true,
"size_mb": 2097152
},
{
"name": "3145728",
"builtin": true,
"size_mb": 3145728
},
{
"name": "4194304",
"builtin": true,
"size_mb": 4194304
},
{
"name": "6291456",
"builtin": true,
"size_mb": 6291456
},
{
"name": "8388608",
"builtin": true,
"size_mb": 8388608
},
{
"name": "10485760",
"builtin": true,
"size_mb": 10485760
},
{
"name": "12582912",
"builtin": true,
"size_mb": 12582912
},
{
"name": "14680064",
"builtin": true,
"size_mb": 14680064
},
{
"name": "16777216",
"builtin": true,
"size_mb": 16777216
},
{
"name": "20971520",
"builtin": true,
"size_mb": 20971520
},
{
"name": "25165824",
"builtin": true,
"size_mb": 25165824
},
{
"name": "29360128",
"builtin": true,
"size_mb": 29360128
},
{
"name": "33554432",
"builtin": true,
"size_mb": 33554432
}
Steps:
1. SSH into Operations Manager VM.
2. Use the UAAC command to target your Operations Manager and generate a token:
uaac target https://<OpsMan-Hostname>/uaa
uaac token owner get
In the case of SAML integration, please follow the procedure below:
uaac token sso get
3. Use the following command to retrieve the existing pre-loaded disk_types:
uaac curl https://OPSMAN_FQDN/api/v0/disk_types -k
4. Store the output of the above command, which is only the value of RESPONSE BODY and not anything else as shown below:
RESPONSE BODY:
{
"disk_types": [
{
"name": "1024",
"builtin": true,
"size_mb": 1024
},
.............
.............
]
}
5. Add custom vm_type with the desired specification at the bottom of the above output and use it with the following command:
uaac curl https://OPSMAN_FQDN/api/v0/disk_types -X PUT -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -k -d '{
"disk_types": [
...........
{
"name": "custom_1-5",
"size_mb": 1572864
},
............
]
}
Once you run the command you should receive a 200 Ok responce. Then, to confirm the type was added successfully, go to TAS tile --> Resource Config --> Check Disk types available in the list.
When creating custom disk types, you can modify its name to describe the type, for example "name": "custom_1-5". The name shown in Resource config by default is Integer value and name 1 TB - custom_1-5