DEV Community

Cover image for Adding Disk To VM, Azure Compute Gallery and Virtual Machine Scale Set. #Part 1
Busa Ayim-Odu
Busa Ayim-Odu

Posted on

Adding Disk To VM, Azure Compute Gallery and Virtual Machine Scale Set. #Part 1

Configuring the Virtual Machine Scale Set with Azure Compute Gallery

We used the Azure interface to establish a Virtual Machine (VM) in our earlier post. I suggest reading the article to get started if you haven't already. Instead of constructing a virtual machine at this point, we will add a disk, create an image, and configure a Virtual Machine Scale Set for efficiency and scalability.

  1. Adding a Disk to Your VM

Go to the Azure portal, navigate to Virtual Machines, and select the VM you created.
Image description

Attach a Disk:
VM Disk

  • Under the Disks section, click Add data disk.
  • Select Create disk to configure a new managed disk.
  • Choose the disk size, performance tier, and other configurations as needed, then click Save.
  • This additional disk provides extra storage for your application and data needs, enhancing your VM's capability. Data Disk

Once you’ve added a new disk to your Azure VM, formatting it ensures that it’s properly initialized and ready for use. Here’s a quick guide to format and mount the new disk in your VM:

Formatting the Disk in Your VM

  • Connect to Your VM: VM Native
  • Note: Make sure to select the native RDP option. In some cases, you may need to start your VM if it has been idle or set to enter idle mode. Wait until the configuration status turns green and indicates "configured." Once that's done, you can download the RDP file to access your VM. Download

If it’s a Windows VM, connect via Remote Desktop (RDP).
For a Linux VM, connect via SSH.
Windows VM

Initialize and Format the Disk:

For Windows VM:

  • Open Disk Management by right-clicking the Start Menu and selecting Disk Management. Disk Mgt
  • Locate the new disk, which will appear as “Unallocated.Disk Disk 2
  • Right-click the unallocated space and select New Simple Volume.

Simple volume

  • Follow the wizard to assign a drive letter, format it with NTFS (or another file system as needed), and label the volume. Name disk

Format Finished

Assigned disk

Top comments (0)