Skip to content

Commit b6fef41

Browse files
Merge pull request #244330 from vamckMS/docs-editor/dedicated-hosts-how-to-1688760162
adh-fixing-how-to-page
2 parents 1e5c9dc + 7fb974d commit b6fef41

File tree

1 file changed

+130
-7
lines changed

1 file changed

+130
-7
lines changed

articles/virtual-machines/dedicated-hosts-how-to.md

Lines changed: 130 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ Add the `--ultra-ssd-enabled true` parameter to enable creation of VMs that can
9999

100100

101101

102+
103+
104+
105+
106+
107+
108+
109+
102110
**Other examples**
103111

104112
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
138146

139147

140148

149+
150+
151+
152+
153+
154+
155+
156+
141157
```azurepowershell-interactive
142158
$rgName = "myDHResourceGroup"
143159
$location = "EastUS"
@@ -157,14 +173,38 @@ Add the `-SupportAutomaticPlacement true` parameter to have your VMs and scale s
157173

158174

159175

176+
177+
178+
179+
180+
181+
182+
183+
160184
Add the `-EnableUltraSSD` parameter to enable creation of VMs that can support ultra disks.
161185

162186

163187

188+
189+
190+
191+
192+
193+
194+
195+
164196
---
165197

166198

167199

200+
201+
202+
203+
204+
205+
206+
207+
168208
## Create a dedicated host
169209

170210
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
206246

207247

208248

249+
250+
251+
252+
253+
254+
255+
256+
209257
```azurepowershell-interactive
210258
$dHost = New-AzHost `
211259
-HostGroupName $hostGroup.Name `
@@ -243,6 +291,14 @@ It will take a few minutes for your VM to be deployed.
243291

244292

245293

294+
295+
296+
297+
298+
299+
300+
301+
246302
### [CLI](#tab/cli)
247303

248304
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
266322
267323

268324

325+
326+
327+
328+
329+
330+
331+
332+
269333
### [PowerShell](#tab/powershell)
270334

271335
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.
272336

273337

274338

339+
340+
341+
342+
343+
344+
345+
346+
275347
```azurepowershell-interactive
276348
New-AzVM `
277349
-Credential $cred `
@@ -288,6 +360,9 @@ New-AzVM `
288360
> 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.
289361
290362

363+
364+
365+
291366
---
292367

293368
## Create a scale set
@@ -326,6 +401,14 @@ If you want to manually choose which host to deploy the scale set to, add `--hos
326401

327402

328403

404+
405+
406+
407+
408+
409+
410+
411+
329412
### [PowerShell](#tab/powershell)
330413

331414
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:
625708

626709

627710

711+
712+
713+
714+
715+
716+
717+
718+
628719
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.
629720

630721
```azurepowershell-interactive
@@ -705,6 +796,14 @@ You can restart the entire host, meaning that the host's not **completely** powe
705796

706797

707798

799+
800+
801+
802+
803+
804+
805+
806+
708807
### [Portal](#tab/portal)
709808

710809
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
741840

742841

743842

843+
844+
845+
846+
847+
848+
849+
850+
744851
```azurepowershell-interactive
745852
$hostRestartStatus = Get-AzHost -ResourceGroupName myResourceGroup -HostGroupName myHostGroup -Name myDedicatedHost -InstanceView;
746853
$hostRestartStatus.InstanceView.Statuses[1].DisplayStatus;
@@ -756,24 +863,29 @@ If you would like to move your host and all associated VMs to a newer generation
756863
- 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 .
757864
- Resize will move the host to a different node hence the 'Host Asset Id' will change but the 'Host Id' will remain the same.
758865
- 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+
761874

762875
### [Portal](#tab/portal)
763876

764877
1. Search for and select the host.
765878
1. In the left menu under **Settings** select **Size**.
766879
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.
770880
1. Selecting a target size from the list would enable **Resize** button on the bottom on the page.
771881
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+
773884

774885
### [CLI](#tab/cli)
775886

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+
777889
Use [az vm host list-resize-options](/cli/azure/vm#az-vm-host-list-resize-options) [Preview]
778890

779891
```azurecli-interactive
@@ -798,12 +910,23 @@ az vm host resize \
798910
PowerShell support for host resize is coming soon.
799911

800912

913+
914+
915+
801916
---
802917

803918
## Deleting a host
804919

805920

806921

922+
923+
924+
925+
926+
927+
928+
929+
807930
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.
808931

809932
You can only delete a host when there are no any longer virtual machines using it.

0 commit comments

Comments
 (0)