Certifications / Microsoft

How to Manage Data Disks in an Azure VM

by Team Nuggets
How to Manage Data Disks in an Azure VM picture: A
Follow us
Published on June 16, 2022

Are you running low on storage space in your Azure VM? Do you need to know how to manage data disks in an Azure VM? If so, we have you covered. You will find instructions on creating, resizing, and deleting data disks in Azure below. So, let's get into it!

An Overview of How to Manage Disks in Azure VMs

In this video, CBT Nuggets trainer James Conrad explains adding additional storage or data disks to an Azure virtual machine.

How to Manage Data Disks in an Azure VM

Do you need to add a new drive to your Azure VM? If so, you are in luck! Because the directions below will help you provision new storage drives in an Azure virtual machine. 

First, log in to the Azure dashboard. Then navigate to the Virtual Machine management area of Azure. Typically there is a button link that says Virtual Machines on the primary dashboard in Azure. 

Next, navigate to the Disks management pane in Azure from the left-hand navigation menu in the VM dashboard. You should see an option to create and attach a new disk. Click that button. 

A web wizard should appear. You'll need to edit a few options. First, name your disk. Think of something creative. As an IT person, this is your time to let your creative personality shine! Also, make sure that name is descriptive, too. 

After naming your disk, select the disk storage size. This can be changed later if needed. Make sure host caching is selected, too. There are reasons not to use host caching, but you'll know if you should avoid that option. That's beyond the scope of this article. 

Finally, click the Save button in the top menu bar. 

That's it! You've created a new drive in your Azure VM. But you aren't done yet. All you've done to this point is purchased the metaphorical physical hard drive and shove it into the server. You still have to do the Windows administration bit. 

Navigate back to the main Virtual Machine dashboard and select the virtual machine you want to manage. After choosing that virtual machine, there should be a button to connect via SSH or RDP. Choose the RDP option. In this article, we're running a Windows house, not a Nix house!

Choosing the RDP option should download an RDP config file. Once you download that file, double-click it and launch RDP from your local computer. This will let you connect to your Azure VM remotely through an RDP session.

The following bits are a bit beyond the scope of this article, so we're going to give you the tl;dr version.

Right-click on the Start button and choose Disk Management from the pop-out menu. Once the Disk Management snap-in loads, you should be prompted with a warning to initialize the new disk you provisioned in Azure. Go ahead and initialize it.

Once the new disk is initialized, locate that disk in the list of disks in the primary pane in the Disk Management snap-in. Then right-click that drive and select 'New Simple Volume' from the pop-out menu. Follow the instructions in the disk management wizard that appears. 

That's it! Your Azure VM has a brand new, shiny data disk. 

How to Edit a Data Disk in Azure

Wouldn't it be nice if you could click a button on the side of your server and instantly double each drive's storage space? You would never need to swap drives and wash server gunk off your hands again! That might sound too good to be true, but I assure you, it is not.  At least it's not if your server is an Azure virtual machine. Let's discuss how you upgrade the storage space in an Azure VM. 

First, log in to the Azure dashboard. Next, navigate to the Virtual Machine management dashboard in Azure. 

Once in the VM dashboard in Azure, select the virtual machine that the disk is attached to that you want to resize. Then select 'Disks' from the left-hand navigation menu. 

A menu should appear with a list of all of the disks attached to the VM that you selected. Click the disk that you want to edit from that list. 

Once the disk is selected, new options should appear in the left-hand navigation menu. There should be an option for changing the size and performance of the disk. Select that option. 

New options will appear in the primary pane. You should see a couple of drop-down boxes. One drop-down box will let you select the size of the disk, and the other will let you provision performance (E.g. select an SSD vs. a mechanical drive).

Change the settings in those drop-down menus. Finally, click the Save button in the top menu bar.

And… that's it! You literally just upgraded the size of your hard drive with the click of a button. Some might say you even downloaded extra storage space, but that would be wrong. You didn't download anything at all. 

How to Delete a Disk in Azure VMs

Deleting a disk in an Azure VM can be a bit confusing. For whatever reason, Microsoft felt that it would be prudent to confuse people by disabling the delete button in the disk manager. Once you understand how to delete a disk in an Azure VM, it makes sense. You can tell engineers designed the interface since it's similar to real-life server management. 

Here's the long and short of it. A disk mounted to a VM cannot be deleted. It must be unmounted first. Thankfully, Azure handles the deletion process for you once the disk is unmounted. So, here we go. 

First, log in to your Azure dashboard. Then navigate to the Virtual Machine area in Azure. 

Next, select the virtual machine that the disk is attached to that you want to delete. Select disks from the left-hand navigation window once the manager opens for that virtual machine. 

Once that page loads, you should see a list of the disks attached to the VM you chose in the previous steps. To the right of each disk should be an 'X' button. Click that button. Then read and click through any warning messages.

Finally, click the Save button in the top menu bar.

I hope you saved your data before deleting that disk because it's gone now. Congratulations! You now know how to delete a disk from an Azure VM. 

How to Learn More About Data Disks in Azure VMs

Today you have learned how to manage data disks in an Azure VM. That includes creating, deleting, and mounting storage drives in Azure. Of course, this is a blog article and not structured content.  If you want to take a deeper dive into managing Azure virtual machines, CBT Nuggets has a variety of skill courses to help you. 

If you want to up your cloud infrastructure game, think about learning how to use Azure services with virtual machines. Azure has tons of products like SQL Server, document-driven databases, AI tools, etc. Though your virtual machine might be the heart of your IT services, there's nothing to stop you from supercharging it. 

With that said, you might be interested in learning Azure IaaS compute solutions online, too. Compute solutions are complementary to hosting services within virtual IT infrastructures. This is an excellent skill to know. 


Download

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.


Don't miss out!Get great content
delivered to your inbox.

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2024 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522