Share via


az vm host

Manage Dedicated Hosts for Virtual Machines.

Commands

Name Description Type Status
az vm host create

Create a dedicated host.

Core GA
az vm host delete

Delete a dedicated host.

Core GA
az vm host get-instance-view

Get instance information about a dedicated host.

Core GA
az vm host group

Manage Dedicated Host Groups.

Core GA
az vm host group create

Create a dedicated host group.

Core GA
az vm host group delete

Delete a dedicated host group.

Core GA
az vm host group get-instance-view

Get instance view of a dedicated host group.

Core GA
az vm host group list

List dedicated host groups.

Core GA
az vm host group show

Get the details of a dedicated host group.

Core GA
az vm host group update

Update a dedicated host group.

Core GA
az vm host list

List dedicated hosts.

Core GA
az vm host list-resize-options

List all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.

Core GA
az vm host redeploy

Redeploy the dedicated host.

Core GA
az vm host resize

Resize a dedicated host.

Core GA
az vm host restart

Restart the dedicated host.

Core GA
az vm host show

Get the details of a dedicated host.

Core GA
az vm host update

Update a dedicated host.

Core GA
az vm host wait

Place the CLI in a waiting state until a condition is met.

Core GA

az vm host create

Create a dedicated host.

az vm host create --host-group
                  --name
                  --resource-group
                  --sku
                  [--auto-replace {false, true}]
                  [--license-type {None, Windows_Server_Hybrid, Windows_Server_Perpetual}]
                  [--location]
                  [--platform-fault-domain]
                  [--tags]

Examples

Create a dedicated host. Ensure it auto replaces on failure

az vm host create --host-group my-host-group --name my-host --platform-fault-domain 2 \
    --auto-replace --resource-group my-resource-group --sku DSv3-Type1

Create a dedicated host in the 'east asia' region. Don't auto replace on failure.

az vm host create --host-group my-host-group --name my-host --platform-fault-domain 0 \
    --auto-replace false --resource-group my-resource-group --sku ESv3-Type1 --location eastasia

Create a dedicated host (autogenerated)

az vm host create --auto-replace true --host-group my-host-group --license-type None --location eastasia --name my-host --resource-group my-resource-group --sku DSv3-Type1

Required Parameters

--host-group

Name of the Dedicated Host Group.

--name -n

Name of the Dedicated Host.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--auto-replace

Replace the host automatically if a failure occurs.

Property Value
Accepted values: false, true
--license-type

The software license type that will be applied to the VMs deployed on the dedicated host.

Property Value
Accepted values: None, Windows_Server_Hybrid, Windows_Server_Perpetual
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>. Otherwise, location will default to the resource group's location.

--platform-fault-domain -d

Fault domain of the host within a group. Allowed values: 0, 1, 2.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host delete

Delete a dedicated host.

az vm host delete [--host-group --host-group-name]
                  [--host-name --name]
                  [--ids]
                  [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                  [--resource-group]
                  [--subscription]
                  [--yes]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name --name -n

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host get-instance-view

Get instance information about a dedicated host.

az vm host get-instance-view [--host-group]
                             [--ids]
                             [--name]
                             [--resource-group]
                             [--subscription]

Examples

Get instance view information of a dedicated host.

az vm host get-instance-view --host-group my-host-group --name my-host -g my-rg

Get instance views for all dedicated hosts in a host group.

az vm host get-instance-view --ids $(az vm host list -g my-rg --host-group my-host-group --query "[].id" -o tsv)

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--host-group

Name of the Dedicated Host Group.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the Dedicated Host.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host list

List dedicated hosts.

az vm host list --host-group --host-group-name
                --resource-group
                [--max-items]
                [--next-token]

Examples

List dedicated hosts.

az vm host list --host-group MyHostGroup --resource-group MyResourceGroup

Required Parameters

--host-group --host-group-name

The name of the dedicated host group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host list-resize-options

List all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.

az vm host list-resize-options [--host-group --host-group-name]
                               [--host-name --name]
                               [--ids]
                               [--resource-group]
                               [--subscription]

Examples

List all available dedicated host sizes to which the specified dedicated host can be resized.

az vm host list-resize-options --host-group MyHostGroup --name MyHost --resource-group MyResourceGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name --name -n

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host redeploy

Redeploy the dedicated host.

The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://learn.microsoft.com/azure/service-health/resource-health-overview for more details.

az vm host redeploy [--host-group --host-group-name]
                    [--host-name --name]
                    [--ids]
                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                    [--resource-group]
                    [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name --name -n

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host resize

Resize a dedicated host.

az vm host resize [--host-group --host-group-name]
                  [--host-name --name]
                  [--ids]
                  [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                  [--resource-group]
                  [--sku]
                  [--subscription]

Examples

Resize a dedicated host.

az vm host resize --host-group MyHostGroup --name MyHost --resource-group MyResourceGroup --sku-name DSv3-Type1

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name --name -n

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--sku

Dedicated host size for resizing. Available dedicated host sizes for resizing could be listed by running 'az vm host list-resize-options'.

Property Value
Parameter group: Sku Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host restart

Restart the dedicated host.

The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://learn.microsoft.com/azure/service-health/resource-health-overview for more details.

az vm host restart [--host-group --host-group-name]
                   [--host-name]
                   [--ids]
                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                   [--resource-group]
                   [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host show

Get the details of a dedicated host.

az vm host show [--expand {instanceView, userData}]
                [--host-group --host-group-name]
                [--host-name --name]
                [--ids]
                [--resource-group]
                [--subscription]

Examples

Get the details of a dedicated host.

az vm host show --host-group MyHostGroup --name MyDedicatedHost --resource-group MyResourceGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--expand

The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host.

Property Value
Accepted values: instanceView, userData
--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name --name -n

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host update

Update a dedicated host.

az vm host update [--add]
                  [--force-string]
                  [--host-group]
                  [--ids]
                  [--name]
                  [--remove]
                  [--resource-group]
                  [--set]
                  [--subscription]

Examples

Update the 'autoReplaceOnFailure' field of a dedicated host.

az vm host update --host-group my-host-group --name my-host \
    --resource-group my-resource-group --set autoReplaceOnFailure=True

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--host-group

Name of the Dedicated Host Group.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the Dedicated Host.

Property Value
Parameter group: Resource Id Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vm host wait

Place the CLI in a waiting state until a condition is met.

az vm host wait [--created]
                [--custom]
                [--deleted]
                [--exists]
                [--expand {instanceView, userData}]
                [--host-group --host-group-name]
                [--host-name --name]
                [--ids]
                [--interval]
                [--resource-group]
                [--subscription]
                [--timeout]
                [--updated]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--expand

The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host.

Property Value
Accepted values: instanceView, userData
--host-group --host-group-name

The name of the dedicated host group.

Property Value
Parameter group: Resource Id Arguments
--host-name --name -n

The name of the dedicated host.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False