How to Deploy a Virtual Machine in Azure and Initialize the Data Disk for Use

How to Deploy a Virtual Machine in Azure and Initialize the Data Disk for Use

Deploying a virtual machine (VM) in Azure and initializing its data disk is a critical skill for IT professionals. This comprehensive guide provides step-by-step instructions to ensure a smooth deployment and disk setup process. With clear directions and visual checkpoints, you'll be able to complete the task efficiently. Follow along to learn how to:

  • Deploy a virtual machine in Azure.

  • Add and configure data disks.

  • Initialize and format the disk for use.

Step 1: Log in to the Azure Portal

  1. Open a browser and navigate to Azure Portal.

  2. Enter your credentials to log in.

Azure Portal home page after logging in.

Step 2: Create a Virtual Machine

  1. In the Azure Portal, click on Virtual Machine under Azure services

  1. On the Virtual Machines page, click Create. From the options that appear, select Azure Virtual Machine.

  1. Fill in the required details in the Basics tab:

    • Subscription: Select your Azure subscription.

Resource Group: Create a new group or select an existing one.

Virtual Machine Name: Enter a name (e.g., "BENVM").

Region: Choose the desired Azure region (e.g., South Africa North).

Availability Option, Zone options, Availability zone, & Security type: Choose your desired options

Image: Select the operating system (e.g., Windows 10 Pro).

Size: Pick the appropriate VM size.

Administrator Account: Set a username and password.

Inbound port rules: Select which virtual machine network ports are accessible from the public internet.

Under Licensing Check “I confirm I have an eligible Windows 10/11 license with multi-tenant hosting rights.” and Click Next: Disks > to proceed.

Below Screenshots Captured the Basics tab with the completed fields.


Step 3: Add and Configure Data Disks

  1. In the Disks tab:

    • Specify the OS disk size (e.g., 128 GiB).

  • Under OS disk type, select a disk type (e.g., Premium SSD).

  • Under Key management, Select a key management type (e.g., platform-managed key)

  • Click Create and Attach a New Disk under Data Disks.

Click Next: Networking > to continue.

Step 4: Configure Networking

  1. In the Networking tab:

    • Select an existing virtual network or create a new one.

    • Configure the subnet and public IP settings as needed.

Most of the time, both virtual network and subnet are generated by default.

  1. Select your desire NIC network security group, Public inbound ports, & Select inbound ports

  2. Select your desire Load balancing options

  3. Click Next: Management > to proceed.

Step 5: Management

  1. Identity, Microsoft Entra ID, Auto-shutdown, Backup, & Guest OS updates:

    If you want, you can check the boxes to enable 'Enable system-assigned managed identity', 'Login with Microsoft Entra ID', 'Enable auto-shutdown', 'Enable backup', and 'Enable hotpatch'.

  2. Patch orchestration options: Select your desire Patch orchestration options to control how patches will be applied to your virtual machine.

  3. Click Next: Monitoring > to proceed.

Step 6, 7 and 8: Monitoring, Advanced, and Tags

Under Monitoring, Advanced, and Tags, you might select the necessary options you desire, or proceed to Review + create.

Step 9: Review and Create the Virtual Machine

  1. Review all configuration details in the Review + Create tab.

  2. Click Create to start the deployment.

  3. Wait for the deployment to complete.

    Screenshot of the Deployment in Progress below.

    Screenshot of when the Deployment completed below


Step 10: Connect to the Virtual Machine

  1. Navigate to Virtual Machines in the Azure portal, or click on 'Go to resource' on the completed deployment page.

  2. Select the VM you created.

  3. Click Connect > RDP and download the RDP file.

  4. Open the RDP file and log in using the credentials set earlier.

Step 11: Open Disk Management

  1. After logging into the VM, right-click the Start button and select Disk Management.

  2. The Initialize Disk window should appear automatically.

Step 12: Initialize the Data Disk

  1. In the Initialize Disk window:

    • Select the new disk.

    • Choose the partition style (e.g., GPT).

    • Click OK.

Step 13: Create a New Volume

  1. In Disk Management:

    • Right-click the unallocated space on the initialized disk and select New Simple Volume.

    • Follow the wizard:

      • Specify the volume size and click Next

      • Assign a drive letter.

      • Format the volume (e.g., NTFS).

    • Click Finish.

  2. The disk is now ready for use.

    From the screenshot below, you can see that the new volume, highlighted in red, has been initialized.

    Click on the New data disk to confirm its availability.

    You can also confirm the new data disk by clicking on File Explorer, then clicking on "This PC".

    .

By following this detailed guide, you can successfully deploy a virtual machine in Azure and initialize its data disk for use. Each step is designed to be clear and actionable, with visual checkpoints to verify your progress. If you have any further questions, please comment below this post and I will happily answer them. For personalized assistance, feel free to contact me directly.