There are three consistency levels.
These basically turn out to be service‑level agreement guarantees for
Microsoft. The one that you want is application consistent, and this is for
Windows virtual machines when the Volume Shadow Copy writer is able to back
up all of the still content, that is closed files, but also in‑memory
content and pending I/O operations.
Now Linux, of course, doesn't have Volume Shadow Copy, but you can mimic
that behavior by injecting scripts into your backup process, and there's
a good Microsoft Docs article on that.
If you search Google for application‑consistent backups
in Linux Azure VMs, you'll find it.
You can also check the exercise files for this
course. It'd probably a bit easier.
But this is definitely the preferred consistency level because the SLA,
or the contractual agreement, is that Microsoft says when you restore an
application‑consistent snapshot, that VM will not only boot, but you can
get right back to the memory content and pending I/O at the time the
backup was taken. The second most preferable consistency level is called
file‑system.
This is the default consistency for Linux VMs if you're not using those
scripts. The issue here is that it may require some data to fix up. In other
words, on your Windows VM, maybe there was a problem with the VSS writer, with
the Volume Shadow Copy writer. It wasn't able to capture all pending I/O and
in‑memory content, so your restored disk and VM will boot, but you may have a
little bit more work to do.
And lastly, there's the crash‑consistent snapshot, and you
don't want this because this consistency level has no SLA,
or service‑level agreement.
However, this doesn't mean necessarily that it's a bad backup.
It's just that either there was a more intense problem during the backup if
the Azure VM was online at the time of the backup, but just as commonly, if
the virtual machine has stopped and deallocated, crash is the only consistency
level you can get because how in the world can the Volume Shadow Copy service
or the Linux equivalent work if the virtual machine has stopped and deallocated? Short answer, it can't.