losadial.blogg.se

Azure take snapshot of vm
Azure take snapshot of vm






azure take snapshot of vm azure take snapshot of vm

Once the VM has stopped, grant access to the disk: $sas = Grant-AzDiskAccess -ResourceGroupName $rg -DiskName $diskName -DurationInSecond $sasExpiryDuration -Access Read.Use the appropriate commands to take a snapshot of the VM.Stop the VM: Stop-AzVM -ResourceGroupName $rg -Name $vmName.Create additional variables: $storageContainerName = "container1".In the Azure Portal, copy the storage account key for key1, and create a new variable: $storageAccountKey = "".In the Azure Portal, copy the storage account name, and create a new variable: $storageAccountName = "".

azure take snapshot of vm

  • Create a variable for sasExpiryDuration: $sasExpiryDuration = "3600".
  • In the Azure Portal, copy the name of the VM disk and create a new variable: $diskname = "".
  • In the Cloud Shell, create a new variable: $rg = "".
  • In the Azure Portal, click All resources and copy the name of the pre-provisioned resource group. Use the correct PowerShell command to stop and deallocate the VM that’s provisioned with this lab. Successfully complete this lab by achieving the following learning objectives: Stop the Virtual Machine








    Azure take snapshot of vm