Applies to: ✔️ Linux VMs ✔️ Windows VMs ✔️ Uniform scale sets
This article guides you through how to create an Azure dedicated host to host your virtual machines (VMs) and scale set instances.
The sizes and hardware types available for dedicated hosts vary by region. Refer to the host pricing page to learn more.
Not all Azure VM SKUs, regions and availability zones support ultra disks, for more information about this topic, see Azure ultra disks.
Currently dedicated hosts do not support 'ultra disks' on the following VM sizes: LSv2, M, Mv2, Msv2, Mdsv2, NVv3, NVv4 (ultra disks are supported on these sizes for multi tenant VMs).
The fault domain count of the virtual machine scale set can't exceed the fault domain count of the host group.
Users can not select hardware capabilities like accelerated networking when creating a dedicated host.
Users would not be able to create VMs/VMSS with accelerated networking enabled on a dedicated host.
Create a host group
A host group is a resource that represents a collection of dedicated hosts. You create a host group in a region and an availability zone, and add hosts to it. You can use one or both of the following options with your dedicated hosts to ensure high availability:
Span across multiple availability zones. In this case, you're required to have a host group in each of the zones you wish to use.
Span across multiple fault domains, which are mapped to physical racks.
In either case, you need to provide the fault domain count for your host group. If you don't want to span fault domains in your group, use a fault domain count of 1.
You can also decide to use both availability zones and fault domains.
Enabling ultra disks is a host group level setting and can't be changed after a host group is created.
Select Create a resource in the upper left corner.
Search for Host group and then select Host Groups from the results.
In the Host Groups page, select Create.
Select the subscription you would like to use, and then select Create new to create a new resource group.
Type myDedicatedHostsRG as the Name and then select OK.
For Host group name, type myHostGroup.
For Location, select East US.
For Availability Zone, select 1.
Select Enable Ultra SSD to use ultra disks with supported Virtual Machines.
For Fault domain count, select 2.
Select Automatic placement to automatically assign VMs and scale set instances to an available host in this group.
Select Review + create and then wait for validation.
Once you see the Validation passed message, select Create to create the host group.
It should only take a few moments to create the host group.
Not all host SKUs are available in all regions, and availability zones. You can list host availability, and any offer restrictions before you start provisioning dedicated hosts.
az vm list-skus -l eastus2 -r hostGroups/hosts -o table
You can also verify if a VM series supports ultra disks.
# example value is southeastasia
# example value is Standard_E64s_v3
az vm list-skus --resource-type virtualMachines --location $region --query "[?name=='$vmSize'].locationInfo.zoneDetails.Name" --subscription $subscription
In this example, we'll use az vm host group create to create a host group using both availability zones and fault domains.
az vm host group create \
--name myHostGroup \
-g myDHResourceGroup \
-z 1 \
Add the --automatic-placement true parameter to have your VMs and scale set instances automatically placed on hosts, within a host group. For more information, see Manual vs. automatic placement.
Add the --ultra-ssd-enabled true parameter to enable creation of VMs that can support ultra disks.
Add the -SupportAutomaticPlacement true parameter to have your VMs and scale set instances automatically placed on hosts, within a host group. For more information about this topic, see Manual vs. automatic placement .
Add the -EnableUltraSSD parameter to enable creation of VMs that can support ultra disks.
Create a dedicated host
Now create a dedicated host in the host group. In addition to a name for the host, you're required to provide the SKU for the host. Host SKU captures the supported VM series and the hardware generation for your dedicated host.
Select Create a resource in the upper left corner.
Search for Dedicated host and then select Dedicated hosts from the results.
In the Dedicated Hosts page, select Create.
Select the subscription you would like to use.
Select myDedicatedHostsRG as the Resource group.
In Instance details, type myHost for the Name and select East US for the location.
In Hardware profile, select Standard Es3 family - Type 1 for the Size family, select myHostGroup for the Host group and then select 1 for the Fault domain. Leave the defaults for the rest of the fields.
Leave the Automatically replace host on failure setting Enabled to automatically service heal the host in case of any host level failure.
When you're done, select Review + create and wait for validation.
Once you see the Validation passed message, select Create to create the host.
Use az vm host create to create a host. If you set a fault domain count for your host group, you'll be asked to specify the fault domain for your host.
If you would like to create a VM with ultra disks support, make sure the host group in which the VM will be placed is ultra SSD enabled. Once you've confirmed, create the VM in the same host group. See Deploy an ultra disk for the steps to attach an ultra disk to a VM.
Choose Create a resource in the upper left corner of the Azure portal.
In the search box above the list of Azure Marketplace resources, search for and select the image you want use, then choose Create.
In the Basics tab, under Project details, make sure the correct subscription is selected and then select myDedicatedHostsRG as the Resource group.
Under Instance details, type myVM for the Virtual machine name and choose East US for your Location.
In Availability options select Availability zone, select 1 from the drop-down.
For the size, select Change size. In the list of available sizes, choose one from the Esv3 series, like Standard E2s v3. You may need to clear the filter in order to see all of the available sizes.
Complete the rest of the fields on the Basics tab as needed.
If you want to specify which host to use for your VM, then at the top of the page, select the Advanced tab and in the Host section, select myHostGroup for Host group and myHost for the Host. Otherwise, your VM will automatically be placed on a host with capacity.
Leave the remaining defaults and then select the Review + create button at the bottom of the page.
When you see the message that validation has passed, select Create.
It will take a few minutes for your VM to be deployed.
Create a virtual machine within a dedicated host using az vm create. If you specified an availability zone when creating your host group, you're required to use the same zone when creating the virtual machine. Replace the values like image and host name with your own. If you're creating a Windows VM, remove --generate-ssh-keys to be prompted for a password.
When you deploy a scale set, you specify the host group.
Search for Scale set and select Virtual machine scale sets from the list.
Select Add to create a new scale set.
Complete the fields on the Basics tab as you usually would, but make sure you select a VM size that is from the series you chose for your dedicated host, like Standard E2s v3.
On the Advanced tab, for Spreading algorithm select Max spreading.
In Host group, select the host group from the drop-down. If you recently created the group, it might take a minute to get added to the list.
When you deploy a scale set using az vmss create, you specify the host group using --host-group. In this example, we're deploying the latest Ubuntu LTS image. To deploy a Windows image, replace the value of --image and remove --generate-ssh-keys to be prompted for a password.
If you want to manually choose which host to deploy the scale set to, add --host and the name of the host.
Add an existing VM
You can add an existing VM to a dedicated host, but the VM must first be Stop\Deallocated. Before you move a VM to a dedicated host, make sure that the VM configuration is supported:
The VM size must be in the same size family as the dedicated host. For example, if your dedicated host is DSv3, then the VM size could be Standard_D4s_v3, but it couldn't be a Standard_A4_v2.
The VM needs to be located in same region as the dedicated host.
The VM can't be part of a proximity placement group. Remove the VM from the proximity placement group before moving it to a dedicated host. For more information about this topic, see Move a VM out of a proximity placement group
The VM can't be in an availability set.
If the VM is in an availability zone, it must be the same availability zone as the host group. The availability zone settings for the VM and the host group must match.
You can restart the entire host, meaning that the host's not completely powered off. Because the host will be restarted, the underlying VMs will also be restarted. The host will remain on the same underlying physical hardware as it restarts and both the host ID and asset ID will remain the same after the restart. The host SKU will also remain the same after the restart.
az vm host restart --resource-group myResourceGroup --host-group myHostGroup --name myDedicatedHost
To view the status of the restart, you can use the az vm host get-instance-view command. The displayStatus will be set to Host undergoing restart during the restart. Once the restart has completed, the displayStatus will return to Host available.
az vm host get-instance-view --resource-group myResourceGroup --host-group myHostGroup --name myDedicatedHost
To view the status of the restart, you can use the Get-AzHost commandlet using the InstanceView parameter. The displayStatus will be set to Host undergoing restart during the restart. Once the restart has completed, the displayStatus will return to Host available.
You can also delete the entire resource group in a single command using Remove-AzResourceGroup. This following command will delete all resources created in the group, including all of the VMs, hosts and host groups.