How to Deploy a Virtual Machine in Azure and Initialize the Data Disk for Use
Table of contents
- Step 1: Log in to the Azure Portal
- Step 2: Create a Virtual Machine
- Step 3: Add and Configure Data Disks
- Step 4: Configure Networking
- Step 5: Management
- Step 6, 7 and 8: Monitoring, Advanced, and Tags
- Step 9: Review and Create the Virtual Machine
- Step 10: Connect to the Virtual Machine
- Step 11: Open Disk Management
- Step 12: Initialize the Data Disk
- Step 13: Create a New Volume
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
Open a browser and navigate to Azure Portal.
Enter your credentials to log in.
Azure Portal home page after logging in.
Step 2: Create a Virtual Machine
- In the Azure Portal, click on Virtual Machine under Azure services
- On the Virtual Machines page, click Create. From the options that appear, select Azure Virtual Machine.
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
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
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.
Select your desire NIC network security group, Public inbound ports, & Select inbound ports
Select your desire Load balancing options
Click Next: Management > to proceed.
Step 5: Management
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'.
Patch orchestration options: Select your desire Patch orchestration options to control how patches will be applied to your virtual machine.
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
Review all configuration details in the Review + Create tab.
Click Create to start the deployment.
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
Navigate to Virtual Machines in the Azure portal, or click on 'Go to resource' on the completed deployment page.
Select the VM you created.
Click Connect > RDP and download the RDP file.
Open the RDP file and log in using the credentials set earlier.
Step 11: Open Disk Management
After logging into the VM, right-click the Start button and select Disk Management.
The Initialize Disk window should appear automatically.
Step 12: Initialize the Data Disk
In the Initialize Disk window:
Select the new disk.
Choose the partition style (e.g., GPT).
Click OK.
Step 13: Create a New Volume
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.
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.