Dedicated Hosts

Overview

The hostGroup and host builders create dedicated hosts in azure and their parent resource, a host group, to efficiently manage a physical host resource in Azure. Dedicated hosts are the same physical servers used in our data centers, provided as a resource. To learn more about dedicated hosts, reference the Azure Docs

  • Host Group (Microsoft.Compute/hostGroups)
  • Host (Microsoft.Compute/hostGroups/hosts)

Builder Keywords

Applies ToKeywordPurpose
hostGroupnameName of the host group resource
hostGroupadd_availability_zoneAssign a zone to the host group.
hostGroupsupport_automatic_placementFeature flag for automatic placement of the VMs
hostGroupplatform_fault_domain_countHow many fault domains to support, depends on the region.
hostnameName of the host resource
hostlicense_typeThe licenses to bring the hosts, i.e. WindowsHybrid, WindowsPerpetual
hostauto_replace_on_failureFeature flag whether to auto replace the host on failure
hostskuname of the sku for the dedicated hosts. Valid sku’s vary by subscription, consult the Dedicated Host documentation
hostplatform_fault_domainFault domain to assign the host
hostparent_host_groupName of the host group to assign the hosts to

Example

#r "nuget:Farmer"

open Farmer
open Farmer.Builders

arm {
    location Location.EastUS

    add_resources
        [
            hostGroup {
                name "myhostgroup"
                support_automatic_placement true
                add_availability_zone "1"
                platform_fault_domain_count 2
            }
            host {
                name "myhost"
                parent_host_group (ResourceName "myHostGroup")
                platform_fault_domain 2
                sku "Fsv2-Type2"
            }
        ]
}