Skip to content
Azure

Azure

Connect Azure with one Cloud Shell command, request GPU quota, and verify training and recovery.

Connect Azure to train on 1, 2, 4 or 8 NVIDIA GPUs of one VM in your subscription. Setup takes GPU quota, one command in Azure Cloud Shell, and one paste into Tensorant. Tensorant then creates a VM for each run in a resource group of its own, transfers data through your storage connection, and deletes the VM after verifying the adapter.

Your own GPU accounts come with the Own compute subscription. An Azure account connected before Own compute existed keeps working without it until 31 Dec 2026: see Your own accounts. Azure bills the GPU time in your account, and each training run's training-token fee comes from your Tensorant credits.

Connect custom S3 storage separately, or keep existing RunPod network storage. An Azure subscription does not make Azure Blob Storage an S3 endpoint. Managed inference, publishing and managed experiment evaluation continue to require RunPod and a RunPod network volume.

1. Request GPU quota

Use an Azure public-cloud subscription. Sovereign-cloud subscriptions are not supported.

Tensorant offers these sizes, each with whole GPUs:

Size GPUs vCPUs
Standard_NC24ads_A100_v4 1 × NVIDIA A100, 80 GB 24
Standard_NC48ads_A100_v4 2 × NVIDIA A100, 80 GB each 48
Standard_NC96ads_A100_v4 4 × NVIDIA A100, 80 GB each 96
Standard_NC40ads_H100_v5 1 × NVIDIA H100 NVL, 94 GB 40
Standard_NC80adis_H100_v5 2 × NVIDIA H100 NVL, 94 GB each 80
Standard_ND96asr_v4 8 × NVIDIA A100, 40 GB each 96
Standard_ND96amsr_A100_v4 8 × NVIDIA A100, 80 GB each 96
Standard_ND96isr_H100_v5 8 × NVIDIA H100, 80 GB each 96
Standard_ND96isr_H200_v5 8 × NVIDIA H200, 141 GB each 96

Training GPU shows the sizes with the run's Number of GPUs, and the price of the whole VM.

Choose a region that offers the size you want and note its name in lower case, such as eastus, not the display name "East US". In Subscriptions → your subscription → Usage + quotas, check both Total Regional vCPUs and the size's family quota in that region (such as the NCads A100 v4 or NCads H100 v5 family). Request enough vCPUs for the whole VM and any other usage. New subscriptions often start at 0. Quota approval does not reserve GPU capacity. Azure vCPU quotas

If Microsoft.Compute and Microsoft.Network are not registered under Subscriptions → Resource providers, ask your subscription administrator to register them.

2. Run the setup command

In Tensorant, open your name at the foot of the sidebar, then Settings → Connections under Organization, and choose Connect Azure. Enter the Region for training. The dialog shows the command for that region.

Open Azure Cloud Shell in Bash, signed in to the subscription you will train in, and run the command. For eastus it reads:

bash
LOCATION=eastus
GROUP=tensorant-training
SUBSCRIPTION=$(az account show --query id --output tsv)
az group create --name $GROUP --location $LOCATION --output none &&
az ad sp create-for-rbac --name tensorant-training --role Contributor \
  --scopes /subscriptions/$SUBSCRIPTION/resourceGroups/$GROUP --output json |
jq --arg subscription "$SUBSCRIPTION" --arg group "$GROUP" --arg location "$LOCATION" \
  '{provider: "azure", tenant_id: .tenant, client_id: .appId, client_secret: .password, subscription_id: $subscription, resource_group: $group, location: $location}'

It creates:

  • the resource group tensorant-training in your region;
  • an app registration and service principal named tensorant-training, with the built-in Contributor role on that resource group only.

It prints one JSON object with the IDs and a new client secret. Run it as someone who can create resource groups, app registrations and role assignments, such as a subscription Owner. If Cloud Shell uses another subscription, switch first with az account set --subscription SUBSCRIPTION_ID.

Contributor lets Tensorant create, change and delete anything inside tensorant-training, including VMs of any size, and nothing outside it. Keep the group for Tensorant only. If your policies need narrower permissions, see Advanced.

