
#Get the VM of the managed disk $vm = get-azureRmVm -ResourceGroupName $resourceGroupName -Name $vmNameĤ. #Declare Parameters $resourceGroupName = "" $vmName="" $Location = "" $snapshotName = ""ģ. #Login to AzurePortal in PowerShell and select subscription Login-AzureRmAccount Get-AzureRMSubscription Select-AzureRmSubscription -SubscriptionName ''Ģ.


To create a dr backup repository of snapshots in a different region or subscription (or both), in case of accidental deletion of key OS or data disks.To create a ‘repository’ of prepared OS and data disks for use in creating multiple VM copies.These are considered ‘specialized’ disks… A new ‘exact copy’ environment, with all accounts and applications in place, can be ready for access within 5 minutes if necessary, using stored Azure Snapshots of the OS and data disks. For example, we use specific single-tier and double-tier web server/sql server environments that need to be reproduced for various testing scenarios. To quickly duplicate a fresh VM instance.To create a copy of production servers for use in development, or the opposite, copy a dev environment into production mode.For custom backup/restore of a VMs vhds.

A new VM is created with new managed disks created from stored snapshots of OS data disks data disk snapshots are turned into managed data disks and then attached to a VM.Īn Azure snapshot of a data or operating system (os) vhd can be used:

Snapshots are full, read-only copies of the vhds. In Azure, snapshots are taken of the virtual disks (vhd), not the VM instance itself. Working in Hyper-V before moving all of our resources from physical servers in datacenters to Azure IaaS or PaaS, we regularly took new snapshots of Virtual Machines (VMs) before testing major development changes, adding Windows updates, testing new application settings etc., to allow us to easily revert to the previous state of the VM if desired. Create an Azure Disk Snapshot - PowerShell
