This article describes the different types of Disks of a virtual machine (VM) and shows how to attach a new managed data disk to a Windows 11 virtual machine (VM), using the Azure portal.
Disk Types and Roles
There are three main disk types attachable to virtual machines in Azure, referred to as Disk roles. These are the OS disk, the data disk, and the temporary disk.
OS disk
OS stands for operating system, every virtual machine has one attached operating system disk. That OS disk has a pre-installed OS, which was selected when the VM was created. This disk contains the boot volume and OS information. User's data stored here is lost at vm shutdown or deletion.
Data disk
A data disk is a managed disk that's attached to a virtual machine to store user's data, application data, or other data you need to keep. Data disks are registered as SCSI drives and are labeled with a letter that you choose. The size of the virtual machine determines how many data disks you can attach to it and the type of storage you can use to host the disks. Its persistent, user data stored here is retained at vm shutdown or vm deletion and can be reattached to other vm. The size of the VM determines how many data disks you can attach.
Temporary disk
Most VMs contain a temporary disk, which is not a managed disk. The temporary disk provides short-term storage for applications and processes, which is intended only to store data such as page files, swap files, or SQL Server tempdb. Data on the temporary disk may be lost during a maintenance event, when you redeploy a VM, or when you stop the VM. During a successful standard reboot of the VM, data on the temporary disk will persist. It's not persistent.
Add a data disk
-Sign in to the Azure portal.
-Create our windows 11 virtual machine.
_To create your windows virtual machine see my blog on how to
create a Windows 11 Virtual
Machine.https://dev.to/sangifeanyi/how-to-create-a-windows-11-
virtual-machine-2l8f
-Search for and select your Virtual machine from the list.
-On the Virtual machine pane, select Disks.
-On the Disks pane, select Create and attach a new disk.
In the drop-downs for the new disk, make the selections you want, and name the disk.
Select Apply to create and attach the new data disk to the VM.
This creates and attaches the new data disk to your vm as shown bellow ;
Initializing a new data disk
-Connect to the VM.
see my blog on how to
create a Windows 11 Virtual
Machine.https://dev.to/sangifeanyi/how-to-create-a-windows-11-
virtual-machine-2l8f
-Select the Windows Start menu inside the running VM and enter diskmgmt.msc in the search box or right click on the Windows icon and click on Disk Management.
-Disk Management recognizes that you have a new, uninitialized disk and the Initialize Disk window appears.
-Verify that the new disk is selected, then click OK to initialize it.
-Right click on the disk 2 below.
-From the drop down click on "new simple volume".
-The New Simple Volume Wizard window opens.
-Proceed through the wizard, keeping all of the defaults.
-You may choose to change your volume size when prompted or accept the default and click next to continue.
-To complete and close the wizard click Finish.
In the displayed volumes lists, you can see that our new volume has been initialized, highlighted Red.
Close Disk Management and open file explorer and select the new volume (F) drive.
As shown above, our new data disk is available and ready for use.
Top comments (1)
welldone