Azure VM persistence issues when shut down is triggered.

6 Feb 2022

Note: This post is speculative.
Azure VM disk's offer some disk caching options, namely: Detailed description can be found here .
Some context:
I was using Azure's VM (Linux) with Read/Write mode, big mistake! I used it as a work machine and connected to the VM via SSH over VSCode. I wrote some code, saved it in VSCode. From the desciption of Read/Write mode, it is the responsibility of the application to flush the cache. So, VSCode did not call fsync, this is my assumption, correctly as a consequence I lost my data from the disk when I shut down the VM.
If you use this mode make sure your application handles syncing of disk and memory, if you decide to use Azure VM's in the future.
Related issues:
Similar issue in Windows VM by Azure over here .