DEV Community

Cover image for How to Create a VM Data Disk, Initialize it and make it usable in Microsoft Azure
Tawo Wilmer Busa
Tawo Wilmer Busa

Posted on

How to Create a VM Data Disk, Initialize it and make it usable in Microsoft Azure

Introduction
An Azure VM Data Disk is a managed disk that provides additional storage for a Virtual Machine (VM) in Microsoft Azure. It is separate from the OS disk and is used to store application data, databases and other files.
In this article, we will be looking at step-by-step guidelines on how to add data disk and initialize it to make it usable on Azure VM.
Guideline on How to Add a Data Disk to a Windows Virtual Machine through the Azure Portal
Step 1: Create and Attach a Data Disk

Search for Virtual Machine in the search bar and select

Image description

  • Click on "Virtual Machines" and select the VM where you want to add a data disk

Image description

  • Add or create a new resource group

Image description

  • Choose a virtual machine name, region and availability zone

Image description

  • Choose the image (OS) and size of the virtual machine

Image description

  • Create a username and password

Image description

  • Inbound port roles

Public inbound ports: click on Allow selected ports
Select inbound ports: select HTTP (80)

Image description

  • Licensing

Click on tick mark(✓)
Click on Next:Disks >

Image description
On the disks section leave as default

  • Go to the Monitoring to disable the boot diagnostic

Image description

  • Go to Tag

Give it a name and value

click on Review + create

Image description

  • Go to Review + create_ and click create

Image description

  • Deployment in progress

Image description
Step 2: Create Data Disk

  • Click on the Go to Resource

Image description

  • On the overview go to settings
  • Click settings, then select disks
  • On Data disks page, click on + create and attach new disk

Image description

  • On the LUN: Choose disk name, storage type, and size
  • Click on apply

Image description

  • Data Disks Created

Image description
Step 3: Initialize and Format the Data Disk

  • Click on connect
  • Click on select and wait for the validation till it is configured

Image description

  • Click on Download RDP file

  • Connect to the VM: Use Remote Desktop (RDP) to connect to your Windows VM.

Image description

  • Open Disk Management: Press Win + X and select Disk Management (or type diskmgmt.msc in the search box and press Enter)

  • On Disk Management Click on create and format hard disk partitions

Image description

  • Right-click on the unallocated space of the new disk. Select New Simple Volume

Image description

  • Follow the wizard to assign a drive letter and format the disk Click Next

Image description
On the specify volume size use the default and click on next

Image description
On the assign drive path click on next

Image description
On the format partition give it a name on the volume label and click on next

Image description
Now Click on Finish to complete the process

Image description
Notice that the new disk is now showing Healthy and no longer unallocated.

Image description

Image description
Conclusion
This will be the end of our learning on Understanding how to attach new data disks to a Windows virtual machine through the Azure portal. With Azure, you can easily expand your VM’s capacity by adding more data disks or resizing existing ones to meet the demands of your workloads. I hope you had an informative learning journey on this topic.

Top comments (0)