6/4/2023 0 Comments Azure take snapshot of vm![]() However, I was saving JSON files on the file system, so we had to incorporate Storage Accounts to keep that information in a central location. ![]() Based on the requirements, I had to implement two changes: First, move the current script to Azure Automation to create the snapshot - Azure Automation is excellent and makes it more accessible for anyone to use it. Although a PowerShell script saves a lot of time and consistently performs all validation, they wanted something simpler and resilient. The second complaint was related to the process. The script is linear, and it would execute one machine at a time, and having 30 VMs with several disks would take a couple of hours to complete. The same customer was using the script to protect and restore more than 30-plus VMs within the same resource group, and the performance wasn’t ideal, for obvious reasons. We would keep the original disks around, so it could be used as plan B in case of an unexpected problem that may require us to restore the VM to the original state. and the last step would be the replacement of all VMs disks with the newly created disks. However, at this time the script would create a managed disk called. The same holds when a restore was requested. in the same resource group of the original VM. When providing that information and performing the protection (backup), a series of snapshots would be created with the existing name of the disks added by. ![]() The logic behind the script was around the snapshot name. The script requires only three parameters: VM name, snapshot name, and action (backup or restore). I recently worked up a script for a customer to create a snap-and-restore of an existing VM using PowerShell.
0 Comments
Leave a Reply. |