You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows/dedicated-hosts-portal.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This article guides you through how to create an Azure [dedicated host](dedicate
34
34
35
35
## Add an existing VM
36
36
37
-
You can add an exiting 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:
37
+
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:
38
38
39
39
- 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 could not be a Standard_A4_v2.
40
40
- The VM needs to be located in same region as the dedicated host.
@@ -55,7 +55,7 @@ For more information about the host SKUs and pricing, see [Azure Dedicated Host
55
55
If you set a fault domain count for your host group, you will be asked to specify the fault domain for your host. In this example, we set the fault domain for the host to 1.
56
56
57
57
58
-
```powershell
58
+
```azurepowershell-interactive
59
59
$dHost = New-AzHost `
60
60
-HostGroupName $hostGroup.Name `
61
61
-Location $location -Name myHost `
@@ -72,7 +72,7 @@ Create a virtual machine on the dedicated host.
72
72
If you specified an availability zone when creating your host group, you are required to use the same zone when creating the virtual machine. For this example, because our host group is in zone 1, we need to create the VM in zone 1.
73
73
74
74
75
-
```powershell
75
+
```azurepowershell-interactive
76
76
$cred = Get-Credential
77
77
New-AzVM `
78
78
-Credential $cred `
@@ -92,7 +92,7 @@ New-AzVM `
92
92
93
93
You can check the host health status and how many virtual machines you can still deploy to the host using [GetAzHost](/powershell/module/az.compute/get-azhost) with the `-InstanceView` parameter.
94
94
95
-
```
95
+
```azurepowershell-interactive
96
96
Get-AzHost `
97
97
-ResourceGroupName $rgName `
98
98
-Name myHost `
@@ -161,25 +161,71 @@ Location : eastus
161
161
Tags : {}
162
162
```
163
163
164
+
## Add an existing VM
165
+
166
+
You can add an exiting 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:
167
+
168
+
- 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 could not be a Standard_A4_v2.
169
+
- The VM needs to be located in same region as the dedicated host.
170
+
- 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, see [Move a VM out of a proximity placement group](https://docs.microsoft.com/azure/virtual-machines/windows/proximity-placement-groups#move-an-existing-vm-out-of-a-proximity-placement-group)
171
+
- The VM can't be in an availability set.
172
+
- 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.
173
+
174
+
Replace the values of the variables with your own information.
You are being charged for your dedicated hosts even when no virtual machines are deployed. You should delete any hosts you are currently not using to save costs.
167
213
168
214
You can only delete a host when there are no any longer virtual machines using it. Delete the VMs using [Remove-AzVM](/powershell/module/az.compute/remove-azvm).
169
215
170
-
```powershell
216
+
```azurepowershell-interactive
171
217
Remove-AzVM -ResourceGroupName $rgName -Name myVM
172
218
```
173
219
174
220
After deleting the VMs, you can delete the host using [Remove-AzHost](/powershell/module/az.compute/remove-azhost).
0 commit comments