DEV Community

Emmanuel
Emmanuel

Posted on

Creating, Attaching, and Detaching Data Disks on a Windows 11 Virtual Machine in Microsoft Azure: A Comprehensive Guide

DISKIN MICROSOFT AZURE

In Microsoft Azure, a disk is a virtualized storage device that can be attached to a virtual machine (VM) to provide persistent storage for data, applications, and the operating system. Azure offers different types of disks that vary in terms of performance, durability, and cost, allowing you to choose the most suitable storage solution for your VM's needs.

HOW TO CREATE A DISK ON MICROSOFT AZURE WINDOWS 11 VIRTUAL MACHINE

STEP ONE
Go to Microsoft Azure, click on the three bars highlighted.

Image description

STEP TWO
Select Virtual Machine.

Image description

STEP THREE
Click on the Virtual Machine

Image description

STEP THREE
Locate disk and click on it.

Image description

STEP FOUR
Click on create and attach new disk

Image description

STEP FIVE
At this stage, you are expected to select different options.

(a) Logical unit number; Logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.

(b) Disk Name: This is the name you give to the disk you are creating for your virtual machine.

(c) Storage type: This is the size capacity you want your disk should be depending on what you need the to do or the kind of project you have on ground.

Leave the rest on default.

Image description

STEP SIX
Click on apply.

Image description

After you clicked on apply, you should have that notification come up.

Image description

STEP SEVEN
Go to your virtual Machine...

Image description

STEP EIGHT
Go to file explorer

Image description

STEP NINE
Go to search bar and search for disk management.

Image description

STEP TEN
Go to the virtual machine, right click on the windows sign you see there and click disk management.

Image description

After clicking that you should have the image below.

Image description

STEP ELEVEN
Initialize the disk by clicking ok

Image description

STEP TWELVE
Right click on disk two and click on new simple volume.

Image description

STEP THIRTEEN
Click next

Image description

Click next

Image description

Click next

Image description

Click next

Image description

Click Finish

Image description

After these steps, you will notice the status of the disk will read "new volume F" "healthy basic data positioning"

Image description

STEP FOURTEEN
Go to file explorer
You will notice a new volume has been added "new volume F"

Image description

You can chose to rename it by clicking on more options.

Image description

Click rename

Image description

HOW TO DETATCH DELETE AND DATA DISK FROM WINDOWS 11 VIRTUAL MACHINE

STEP ONE
(a) Go to the virtual virtual machine and right click on the windows icon, click on disk management.

Image description

(b) go to the disk options then right click and select offline.

Image description

(c) go to the azure platform where we created the disk, click on the detach icon.

Image description

Click apply

Image description

when you go to this pc on the virtual machine, you will discover that the disk "new volume F" is no more available this is to show that the operation was successful.

DIFFERENCE BETWEEN OS DISK, DATA DISK AND TEMPORARY DISK

In Microsoft Azure, virtual machines (VMs) can use different types of disks for various purposes. Here is a summary of the differences between OS disks, data disks, and temporary disks:

(a) OS Disk: The OS disk contains the operating system and system files needed to boot and run the VM.
It is typically attached as the boot volume (often as the C: drive on Windows or / on Linux).
OS disks are persistent, meaning data on them remains intact even if the VM is stopped or restarted.
They can be either Premium SSD, Standard SSD, or Standard HDD, depending on performance and cost requirements.

(b) Data Disk: Data disks are additional disks that can be attached to a VM to provide extra storage space.
They are used for storing application data, databases, logs, or other persistent data.
Data disks are also persistent, so data on them remains intact even if the VM is stopped or restarted.
Like OS disks, data disks can be either Premium SSD, Standard SSD, or Standard HDD, depending on the desired performance and cost.
Temporary Disk:

(c) temporary disk: also known as a "local disk" or "ephemeral disk," is a local storage space located on the VM's physical host.
It is typically used for transient data such as temporary files, caches, or swap files.
Temporary disks are not persistent, so data on them is lost when the VM is stopped or deallocated.
They are designed for high-speed access to support tasks requiring quick data reads and writes.

In summary, OS disks and data disks are persistent and suitable for storing important data and applications, while temporary disks are non-persistent and used for transient data requiring fast access.

Thank you

Top comments (0)