Add Hard Drive to a Virtual Machine in Azure

At Microsoft Azure, we can deploy virtual machines and can monitor their health and setup even monitoring for its resources.

When we are running data consuming processes, we may run out of space for the virtual hard disk drive we have installed for virtual machine.

We may need to add additional disk space to store the software or databases. To add additional disk in virtual machine, follow the following steps.

Add Hard Drive to a Virtual Machine in Azure

Remote desktop access your virtual machine by using the public IP address provided in Azure.

Open remote desktop connection and enter the public IP then enter your user name and password for virtual machine.

Once connected to your virtual machine.

Open you virtual machine file explorer, and go to Computer / This PC, now you can see that you have two storage, one is C drive and one is temporary storage.

In temporary storage, any saved file will be deleted once you turn off the virtual machine.

Now go to your Azure portal select the VM and click on Disks, Then click on Add Data Disk.

It will open up a box, add the required information for your data disk. Like the name of the disk, Source type, Account type, the size of the disk and storage container, where that disk will be saved and then click OK.

Once done, click on Save.

Once your disk is created, go to your virtual machine disk management. Now you can see the additional disk space. There you can see the created unallocated additional disk space.

Note: Windows Server 2016 will auto initialize the Disk. If you are using Windows server 2008 or older you will need to go to Disk Management and  initialize the Disk to make it available for use.

Windows Server 2016 you’ll see that a new hard disk has been created and mapped with the computer.

When creating a storage, it also shows a vhd URL which can be used to map that virtual hard disk with your local computer as well.

Please note that in Microsoft Azure, we are charged for every read write operation on the disk. As much as we are using the disk it will be charged. Only data saving will not be charge.

Muhammad Imran Habib

Imran is a technology evangelist with 8 years of experience working with some of the Industry leading companies. Imran's expertise includes On-Prem/Virtual Infrastructure deployments, IT Solutions for SMEs, End User Computing Support.

You may also like...