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. Instructions on creating, resizing, and deleting data disks in Azure are 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! 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 Azure's Virtual Machine management area. Typically, a button link 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 the 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. To this point, you've purchased the metaphorical physical hard drive and shoved it into the server. You still have to do the Windows administration bit. 

Navigate 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'll give you the short 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 it in the list of disks in the primary pane of 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 the disks attached to the VM 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 to change 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 disk size, 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 just upgraded the size of your hard drive with a button. Some might say you 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 it prudent to confuse people by disabling the delete button in the disk manager. It makes sense once you understand how to delete a disk in an Azure VM. 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. 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, including creating, deleting, and mounting storage drives. 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 offers a variety of skill courses to help you. 

If you want to improve your cloud infrastructure, consider learning to use Azure services with virtual machines. Azure offers many products, such as SQL Server, document-driven databases, AI tools, and more. Though your virtual machine might be the heart of your IT services, nothing can stop you from supercharging it. 

That said, you might be interested in learning Azure IaaS compute solutions online, too. Compute solutions complement hosting services within virtual IT infrastructures, and this is an excellent skill to have. 


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