The generated secret defaults to one year of validity; record its expiry in Microsoft Entra ID. Use the existing application's client ID for secret rotation, so Tensorant keeps the same identity and access to retained VMs. The app's display name alone is not its unique identity. See Azure's service-principal command.

3. Connect in Tensorant

Back in the Connect Azure dialog, paste everything the command printed into Paste what it printed, and choose Connect Azure. Tensorant reads the JSON, checks that it can reach the resource group, and loads the GPU sizes with current prices. It does not start a VM or check your quota.

Allow a few minutes after running the command: a new role assignment can take that long to reach Azure's sign-in. If the check fails right away, wait and try again.

To update the connection later, choose Update connection in the provider's ... menu and paste new output. Your Advanced settings stay filled in.

What Tensorant sets up

Unless you choose otherwise under Advanced, each training VM gets:

Part Default
Image Microsoft's Ubuntu-HPC 24.04 image, with NVIDIA driver 580, CUDA 13, Docker and the NVIDIA Container Toolkit
Security Trusted Launch with Secure Boot off, so the GPU driver always loads
Network A virtual network tensorant-REGION with subnet training and a network security group that allows no inbound traffic, created in tensorant-training on the first launch
Address A public IP for downloads, deleted with the VM. No inbound port is open.
Login No SSH key unless you give one; the VM's user is tensorant
Disk A Premium SSD OS disk of at least 64 GB, deleted with the VM

The VM receives your storage connection's keys to move training data and results. Give the storage connection keys limited to its bucket.

4. Verify a training trial

  1. Connect storage, then create a project and a small dataset version.
  2. In Configure a run, choose Training provider → Azure, the Number of GPUs and a Training GPU with enough memory.
  3. Choose Training trial · a small sample and set a Price limit ($/hour). Allow 10 to 20 minutes for the first image and model downloads.
  4. Save the draft, review the cost confirmation and launch. Azure starts charging for the VM.
  5. Confirm training and adapter verification succeed. Then check GPU released in Tensorant, and that the run's VM, OS disk, network interface and public IP are gone from tensorant-training.

The estimate includes the on-demand VM and its Premium SSD OS disk, using the public monthly disk price divided by 730. Public IP, transfer, taxes and discounts are outside that estimate. See training runs for the trial flow and launch limits.

Recovery, cleanup and secret rotation

On a timeout or failed export, Tensorant requests deallocation and keeps the OS disk. GPU compute billing stops when Azure confirms Stopped (deallocated). Stopped without deallocation can still incur compute charges. The managed disk and public IP continue to bill. Azure VM states and billing

Open Recover your adapter on the run. To retrieve the completed archive yourself, you need a way into the VM:

  1. Start the retained VM in the Azure portal. Starting resumes compute billing; it does not resume training.
  2. If you gave no SSH key, open the VM, then Help → Reset password, choose Reset SSH public key, enter the user tensorant and your public key.
  3. The network security group tensorant-REGION allows no inbound traffic. Add an inbound rule for TCP port 22 from your own IP address, or connect through Azure Bastion.
  4. Connect with ssh tensorant@PUBLIC_IP. With custom S3, download /var/lib/tensorant/data/adapter.zip; with RunPod network storage, /var/lib/tensorant/data/runs/RUN_ID/adapter.zip. The host's data directory is /workspace/data in the container.
  5. Remove the inbound rule, and deallocate the VM while you finish.

Select the archive on the run and choose Verify and recover. See failure and recovery.

After recovery succeeds, or when you cancel and discard the output, Tensorant deletes its VM with the OS disk, network interface and public IP created for it. It refuses automatic deletion if the VM's disk or network interface was replaced, or extra disks were attached, to avoid deleting unrelated data. It leaves the resource group, its network, and any subnet or image of yours in place. Wait for confirmed cleanup before removing the connection or changing accounts.

To rotate the secret without interrupting access to existing VMs, add a credential to the existing service principal. Replace the IDs and use the connection's current group and region:

