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

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

on this project we will be learn how to create and attach a data disk to a virtual machine, and how to access the windows virtual machine and initialise the data disk for use.

It is important to understand that there is a difference between an (operating system) OS disk and a data disk. In Azure every virtual machine is equipped with a single (operating system) OS disk that is directly attached to it during the process of creating the virtual machine, This disk comes with a pre-installed operating system that was chosen during the creation of the virtual machine, and The disk contains the boot volume. It's advice that you should only store your OS information on the OS disk, and store all applications, and data on the data disks. Data disk is a managed disk that is attached to a virtual machine to store application data or other data you need to keep.

the following steps will gudie you on who to create and attach a data disk to a virtual machine:

a)The first step is to create a windows 11 pro virtual machine or any other vm you intend to attach the data disk.

b) To create your windows virtual machine please click on this link https://hashnode.com/post/cluv4p9vq000308jt9xa9ewbp to view my blog on step by step procedures on how to create a Windows 11 pro Virtual Machine.

c)Once you've created your virtual machine click on it.

d) On the left side-bar click on "Disks".

e) Once you click on it, scroll down and click on create and attach a new disk.

f)Give your new disk a name and leave the other information as default.

g)Click on apply and save as shown below.

h)You can see that the (operating system) OS disk and data disk are two different disks.

Connect to your virtual machine and download the RDP file and follow the prompt, input your username and password.

Now that you been able to gain remote access to your windows Desktop, right click on the Windows icon and click on Disk Management.

Right click on the disk 2 below.

From the drop down click on "new simple volume".

To continue click next on the new simple volume wizard.

Click "Next" on the specify volume size.

Also click "Next" on the Format Partition

To close the wizard click "finish"

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

Click on your new data disk "Disk 2" highlighted red.

As shown below, our new data disk is available and ready for use, and this can be access via the file explore.

Thanks for reading and I hope this was helpful.....