How to Create and Attach Data disk to an existing Windows 11 Virtual machine in Azure.
It is important to know that there is a difference between an (operating system) OS disk, temporary disk and a data disk.
OS DISK
Every Virtual Machine comes equipped with an associated operating system disk. This disk is already set up with the selected operating system at the time of the virtual machine’s creation and contains a boot volume. It’s typically advised to use the OS disk solely for operating system files, while applications and data should be stored on separate data disks. Nevertheless, if budget considerations are a priority, you may opt to utilize the operating system disk for your applications and data instead of adding a data disk.
DATA DISK
A data disk refers to a managed disk linked to a virtual machine, it purpose is for storing application data or any other important data. These data disks are recognized as SCSI drives and can work well with your preference. The capacity to attach data disks and the kind of storage that can be used for these disks are determined by the virtual machine’s size.
TEMPORARY DISK
virtual machines are equipped with a temporary disk that is not managed. This disk is designed for temporary storage needs of applications and processes, ideal for holding items like page files, swap files. It’s important to note that any data stored on the temporary disk could be erased if there’s a maintenance event, if the VM is redeployed, or if the VM is stopped. However, if the VM undergoes a standard reboot without issues, the data on the temporary disk will remain intact.
lets get started
Creating a data disk
A) you need to create a windows 11 virtual machine
B) b) To create your windows 11 virtual machine see my blog on how to create a Windows 11 Virtual Machine.
C) once you have created the virtual machine
D) Go to overview on your virtual machine in azure portal.
c) click on disk
D) Click on create and attach a new disk
e) Give your disk a name and click on apply to create your new data disk
f) After your data disk has been created.
connect the virtual machine with RDP
a) click on connect
b) download the RDP file and copy the IP address
C) open the RDP file and input the IP address then click on connect
d) Enter your virtual machine username and password
e) click on yes to accept the certificate
f) once you are connected you should have something like this.
Attach data disk to the virtual machine
a) right click on the windows command and click on disk management
b) on the disk management page , right click on disk 2 and select new simple volume
c) go to file explorer on your VM and your data disk will appear. you can choose to rename it.
d) you can move or copy any file into your new data disk
I hope this step-by-step tutorial helped you create your Windows 11 virtual machine. Thank you