bash
TENSORANT_CLIENT_ID=EXISTING_APPLICATION_CLIENT_ID
TENSORANT_SUBSCRIPTION_ID=SUBSCRIPTION_ID
TENSORANT_GROUP=tensorant-training
TENSORANT_LOCATION=eastus
az ad sp credential reset --id "$TENSORANT_CLIENT_ID" --append \
  --display-name tensorant-rotation --output json |
jq --arg subscription "$TENSORANT_SUBSCRIPTION_ID" --arg group "$TENSORANT_GROUP" --arg location "$TENSORANT_LOCATION" \
  '{provider: "azure", tenant_id: .tenant, client_id: .appId, client_secret: .password, subscription_id: $subscription, resource_group: $group, location: $location}'

Paste that JSON into Update connection, save, and check the connection before deleting the old credential in Entra ID. Protect the output: it contains the new secret. --append preserves existing credentials; omitting it resets them. See Azure credential rotation.

Advanced: your own network, image or roles

Under Advanced: your own network, image or access in the connection dialog, you can replace any default. Leave a field empty to keep Tensorant's default.

Your own subnet

Enter the full Subnet resource ID, ending in /virtualNetworks/VNET/subnets/SUBNET, in the same subscription and region. VMs then get a private network interface with no public IP, so the subnet needs its own outbound internet access, such as a NAT gateway, with DNS and outbound HTTPS to container registries, model downloads and your S3 service. If the subnet is outside tensorant-training, also give the service principal Microsoft.Network/virtualNetworks/subnets/read and Microsoft.Network/virtualNetworks/subnets/join/action on it. Azure NAT gateway setup

bash
az network vnet subnet show \
  --resource-group NETWORK_RESOURCE_GROUP \
  --vnet-name VNET_NAME --name SUBNET_NAME \
  --query id --output tsv

Your own image

Enter a managed image resource ID or a specific Azure Compute Gallery image-version ID as GPU image resource ID. A Marketplace URN, VM ID, disk ID, image-definition ID without a version, or latest is not accepted. VMs from your image use Standard security, without Trusted Launch.

Requirement What to prepare
Operating system Generalized Linux, x64, Generation 2
Security compatibility A Standard-security image; do not require Trusted Launch or Confidential VM settings
Disks One OS disk, at most 1023 GiB, without inherited data disks
Licensing No Marketplace purchase plan
Provisioning cloud-init enabled, Python 3 and working Azure provisioning
GPU runtime Docker, NVIDIA Container Toolkit and a working driver 580 or newer for CUDA 13
Region Managed image in the training region, or gallery version replicated there

If the image is outside tensorant-training, give the service principal Microsoft.Compute/images/read on a managed image, or Microsoft.Compute/galleries/images/read and Microsoft.Compute/galleries/images/versions/read on a gallery image definition.

To build one, create a temporary builder VM from an official Ubuntu 24.04 x64 Gen2 image with Standard security and a supported GPU size. Install the driver with Microsoft's N-series Linux driver instructions (version 580 or newer), then Docker Engine and the NVIDIA Container Toolkit, and test:

bash
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
nvidia-smi --query-gpu=name,driver_version --format=csv,noheader
sudo docker run --rm --gpus all ubuntu:24.04 nvidia-smi

Remove build keys, credentials and history, then deprovision on the VM and capture from Cloud Shell:

bash
sudo cloud-init clean --logs --seed
sudo waagent -deprovision+user
bash
az vm deallocate --resource-group IMAGE_RESOURCE_GROUP --name BUILDER_VM
az vm generalize --resource-group IMAGE_RESOURCE_GROUP --name BUILDER_VM
az image create --resource-group IMAGE_RESOURCE_GROUP \
  --name tensorant-gpu-v1 --source BUILDER_VM --hyper-v-generation V2
az image show --resource-group IMAGE_RESOURCE_GROUP \
  --name tensorant-gpu-v1 --query id --output tsv

Use the returned ID, then delete the builder. Generalizing a Linux VM, capturing a Gen2 managed image, Compute Gallery image versions

Your own SSH key

