6/4/2023 0 Comments Azure take snapshot of vm![]() Set-AzureRmVMOSDisk -VM $vm -ManagedDiskId $disk.Id -Name $disk. $disk = Get-AzureRmDisk -ResourceGroupName $resourceGroupName -Name $osDiskName Azure VM Snapshot Now that we’ve created these Snapshots, where do we find them That is where things get a little tricky. $vm = Get-AzureRmVM -ResourceGroupName $resourceGroupName -Name $vmName The process to take a snapshot of a VM that is using Managed Disks is quite simple, all you have to do is browse to the Disk of the VM and select Create Snapshot. #Switch OS disk to the one created from Snapshot Stop-AzureRmVm -Name $vmName -ResourceGroupName $resourceGroupName $disk = New-AzureRmDisk -Disk $diskConfig -ResourceGroupName $resourceGroupName -DiskName $osDiskName $diskConfig = New-AzureRmDiskConfig -Location $VMsnapshot.Location -SourceResourceId $VMsnapshot.Id -CreateOption Copy $VMSnapshot = Get-AzureRmSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName #Create a managed disk from created Snapshot New-AzureRmSnapshot -Snapshot $snapshot -SnapshotName $snapshotName -ResourceGroupName $resourceGroupName $snapshot = New-AzureRmSnapshotConfig -SourceUri $vm. -Location $location -CreateOption copy $vm = Get-AzureRmVm -ResourceGroupName $resourceGroupName -Name $vmName Stop the VM – The server must be stop deallocated state.Creating a Managed disk from snapshot using the same name as the original disk but adds creation date.But as for now we can use Powershell to change OS disk of VM and restore a older version of that OS disk on existing VM. With this capability we can hope to see a change for this in the feature. ![]() This feature come in handy while performing updates and or changes to OS or applications and where you might want to rollback to previous state on existing VM.Īs of today Azure backup only supports restore to a new VM. Before release of this feature we have been forced to recreate the Virtual Machine if we want to use the snapshot and managed disk. Until now that has only been possible for Unmanaged disks. We have been missing the possibility to change OS disk of VMs using Managed disks. ![]() Recently a new capability was released for Azure Virtual Machines using Managed disks. : Azure, Microsoft By Tobias Vuorenmaa Translate with Google ⟶
0 Comments
Leave a Reply. |