Skip to content

Commit 72c67e4

Browse files
author
Vamsi Kavuru
committed
updated-how-to-migrate-vm
1 parent e428eaf commit 72c67e4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ Replace the values with your own information.
446446

447447
```azurecli-interactive
448448
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
450450
az vm start -n myVM -g myResourceGroup
451451
```
452452

@@ -458,8 +458,8 @@ Move a VM from dedicated host to multi-tenant infrastructure using the PowerShel
458458
Replace the values of the variables with your own information.
459459

460460
```azurepowershell-interactive
461-
$vmRGName = "movetohost"
462-
$vmName = "myVMtoHost"
461+
$vmRGName = "moveoffhost"
462+
$vmName = "myDHVM"
463463
$dhRGName = "myDHResourceGroup"
464464
$dhGroupName = "myHostGroup"
465465
$dhName = "myHost"
@@ -473,17 +473,14 @@ $myVM = Get-AzVM `
473473
-ResourceGroupName $vmRGName `
474474
-Name $vmName
475475
476-
$myVM.Host = New-Object Microsoft.Azure.Management.Compute.Models.SubResource
477-
478-
$myVM.Host.Id = "$myDH.Id"
479-
480476
Stop-AzVM `
481477
-ResourceGroupName $vmRGName `
482478
-Name $vmName -Force
483479
484480
Update-AzVM `
485481
-ResourceGroupName $vmRGName `
486-
-VM $myVM -Debug
482+
-VM $myVM `
483+
-HostId ''
487484
488485
Start-AzVM `
489486
-ResourceGroupName $vmRGName `

0 commit comments

Comments
 (0)