Hello sns, Reverting an Azure VM to a snapshot state in Azure is a bit different than in other environments.Even so Azure allows create disk snapshots, As I know for now it doesn't provide a direct option to revert the same VM back to the previously created snapshot.
Here there is another conversation thread about it: https://learn.microsoft.com/en-us/answers/questions/488329/how-can-i-revert-my-azure-vm-to-a-previously-saved
Alternative option is creating a new disk from the snapshot and then swapping the OS disk of your VM with this new disk. Here are the steps:
- Create a new disk from the snapshot either by portal ( In the snapshot blade, click on + Create disk. ) or Azure PowerShell example:
$SnapshotName = "my_snapshot"
$SnapshotResourceGroup = "my_resource_group"
$DiskNameOS = "my_new_snapshotdisk"
$snapshotinfo = Get-AzSnapshot -ResourceGroupName $SnapshotResourceGroup -SnapshotName $snapshotName
New-AzDisk -DiskName $DiskNameOS (New-AzDiskConfig -zone 1 -Location eastus -CreateOption Copy -SourceResourceId $snapshotinfo.Id) -ResourceGroupName $SnapshotResourceGroup
- From the Azure portal going to the VM, selecting "disks", and then selecting "swap os disk" ( it will cause a reboot )
Let me know if you need additional help.
Luis
If the information helped address your question, please Accept the answer.