DEV Community

Cover image for How to create and attach a data disk to a windows 11 VM on Azure
PRECIOUS BEDEKEMO
PRECIOUS BEDEKEMO

Posted on

How to create and attach a data disk to a windows 11 VM on Azure

A data disk is a managed disk that's attached to a virtual machine to store application data, or other data you need to keep.

How to go about creating and attaching data disk to a Windows 11 VM on Azure?

Firstly, login to your azure account and create a windows 11 virtual machine following the easy steps:
1 - Click on virtual machine

Image description
2 - Click on create

Image description
Then click on azure virtual machine

Image description
3 - Choose your subscription
4 - Create new resource group
5 - Type your virtual machine name
6 - Choose your region

Image description
7 - Choose a particular zone
8 - Choose a security type
9 - Choose an image in this case windows 11

Image description
10 - Choose a size from the drop-down of your choice
11 - Pick a username
12 - Input password
13 - Confirm your password
14 - Click on 'allow selected ports'

Image description
15 - Choose any port under select inbound ports
16 - Click on box for confirmation

Image description
17 - Click on disks to go to the next page
18 - Choose an OS Disk size
19 - Choose an OS disk type
20 - Click on delete with VM

Image description
Creating a disk data
24 - Click on 'Create and attach a new disk'

Image description
25 - Name your data disk
26 - Choose disk size
27 - Click delete with VM
28 - Click on OK

Image description
29 - Go to review and create page
30 - Click on create

Image description
Wait until the deploying process is complete...

Image description
31 - Once the deployment is complete, click on ' Go to resource'

Image description
32 - Click on connect

Image description
33 - Next, click on download RDP file

Image description
34 - open the location of the downloaded file

Image description
35 - Double click on the downloaded file

Image description
36 - Click on connect

Image description
37 - Enter your password

Image description
38 - Click yes

Image description
39 - Click on next
Image description
40 - Click on accept

Image description
41 - Right click on the windows icon on your newly opened windows 11 VM

Image description
42 - Then click on disk management

Image description
43 - Click on OK

Image description
44 - Scroll down to disk 2, right click on the box and select new simple volume

Image description
45 - Click on next about 3 times on the wizard box

Image description
46 - Click on finish

Image description
You will notice a new volume F. That's the newly created data disk as shown in the image below

Image description
47 - Open your file explorer on your Windows 11 VM, then click on this PC to access the data disk

Image description
You now see the new data disk we've created as shown in the image below

Image description
To rename your data disk, right click on the new volume F and click show more options

Image description
And then rename it ...

Image description
And there you have it!
A data disk for storing application data and other forms of data.

Image description
NOTE: In the image above, the disk labelled A is the OS Disk, the disk labelled B is the temporary disk while the one labelled C is called the data disk.

What though is the difference between the OS disk, Data disk and Temporary disk?

OS disk - It only contains the OS information including the boot volume. It is not advised to store application information here.

Data disk - A data disk is a managed disk that's attached to a virtual machine to store application data, or other data you need to keep. 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.

Temporary disk - The temporary disk provides short-term storage for applications and processes, and is intended to only 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.

To learn more about storage disks, click here.

Image description

Please drop your comment on this post below. Hope this post has proved helpful to you. Thanks!

Top comments (0)