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/dedicated-hosts-how-to.md
+130-7Lines changed: 130 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,14 @@ Add the `--ultra-ssd-enabled true` parameter to enable creation of VMs that can
99
99
100
100
101
101
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
102
110
**Other examples**
103
111
104
112
You can also use [az vm host group create](/cli/azure/vm/host/group#az-vm-host-group-create) to create a host group in availability zone 1 (and no fault domains).
@@ -138,6 +146,14 @@ This example uses [New-AzHostGroup](/powershell/module/az.compute/new-azhostgrou
138
146
139
147
140
148
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
141
157
```azurepowershell-interactive
142
158
$rgName = "myDHResourceGroup"
143
159
$location = "EastUS"
@@ -157,14 +173,38 @@ Add the `-SupportAutomaticPlacement true` parameter to have your VMs and scale s
157
173
158
174
159
175
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
160
184
Add the `-EnableUltraSSD` parameter to enable creation of VMs that can support ultra disks.
161
185
162
186
163
187
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
164
196
---
165
197
166
198
167
199
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
168
208
## Create a dedicated host
169
209
170
210
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.
@@ -206,6 +246,14 @@ In this example, we use [New-AzHost](/powershell/module/az.compute/new-azhost) t
206
246
207
247
208
248
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
209
257
```azurepowershell-interactive
210
258
$dHost = New-AzHost `
211
259
-HostGroupName $hostGroup.Name `
@@ -243,6 +291,14 @@ It will take a few minutes for your VM to be deployed.
243
291
244
292
245
293
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
246
302
### [CLI](#tab/cli)
247
303
248
304
Create a virtual machine within a dedicated host using [az vm create](/cli/azure/vm#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.
@@ -266,12 +322,28 @@ To place the VM on a specific host, use `--host` instead of specifying the host
266
322
267
323
268
324
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
269
333
### [PowerShell](#tab/powershell)
270
334
271
335
Create a new VM on our host using [New-AzVM](/powershell/module/az.compute/new-azvm) For this example, because our host group is in zone 1, we need to create the VM in zone 1.
272
336
273
337
274
338
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
275
347
```azurepowershell-interactive
276
348
New-AzVM `
277
349
-Credential $cred `
@@ -288,6 +360,9 @@ New-AzVM `
288
360
> If you create a virtual machine on a host which does not have enough resources, the virtual machine will be created in a FAILED state.
289
361
290
362
363
+
364
+
365
+
291
366
---
292
367
293
368
## Create a scale set
@@ -326,6 +401,14 @@ If you want to manually choose which host to deploy the scale set to, add `--hos
326
401
327
402
328
403
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
329
412
### [PowerShell](#tab/powershell)
330
413
331
414
Deploy a scale-set to the host using [New-AzVMSS](/powershell/module/az.compute/new-azvmss). When you deploy a scale set, you specify the host group.
@@ -625,6 +708,14 @@ The output will look similar to the below example:
625
708
626
709
627
710
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
628
719
You can check the host health status and how many virtual machines you can still deploy to the host using [Get-AzHost](/powershell/module/az.compute/get-azhost) with the `-InstanceView` parameter.
629
720
630
721
```azurepowershell-interactive
@@ -705,6 +796,14 @@ You can restart the entire host, meaning that the host's not **completely** powe
705
796
706
797
707
798
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
708
807
### [Portal](#tab/portal)
709
808
710
809
1. Search for and select the host.
@@ -741,6 +840,14 @@ To view the status of the restart, you can use the [Get-AzHost](/powershell/modu
@@ -756,24 +863,29 @@ If you would like to move your host and all associated VMs to a newer generation
756
863
- You can only resize to newer generation of hardware in comparison to teh source host i.e. a Dsv3-Type3 host can only be resized to Dsv3-Type4 but **not to** Dsv3-Type2 .
757
864
- Resize will move the host to a different node hence the 'Host Asset Id' will change but the 'Host Id' will remain the same.
758
865
- Since resize operation involves moving the host and all associated VMs to a different node, host and the VMs will become unavailable during the resize operation
759
-
>[!Warning]
760
-
>Resize operation will cause loss of any non persisted data including the data on temp disks, hence save all your work before triggering resize.
866
+
867
+
> [!Warning]
868
+
> Resize operation will cause loss of any non-persisted data including the data on temp disks, hence save all your work before triggering resize.
869
+
870
+
> [!Note]
871
+
> During preview hosts in host groups with Fault domain count of '1' might not support resize, this limitation is only temporary and would be removed as we announce general availability of host resize.
872
+
> If the source host is already running on the latest hardware, 'Size' page would display an empty list. If you are looking for enhanced performance, consider switching to a different VM family.
873
+
761
874
762
875
### [Portal](#tab/portal)
763
876
764
877
1. Search for and select the host.
765
878
1. In the left menu under **Settings** select **Size**.
766
879
1. Once on the the size page from the list of SKUs, select the desired SKU to resize to.
767
-
>[!Note]
768
-
> If the source host is already running on the latest hardware, 'Size' page would display an empty list.
769
-
If you are looking for enhanced performance consider switching to a different VM family.
770
880
1. Selecting a target size from the list would enable **Resize** button on the bottom on the page.
771
881
1. Click **Resize**, host's 'Provisioning State' will change from 'Provisioning Succeeded' to 'Updating'
772
-
1. Once the the resizing is complete the host's 'Provisioning State' will revert to 'Provisioning Succeeded'
882
+
1. Once the resizing is complete the host's 'Provisioning State' will revert to 'Provisioning Succeeded'
883
+
773
884
774
885
### [CLI](#tab/cli)
775
886
776
-
First list the sizes that you can resize incase you are unsure which to resize to.
887
+
First list the sizes that you can resize in case you are unsure which to resize to.
888
+
777
889
Use [az vm host list-resize-options](/cli/azure/vm#az-vm-host-list-resize-options)[Preview]
778
890
779
891
```azurecli-interactive
@@ -798,12 +910,23 @@ az vm host resize \
798
910
PowerShell support for host resize is coming soon.
799
911
800
912
913
+
914
+
915
+
801
916
---
802
917
803
918
## Deleting a host
804
919
805
920
806
921
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+
807
930
You're being charged for your dedicated host even when no virtual machines are deployed on the host. You should delete any hosts you're currently not using to save costs.
808
931
809
932
You can only delete a host when there are no any longer virtual machines using it.
0 commit comments