Machine types
Machine types¶
Machine types are a DHI-managed abstraction over Azure virtual machine families. Instead of specifying a raw dhi.platform/vmsize label, you can use the nodeSize field in your job request to select a well-known machine type by its DHI name. The platform then automatically injects the correct Azure VM family label and validates that the requested resources (CPU, memory, storage) fit within the machine type's limits.
Discovering available machine types¶
Use the configuration endpoint to list all machine types that are available in your environment:
GET /api/process/job/configuration
A sample response:
{
"data": [
{
"dHIName": "VM-S-5",
"azFamilyName": "Standard_D8s_v5",
"maxCPU": 8.0,
"maxMemoryMb": 32768,
"maxStorageGb": 300
},
{
"dHIName": "VM-H-5",
"azFamilyName": "Standard_D16s_v5",
"maxCPU": 16.0,
"maxMemoryMb": 65536,
"maxStorageGb": 600
},
{
"dHIName": "VM-H-40",
"azFamilyName": "Standard_D48s_v5",
"maxCPU": 48.0,
"maxMemoryMb": 196608,
"maxStorageGb": 2048
}
]
}
Each machine type has the following properties:
| Field | Description |
|---|---|
dHIName |
DHI user-facing name to use in the nodeSize field of a job request |
azFamilyName |
Azure VM family name (informational, injected automatically as dhi.platform/vmsize label) |
maxCPU |
Maximum allocatable CPU cores across all containers |
maxMemoryMb |
Maximum allocatable memory in megabytes across all containers |
maxStorageGb |
Maximum allocatable ephemeral storage in gigabytes |
Using a machine type in a job request¶
Set the nodeSize field in the ContainerRuntimeSpec to the dHIName of the desired machine type:
{
"runtime": {
"type": "ContainerRuntimeSpec",
"nodeSize": "VM-S-5",
"containers": [
{
"image": "busybox",
"command": ["/bin/sh", "-c", "echo hello"],
"cpuCores": 4.0,
"memoryMB": 16384
}
]
}
}
When nodeSize is specified:
- The service looks up the machine type by its DHI name.
- The corresponding Azure VM family label (
dhi.platform/vmsize=<azFamilyName>) is automatically added torequiredLabels, overriding any conflicting value already present. - The total CPU and memory requested across all containers, as well as any storage request, are validated against the machine type limits. If any limit is exceeded, the request is rejected with a validation error.
If the provided nodeSize value is not a recognised machine type name, the job submission will fail with a validation error.
Resource validation¶
When a nodeSize is set, the following checks are performed before the job is accepted:
- CPU: the sum of
cpuCoresacross all containers must not exceedmaxCPU. - Memory: the sum of
memoryMBacross all containers must not exceedmaxMemoryMb. - Storage: if a
StorageRequestis present, the requested size in GB must not exceedmaxStorageGb.
Relationship to labels and taints¶
Using nodeSize is the preferred way to pin a job to a specific VM family. It is equivalent to manually adding the dhi.platform/vmsize label via requiredLabels, but it additionally enforces resource limits and decouples your code from the underlying Azure VM naming. See Labels and taints for low-level control of node selection.