If you need to use the D drive to store data, follow these instructions to use a different drive for the temporary disk. Never use the temporary drive to store data that you need to keep.
Before you begin, you'll need a data disk attached to the virtual machine so you can store the Windows page file (pagefile.sys) during this procedure. See How to Attach a Data Disk to a Windows Virtual Machine if you don't have one. For instructions how to find out what disks are attached, see "Manage your disks" in About Virtual Machine Disks in Azure.
If you want to use an existing data disk on the D drive, make sure you've also uploaded the VHD to the storage account. For instructions, see steps 3 and 4 in Create and Upload a Windows Server VHD to Azure.
If you resize a virtual machine and doing that moves the virtual machine to a different host, the temporary drive changes back to the D drive.
Log in to the virtual machine.
Move pagefile.sys from the D drive to another drive.
Restart the virtual machine.
Log in again and change the drive letter from D to E.
From the Azure Management Portal, attach an existing data disk or an empty data disk.
Log in to the virtual machine again, initialize the disk, and assign D as the drive letter for the disk you just attached.
Verify that E is mapped to the Temporary Storage disk.
Move pagefile.sys from the other drive to the E drive.