File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
articles/virtual-machines Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ Replace the values with your own information.
446
446
447
447
``` azurecli-interactive
448
448
az vm deallocate -n myVM -g myResourceGroup
449
- az vm update - n myVM -g myResourceGroup --host myHost
449
+ az vm update -n myVM -g myResourceGroup --set host.id=None
450
450
az vm start -n myVM -g myResourceGroup
451
451
```
452
452
@@ -458,8 +458,8 @@ Move a VM from dedicated host to multi-tenant infrastructure using the PowerShel
458
458
Replace the values of the variables with your own information.
459
459
460
460
``` azurepowershell-interactive
461
- $vmRGName = "movetohost "
462
- $vmName = "myVMtoHost "
461
+ $vmRGName = "moveoffhost "
462
+ $vmName = "myDHVM "
463
463
$dhRGName = "myDHResourceGroup"
464
464
$dhGroupName = "myHostGroup"
465
465
$dhName = "myHost"
@@ -473,17 +473,14 @@ $myVM = Get-AzVM `
473
473
-ResourceGroupName $vmRGName `
474
474
-Name $vmName
475
475
476
- $myVM.Host = New-Object Microsoft.Azure.Management.Compute.Models.SubResource
477
-
478
- $myVM.Host.Id = "$myDH.Id"
479
-
480
476
Stop-AzVM `
481
477
-ResourceGroupName $vmRGName `
482
478
-Name $vmName -Force
483
479
484
480
Update-AzVM `
485
481
-ResourceGroupName $vmRGName `
486
- -VM $myVM -Debug
482
+ -VM $myVM `
483
+ -HostId ''
487
484
488
485
Start-AzVM `
489
486
-ResourceGroupName $vmRGName `
You can’t perform that action at this time.
0 commit comments