Enter an Ed25519 or RSA (at least 2048 bits) public key, the whole single line starting ssh-ed25519 or ssh-rsa, as SSH public key. Keep the private key yourself. Create one with ssh-keygen -t ed25519 -f ~/.ssh/tensorant-azure and use the contents of tensorant-azure.pub.

Narrow roles instead of Contributor

If your policies don't allow Contributor on a resource group, create the service principal yourself and give it custom roles. These roles don't let Tensorant create its network, so use them together with your own subnet.

  1. In Microsoft Entra ID → App registrations, register an app, then create a client secret under Certificates & secrets and copy its Value.
  2. Save this role as tensorant-training-role.json, replacing SUBSCRIPTION_ID, create it with az role definition create --role-definition tensorant-training-role.json, and assign it to the app's service principal on a dedicated training resource group.
json
{
  "Name": "Tensorant Training Resources",
  "IsCustom": true,
  "Description": "Manage GPU training VMs and their disks and private interfaces.",
  "Actions": [
    "Microsoft.Compute/virtualMachines/read",
    "Microsoft.Compute/virtualMachines/write",
    "Microsoft.Compute/virtualMachines/delete",
    "Microsoft.Compute/virtualMachines/instanceView/read",
    "Microsoft.Compute/virtualMachines/start/action",
    "Microsoft.Compute/virtualMachines/deallocate/action",
    "Microsoft.Compute/disks/read",
    "Microsoft.Compute/disks/write",
    "Microsoft.Compute/disks/delete",
    "Microsoft.Network/networkInterfaces/read",
    "Microsoft.Network/networkInterfaces/write",
    "Microsoft.Network/networkInterfaces/delete",
    "Microsoft.Network/networkInterfaces/join/action"
  ],
  "NotActions": [],
  "DataActions": [],
  "NotDataActions": [],
  "AssignableScopes": ["/subscriptions/SUBSCRIPTION_ID"]
}
  1. Add the subnet and image read roles described above where they apply. Optionally give Microsoft.Compute/skus/read on the subscription: Tensorant then lists only the sizes your subscription may use in the region. Without it, Tensorant lists every size and Azure refuses one the region lacks at launch.
  2. In the connection dialog, paste a JSON object in the same shape the command prints:
json
{"provider": "azure", "tenant_id": "TENANT_ID", "client_id": "APPLICATION_CLIENT_ID", "client_secret": "SECRET_VALUE",
 "subscription_id": "SUBSCRIPTION_ID", "resource_group": "RESOURCE_GROUP", "location": "eastus"}

Allow role assignments time to propagate before checking the connection. Azure custom roles, compute actions, network actions

Troubleshooting

Symptom Check
The setup command fails with an authorization error Run it as a subscription Owner, or someone who can create app registrations and role assignments.
az group create reports an invalid location tensorant-training already exists in another region. Use that region, or delete the empty group first.
The connection check fails just after the command Wait a few minutes for the role assignment to propagate, then try again. Check that Cloud Shell used the right subscription.
Authentication fails later The secret has expired or was replaced. Add a secret to the existing application and update the connection using the rotation steps above.
Launch fails with HTTP 409 (OperationNotAllowed) Your vCPU quota is too low. Raise the regional and family quotas in Usage + quotas.
Launch fails with HTTP 409 (SkuNotAvailable) The size isn't offered in this region or to your subscription. Choose another size or another region.
"Azure could not create the training network" An Azure Policy may block virtual networks or public IPs in the group. Ask your administrator, or use your own subnet.
"Azure is still creating the training network" Wait a minute and launch again.
Host validation or container startup fails With your own image, verify driver 580+, Docker, the toolkit and cloud-init on the selected GPU.
Preparing never reaches training With your own subnet, check DNS, NAT and firewall access to container, model and storage hosts.
"Azure VM attachments changed" Someone replaced the VM's disk or network interface. Restore them, or delete the VM in Azure yourself, then retry release.
GPU release fails Check the secret is valid and the Azure activity log, then use Retry the GPU release.

Need a hand? Visit troubleshooting