Step-by-Step Guide: Creating a Virtual Machine, Attaching a Data Disk, and Preparing It for Use

Step-by-Step Guide: Creating a Virtual Machine, Attaching a Data Disk, and Preparing It for Use

Ready to set up your virtual machine and get started with Azure? This friendly guide will walk you through creating a virtual machine, attaching a data disk, and initializing it for use. You'll also learn how to remotely access your Windows VM to configure the attached disk.

When you create a virtual machine in Azure, it comes with an operating system (OS) disk by default. Think of this as the brain of the VM—it contains the OS you selected during setup and handles everything needed to run your virtual machine.

Now, what about data disks? These are like extra storage drives you can attach to your VM. They’re perfect for keeping application files, user data, or other important content separate from the OS. This not only helps keep things organized but also makes your virtual setup more scalable and easier to manage.

Creating a Windows 10 Pro virtual machine gives you a flexible, sandboxed environment to explore and test features without messing with your main system. It’s a great way to experiment and tailor a setup to your exact needs.

Let’s dive into the step-by-step process for setting up your Windows 10 Pro VM!

1. Sign In to Azure Portal

Before you begin, ensure you have an Azure subscription. If you don’t have one, you can create a free account by visiting the Azure website. Once your subscription is set up, log in to the Azure portal using your email address and password to start the process.

2. Create Your Virtual Machine

a. In the Azure portal search bar, type "Virtual Machine".

b. From the search results, select "Azure Virtual Machine" from the list of available resources.

c. Click on the "Create" button.

d. Follow the prompts and select the desired virtual machine configuration to proceed.

e. You will be directed to the "Basics" page.

Project Details

In this section, we cover the Subscription and Resource Group:

a) Subscription
An Azure subscription is essentially access to Microsoft Azure services. It’s like subscribing to a service plan, where individuals or organizations can use Azure’s resources for a cost based on the subscription type. Free and trial options are also available to explore Azure before committing to a paid plan.

b) Resource Group
A Resource Group in Azure is a container that helps organize and manage resources, such as virtual machines and databases. Imagine you’re managing a project with different tasks. A Resource Group is like a project folder, where all the related files, documents, and notes are stored together, making it easy to access and manage them.

Instance Details

a) Name your virtual machine
Choose a name for your virtual machine.

b) Select your region
Pick the location where you want your virtual machine to be. A region is a specific geographical area with its own data centers that host the infrastructure and services. Each region is independent and has its own resources.

c) Choose availability option and zone
Next, select your availability option and zone.
A region can have three availability zones (Zone 1, Zone 2, Zone 3). Each zone has one or more data centers, located several kilometers apart, with independent power, networking, and cooling systems to prevent service disruptions. These data centers are connected by high-speed fiber optic cables, ensuring fast, reliable data transmission.

d) Select the security type from the drop down menu
e) In the image section, select Window 10 pro from the drop-down

An image is like a template for creating virtual machines or computer systems. Think of it as a detailed recipe that includes all the ingredients (like the operating system and software) and instructions needed to set up a computer. Once you apply the image, it automatically sets up the system exactly as the template specifies.

f) Select the size of your virtual machine from the drop-down or click on "See all sizes". Leave the other information in its default state.

Administrator Account

a) Choose a username and set a password for your account. Then, re-enter the password to confirm it matches.

Inbound Port Rules

In the Inbound Port Rules section, choose "Allow selected ports" and then select RDP (3389). This will enable remote access to your physical work desktop computers.

Click "Next: Disks>" to proceed to the Disk page.

Disk

a) On the Disk page, click the dropdown for the OS disk type and select Standard SSD or another disk type of your choice. Leave the other settings as default.

b) Leave the settings on the Networking, Management, Monitoring, and Advanced pages as default.

c) Adding a Data Disk
On the Disks page, scroll to the Data disks section and click Create and attach a new disk. Specify the desired size (e.g., 1024 GiB) and leave the other settings as default. Click OK to attach the disk, then proceed to the next steps to finalize the virtual machine setup.

Networking Setup

a) Now, move to the Networking tab. Set the NIC Security Group to Basic and create a public IP by selecting "Create new" under Public IP. Name it something recognizable, like "magas-ip", and click "OK" to confirm the changes.

b) In the Networking tab, scroll down to the Load balancing section. Load balancing is a method of distributing traffic evenly across multiple servers to ensure no single server is overwhelmed, improving reliability and performance.

For this setup, select None under load balancing, as it's not required for a single virtual machine configuration. This helps keep the deployment straightforward and avoids unnecessary complexity or costs. Once selected, click Next to proceed to the Management tab.

Finalizing the Configuration

In the Management and Monitoring sections, leave all settings at their default values. Proceed to the Advanced tab and do the same, keeping the default configurations.

Next, navigate to the Tags section, where you can optionally add metadata to organize resources but can also skip this step.

Finally, click on Review + create. Once Azure validates your configuration and confirms all settings are correct, click Create to deploy your virtual machine.

Accessing Your Newly Created VM

Once your virtual machine has been successfully created and the deployment is complete, navigate to the Overview tab from the right-hand panel. Here, you'll see details about your newly created VM.

To connect to the VM, click Connect at the top of the page. From the dropdown options, select RDP to generate the native Remote Desktop Protocol (RDP) file. Download the file and use it to connect to your VM.

Using the Downloaded RDP File
Once you’ve downloaded the RDP file, open it to initiate the remote connection. A prompt will appear asking for the login credentials. Enter the username and password you set during the VM creation process.

Login to the VM
After entering your credentials, you’ll be logged into the virtual machine. Congratulations! You’ve successfully created and connected to your VM.

Initializing the Data Disk
To prepare the newly attached data disk for use:

  1. Inside the VM, right-click on the Windows icon and select Disk Management.

  2. Locate the unallocated disk (e.g., Disk 2) in the list of drives.

  3. Right-click on the unallocated disk and choose New Simple Volume.

  4. Follow the steps in the setup wizard to partition and format the disk.

With these steps completed, your VM is fully set up, and the attached data disk is ready for use!