Skip to main content

Command Palette

Search for a command to run...

Attaching a managed data disk to a Windows VM using the Azure Portal.

Updated
2 min read

Optimizing storage for Azure Virtual Machines (VMs) is critical for performance, scalability, and cost efficiency. Managed disks simplify disk management by handling storage accounts automatically, ensuring high availability and redundancy.

In this guide we will explore a detailed, step-by-step approach to attaching a managed data disk to a Windows VM using the Azure Portal.

Follow these steps:

  1. Sign in to the Azure portal.

  2. Search for and select Virtual machines.

  3. Select a virtual machine from the list provided or create a new virtual machine in case none exist.

  4. On the Virtual machine pane, select Disks.

  5. On the Disks pane, select Create and attach a new disk.

  6. In the drop-downs for the new disk, make the selections you want, and name the disk.

  7. Click on Apply to create and attach the new data disk to the VM

    Initialize a new data disk

    Follow these steps:

    1. Connect to the VM.

    2. Select the Windows Start menu inside the running VM and enter diskmgmt.msc in the search box.

      The Disk Management console opens.

    3. Disk Management recognizes that you have a new, uninitialized disk and the Initialize Disk window appears.

    4. Verify the new disk is selected and then select OK to initialize it.

    5. The new disk appears as unallocated. Right-click anywhere on the disk and select New simple volume. The New Simple Volume Wizard window opens.

    6. Proceed through the wizard, keeping all of the defaults, and when you're done select Finish.

    7. Close Disk Management.

    8. A pop-up window appears notifying you that you need to format the new disk before you can use it. Select Format disk.

    9. In the Format new disk window, check the settings, and then select Start.

    10. A warning appears notifying you that formatting the disks erases all of the data. Select OK.

    11. When the formatting is complete, select OK.

Congratulations! you have successfully attached a disk to windows virtual machine using the Azure Portal.