How To Add A Data Disk To A Virtual Machine And Initialise It For Use

In this tutorial, we will dive into enhancing your Azure Virtual Machines (VMs) by adding extra storage capacity with data disks. We will cover the entire process, from creating a new data disk to attaching it to your running VM and finally initializing it for use within your Windows environment.

Understanding the Difference: OS Disk vs. Data Disk

Before we begin, let's clarify the distinction between an OS disk and a data disk.

  • OS Disk: This is the core of your Virtual Machine. It houses the operating system (like Windows Server) and all the essential files needed to boot and run your VM. Think of it as the foundation upon which your VM operates.

  • Data Disk: This is where you add extra storage space. It's like an external hard drive for your Virtual Machine, allowing you to store application data, user files, databases, and more. This keeps your primary OS disk lean and helps optimize performance.

Let’s Get Started!

  1. Create Your Windows 11 VM: First, you need to create a Windows 11 virtual machine.

  2. Find Your VM: Locate your newly created Windows 11 VM within the Azure portal.

  3. Go to Disks: In the left-hand menu of the VM overview, you'll find a tab labeled "Disks." Click on this tab.

  1. After selecting your VM, scroll down the page. You'll find a button labeled 'Create and attach a new disk'. Click on this button to proceed.

  1. Name Your Disk: Assign a descriptive name to your new data disk. You can leave the other settings at their default values.

  2. Save Your Changes: Click the "Save" button to apply the changes.

  1. Notice that the OS disk and the data disk are two different components. The OS disk is where your operating system resides, while the data disk provides extra storage space.

  1. To connect to your virtual machine, download the provided RDP file. After downloading, open the file and follow the instructions on the screen. You will be prompted to enter your username and password.

  1. Now that you have remote access to your Windows desktop, right-click on the Windows icon and select 'Disk Management.

  1. Right click on the disk 2 below. From the drop down click on "new simple volume".

  1. To continue click next on the new simple volume wizard.

  1. Click "Next" on the specify volume size.

  1. Also click "Next" on the Format Partition

  1. To close the wizard click "finish"

  1. In the new volume highlighted Red, you can see that our new volume has been initialized.

  1. As shown below, our new data disk is available and ready for use.