Azure VMS Use the D: disk as a data drive on a Windows VM

Source: Internet
Author: User

If your application needs to use the D drive to store data, follow these instructions to use a different drive letter as a temporary disk. Never use a temporary disk to store the data you want to save.

If you resize the virtual machine or stop (DEALLOCATE) The virtual machine, this may trigger the operation of placing the virtual machine in the new hypervisor. A scheduled or unplanned maintenance event may also trigger this drop operation. In this scenario, the temporary disk is reassigned to the first available drive letter. If the application explicitly requires a D: disk, you will need to follow these steps to temporarily move the Pagefile.sys, connect the new data disk and assign it a drive letter D, and then move the Pagefile.sys back to the temporary drive. When you are done, Azure does not retract D: If the VM is moved to a different hypervisor.

For more information about how Azure uses temporary disks, see Understanding temporary drives on azure virtual machines

Additional Data disks

First, you need to attach the data disk to the virtual machine. To do this using the portal, see how to attach a managed data disk in the Azure portal.

Temporarily move the Pagefile.sys to the C drive
    1. Connect to the virtual machine.
    2. Right-click the Start menu and select System.
    3. In the left menu, select Advanced System settings.
    4. In the Performance section, select Settings.
    5. Select the Advanced tab.
    6. In the Virtual Memory section, select Change.
    7. Select the C drive and click System managed Size, and then tap Settings.
    8. Select the D drive and click No paging file, settings.
    9. Click Apply. You will receive a warning stating that the computer needs to be restarted for the changes to take effect.
    10. Restart the virtual machine.
Change Drive letter
    1. After the VM restarts, log back on to the VM.
    2. Click the Start menu, type Diskmgmt.msc, and press Enter. Disk Management starts.
    3. Right-click D (Temporary storage drive) and select Change Drive letter and path.
    4. Under Drive letter, select a new drive, such as T, and click OK.
    5. Right-click the data disk and select Change Drive letter and path.
    6. Under drive letter, select Drive D, and click OK.
Move Pagefile.sys back to temporary storage drive
    1. Right-click the Start menu and select System.
    2. In the left menu, select Advanced System settings.
    3. In the Performance section, select Settings.
    4. Select the Advanced tab.
    5. In the Virtual Memory section, select Change.
    6. Select OS Drive C, and then click No paging file, settings.
    7. Select the temporary storage drive T, and then click System Managed Size, and then tap Settings.
    8. Click Apply. You will receive a warning stating that the computer needs to be restarted for the changes to take effect.
    9. Restart the virtual machine.

Azure VM uses the D: disk as a data drive on a Windows VM

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.