Run the following command to create the virtual machine with the Azure command-line interface.

az vm create --resource-group $GROUP --location $LOCATION --name $VM --image $IMAGE --size $SIZE --storage-sku Premium_LRS --os-disk-size-gb $DISK_SIZE --os-disk-caching ReadOnly --data-disk-sizes-gb $EXTRA_DISK_SIZE --data-disk-caching ReadOnly --authentication-type ssh --admin-username azureuser --ssh-key-name $SSH_KEY --nsg $NSG --custom-data $CUSTOM_DATA

See below for a description of each parameter.

GROUP

The name of the resource group created in Creating the Azure storage account.

LOCATION

The location of the resource group created in Creating the Azure storage account.

VM

The name of the Virtual Machine that will be created.

IMAGE

The name of the VHD image previously uploaded in Creating the Azure storage account.

SIZE

One of the following:

  • Standard_D4s_v3
  • Standard_D4ds_v5
  • Standard_D4ds_v4
  • Standard_D4as_v4
  • Standard_F4s

DISK_SIZE

1024 GiB or more. For example:

--os-disk-size-gb 1024

EXTRA_DISK_SIZE

15 GiB or more. For example:

--data-disk-size-gb 15

SSH_KEY

The name of the SSH key pair created in Creating the SSH key for Azure.

NSG

The network security group created in Creating the Azure network rules.

CUSTOM_DATA

The path of a local text file with the following contents.

#!/bin/bash
/opt/entrust/scripts/configure-os.sh

This code will allow the sysadmin Entrust PKI Hub administrator to log in using the SSH key.