Is there any difference in taking a snapshot on a VM if it is running or stopped?
Azure Backup, for example, recommends a running VM to ensure application consistency.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@dcbrown16
Thanks for the question. I went through the documents and I am unable to find this specific recomendation. I will check with the author.
Mean while if you want to go through the snapshot process and billing, you can check here.
@jakaruna-MSFT I was actually able to get some information from an engineer (I'm on the ProDirect team). See below:
Disk snapshot does not care what OS state currently is. There is no guarantee for data consistency if snapshot is taken while OS is running.
Recommended way is shutting down VM before taking snapshot for data safety if possible.
If you can confirm this recommendation, it would be great if we can get the document updated.
@cynthn Please go through @dcbrown16 comments. I didn't find those information in Documents. Please review that and update the Document with snapshot bestpractices.
@jakaruna-MSFT thanks for the feedback! VM snapshots and Backup snapshots are different use cases. VM snapshots are more for dirty backups and creating images, while the snapshots take using the Backup service are true backups. Are you looking for just general recommendations about VM snapshots? It really is dependent on what you are trying to do with the snapshot. If you are trying to troubleshoot an issue with a VM, your probably want a running VM. If you are trying to create a snapshot of a VM in production to use when creating an image, it will depend on whether you are okay to stop the VM for a few minutes while you take the snapshot. Is that the kind of guidance you are looking for?
@cynthn thanks for checking! Yeah the question here is more about backups and the engineer recommendation was to shut down for consistency (in-flight transactions at the time of snapshot might not be stable for backup purposes). Certainly Backup (the service) is recommended over VM snapshots for true production backups, but it seems like it might make sense to have a note about shutting down for consistency when using VM snapshots to recreate VMs or for dirty backup.
@dcbrown16 Yeah, that sounds like something that I could add to the doc. Thanks for the feedback :)
Thank you @cynthn. Adding that information to the Document will be helpfull.
Thanks @cynthn!