Is Azure Temp Storage Located on Same Physical Server the VM Runs on?

Hasan Paknia 61 Reputation points

There are pages like the following, giving "yes" answer to my question. But I can not find this fact in Microsoft Azure documentation. Can someone help?,hosted%20and%20is%20non%2Dpersistent.

In Azure, every VM – regardless if Linux or Windows – gets a temporary disk assigned automatically. This temporary disk is located on the physical server (the hypervisor) where the Azure VM is hosted and is non-persistent. Disks used by the operating system or additionally added data disks are persistent disks and stored in Azure Storage.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,379 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sumarigo-MSFT 44,501 Reputation points Microsoft Employee

    @Hasan Paknia Welcome to Microsoft Q&A, Thank you for posting your query!

    Location: These are the actual contents of a d:\temp\DATALOSS_WARNING_README.txt file. Located inside the temp drive for a Windows VMs, D:\temp\DATALOSS_WARNING_README.txt

    Contents inside the temp drive are not lost every single time a VM restarts. This often lead people to believe the contents inside the drive will always persist.

    Every VM has two disks. A Windows based VM will have a system disk (C:) and the temporary drive (D: by default).
    Temp disk is for short term storage. Mostly pagefile.sys. If needed, the drive letter D: can be changed to something else
    Use the D: drive as a data drive

    One of the primary reasons customers use Microsoft Azure Virtual Machines is the fact that Virtual Machines support persistent disks. By persistent it means that data written to these persistent disks will be available through reboots, start/stop, or other lifecycle events. However virtual machines also contain one temporary disk on each VM. The data on these temporary disks may not remain through standard VM lifecycle events. This is because the data for the temporary disks is stored on the host operating system running the hypervisor software while the data for persistent disks is stored in Microsoft Azure Storage. The temporary disk is very useful for data which, you guessed it, is temporary in nature. A great example of this type of data for Windows is the pagefile. In fact, when a new Windows VM is provisioned from an image in Azure we configure the pagefile to be located on this temporary disk. Customers should not use the temporary disk for data that should be persistent. A common misconfiguration that we have seen is customers placing a SQL database file on the temporary drive or placing the database files for a Windows Active Directory Domain Controller on this drive. For most Windows VMs the volume on the temporary disk will have the drive letter of D:. It will also have the drive label of “Temporary Storage”.

    Lear more :

    Temporary Disk: The temporary storage drive, labeled as the D: drive is not persisted and is not saved in the Windows Azure Blob storage. It is used primarily for the page file and its performance is not guaranteed to be predictable. Management tasks such as a change to the virtual machine size, resets the D: drive. In addition, Windows Azure erases the data on the temporary storage drive when a virtual machine fails over. The D: drive is not recommended for storing any user or system database files, including tempdb.

    • The Temporary storage drive is a local drive on the physical box that should only serve as scratch space. For example, we put the paging file onto this drive to save on transaction costs for each Windows page-in but nothing else. I would recommend you don’t put anything that you need persisted on this drive as it will be deleted upon any hardware failure the system sees whereas the OS disk and any data disks attached will remain persisted in storage even on hardware failures.
    • This disk is a local disk, non-replicated. If it crashes, anything on it is gone. If your VM is moved to another server, the content is gone. If you scale a VM size down, it's likely this data will be gone, as the allocation size decreases. Most VMs contain a temporary disk, which is not a managed disk. The temporary disk provides short-term storage for applications and processes, and is intended to only store data such as page or swap files. Data on the temporary disk may be lost during a maintenance event or when you redeploy a VM. During a successful standard reboot of the VM, data on the temporary disk will persist. For more information about VMs without temporary disks, see Azure VM sizes with no local temporary disk.

    On Azure Linux VMs, the temporary disk is typically /dev/sdb and on Windows VMs the temporary disk is D: by default. The temporary disk is not encrypted by server side encryption unless you enable encryption at host.

    Temporary disk:

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

1 additional answer

Sort by: Most helpful
  1. Hasan Paknia 61 Reputation points

    As an additional answer, from official Microsoft documentation:

    The VM is created with a temporary disk. This disk is stored on a physical drive on the host machine. It is not saved in Azure Storage and may be deleted during reboots and other VM lifecycle events. Use this disk only for temporary data, such as page or swap files. For Linux VMs, the temporary disk is /dev/sdb1 and is mounted at /mnt/resource or /mnt.

    0 comments No comments