DEV Community

Cover image for ATTACHING A MANAGED DATA DISK TO AN AZURE WINDOWS VIRTUAL MACHINE
Bernard Chika Uwaezuoke
Bernard Chika Uwaezuoke

Posted on

ATTACHING A MANAGED DATA DISK TO AN AZURE WINDOWS VIRTUAL MACHINE

This article presents steps that are required to successfully attach a managed data disk to a Windows Virtual Machine using the Azure portal.

To achieve this, two major tasks need to be accomplished.
1. Create and attach a data disk
2. Initialize the new data disk

What is a data disc, and why is it important in computing?
A data disk is a managed disk that's attached to a virtual machine to store application data, or other data you need to keep.
Azure managed disks are block-level storage volumes that are managed by Azure and used with Azure Virtual Machines.

The available types of data disks are ultra disks, premium solid-state drives (SSD), standard SSDs, and standard hard disk drives (HDD).

Managed disks come with many benefits such as high durability and availability, Simple and scalable, integration with availability sets, integration with Availability Zones, enjoys Azure Backup support and Azure Disk Backup.

STEP 1: CREATE AND ATTACH A DATA DISK

  • Sign in to the Azure portal.

  • Search for and select Virtual machines.

  • Select a virtual machine from the list.

  • On the Virtual machine pane, select Disks.

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

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

  • Select Save to create and attach the new data disk to the VM.

Image description

The disk is created and attached to the VM!

Image description

STEP 2: INITIALIZE THE NEW DATA DISK

  • Connect to the VM. Go to the VM overview and click on connect. Then click on Download RDP File to download connecting details to your desktop.

Image description

  • Go to downloads and double-click on the file to run. The remote desktop connection prompt will pop-up. Click connect.

Image description

Windows security will pop-up, requesting for your credentials.

  • Enter the Username and Password of your virtual machine.

Image description
This will remotely connect you to your virtual machine.

In the Virtual Machine!

Select the Windows Start menu inside the running VM and enter diskmgmt.msc in the search box. The Disk Management console opens.

Image description

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

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

Image description

The new disk appears as unallocated.

  • Right-click anywhere on the disk and select New simple volume. The New Simple Volume Wizard window opens.

Image description

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

Image description

  • Close Disk Management.

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

Image description

In the Format new disk window, check the settings, and then select Start.
A warning appears notifying you that formatting the disks erases all of the data. Select OK.

When the formatting is complete, select OK.

Data disk healthy and ready for use

Image description

The data disk on the virtual desktop

Image description

The data disk on the VM in Azure portal

Image description

Hope this is simple enough.

Top comments (0)