


Take a snapshot named osDisk-backup using az snapshot create. The code sample provided creates a snapshot in the same resource group and within the same region as your source VM. This example assumes that you have a VM called myVM in the myResourceGroup resource group. Get-AzSnapshot `įollow these steps to take a snapshot with the az snapshot create command and the -source-disk parameter. Use the Get-AzSnapshot cmdlet to verify that your snapshot exists. For a list of regions that support availability zones, see Azure regions with availability zones. If you want to store your snapshot in zone-resilient storage, you must create the snapshot in a region that supports (./availability-zones/az-overview.md and include the -SkuName Standard_ZRS parameter. We recommend that you store your snapshots in standard storage instead of premium storage whatever the storage type of the parent disk or target disk. By default, the snapshot uses locally redundant standard storage. In the example, the snapshot is of the OS disk. $vm = Get-AzVM `Ĭreate the snapshot configuration. Use the Get-AzVM cmdlet to get the VM containing the VHD you want to copy. Update the values to reflect your environment. You can then use the New-AzSnapshot cmdlet to take a snapshot of the disk. The code sample provided creates a snapshot in the same resource group and within the same region as your source VM.įirst, you'll use the New-AzSnapshotConfig cmdlet to create a configurable snapshot object. This example requires that you use Cloud Shell or have the Azure CLI installed.įollow these steps to take a snapshot with the New-AzSnapshotConfig and New-AzSnapshot cmdlets. Otherwise, default settings are used for your snapshot. If needed, configure settings on the Encryption, Networking, and Tags tabs.For Storage type, select Standard HDD, unless you require zone-redundant storage or high-performance storage for your snapshot.For Source disk, select the managed disk to snapshot.For Source subscription, select the subscription that contains the managed disk to be backed up.For a list of supporting regions, see Azure regions with availability zones. If you would like to store your snapshot in zone-resilient storage, you need to select a region that supports availability zones. Enter a Name, then select a Region and Snapshot type for the new snapshot.For Resource group, select an existing resource group or enter the name of a new one.

