Use the portal to attach a data disk to a Linux VM

This article shows you how to attach both new and existing disks to a Linux virtual machine through the Azure portal. You can also attach a data disk to a Windows VM in the Azure portal.

Before you attach disks to your VM, review these tips:

Find the virtual machine

  1. Sign in to the Azure portal.
  2. On the left menu, click Virtual Machines.
  3. Select the virtual machine from the list.
  4. To the Virtual machines page, in Essentials, click Disks.

    Open disk settings

Attach a new disk

  1. On the Disks pane, click + Add data disk.
  2. Click the drop-down menu for Name and select Create disk:

    Create Azure managed disk

  3. Enter a name for your managed disk. Review the default settings, update as necessary, and then click Create.

    Review disk settings

  4. Click Save to create the managed disk and update the VM configuration:

    Save new Azure Managed Disk

  5. After Azure creates the disk and attaches it to the virtual machine, the new disk is listed in the virtual machine's disk settings under Data Disks. As managed disks are a top-level resource, the disk appears at the root of the resource group:

    Azure Managed Disk in resource group

Attach an existing disk

  1. On the Disks pane, click + Add data disk.
  2. Click the drop-down menu for Name to view a list of existing managed disks accessible to your Azure subscription. Select the managed disk to attach:

    Attach existing Azure Managed Disk

  3. Click Save to attach the existing managed disk and update the VM configuration:

    Save Azure Managed Disk updates

  4. After Azure attaches the disk to the virtual machine, it's listed in the virtual machine's disk settings under Data Disks.

Next steps

You can also attach a data disk using the Azure CLI.