Step-by-Step Guide to Creating a Windows VM, Setting Up and initializing a Data Disk for use on Azure with MacOS.

Step-by-Step Guide to Creating a Windows VM, Setting Up and initializing a Data Disk for use on Azure with MacOS.

In this tutorial, I would be your guide and give you step-by-step guidelines through the process of creating a virtual machine, attaching a data disk to the virtual machine, remotely accessing the virtual machine and finally, initializing the data disk for use.

Before going ahead, we need to understand some key words. What is a virtual machine? According to What Is a Virtual Machine and How Does It Work | Microsoft Azure, a virtual machine, commonly shortened to just VM, is not any different from the physical computer like a laptop, smart phone, or server. It has a CPU, memory, disks to store your files, and can connect to the internet if needed. While the parts that make up your computer (called hardware) are physical and tangible, VMs are often thought of as virtual computers.

Let’s get started………………

1.  SIGN IN TO AZURE PORTAL

If you don't already have an Azure subscription, create a free account before we get started. Now that you have created your Azure subscription, sign in to the Azure portal using your mail and password to get started.

2. CREATE A VIRTUAL MACHINE

a. In the search bar, type “Virtual Machine”

b. From the results, select “Virtual Machine” from the list of resources

c. Click on “Create” button

d. Select the highlighted option.

e. Under the Project Details, you would have to create a “Resource Group”.

A Resource Group is like a container where all your related resources are stored. It manages and organizes your cloud resources effectively.

f. Give the “Resource Group“ any name of choice and click “OK“.

g. In Instance Details, give the Virtual Machine a name as shown in diagram below.

h. Under Region, select the closest region to you in the drop box for resilient and redundancy.

Regions are geographical areas that contain one or more datacenters. These regions allow you to deploy and manage your applications and data in a location that meets your requirements for performance, availability, and compliance.

i. Select the zone options as shown in the diagram below.

j. Choose an Availability zone from the drop box. You can choose more than 1 zone at a time. Choosing more than 1 AZ helps make sure that you have your VM or resources is resilient.

An availability zone is a physically separate data center within a region that is designed to be available and fault tolerant. Azure has at least three availability zones in each region and defined by unique name as "Zone 1" or "Zone 2".

k. Click on the drop down for images and you can select the operating system you want. You have a list of different OS from Windows, Ubuntu, Red Hat, Linux etc.

l. Choose the size for the OS in the Size menu drop box as indicated below.

Every virtual machine has one attached OS disk. This disk has a pre-installed operating system, which was selected when the VM was created.

m. In the Administrator account, choose a Username and Password of choice and make sure not to forget it. You would need it when connecting to the remote desktop.

n. Select RDP port 3389 for the inbound port from the drop box.

o. Select the Licensing to confirm you have license right for hosting Windows since we selected the Windows operating system.

If you don’t select it, you won’t pass the Validation stage and that would mean that the VM won’t be created.

p. Select Next: Disks

q. For the OS disk size and type, click on the arrow and choose what best suits you.

r. Select Create and attach a new disk.

A data disks is a managed disk that's attached to a virtual machine to store application data or other data that you need to keep. We can say the OS disk is like drive C in a PC and the Data disk is like drive D, drive E, and drive F in a PC.

s. Select a desired Size for the OS disk.

t. For key management, Select Platform-managed key as indicated in the diagram.

u. Data disk has been created for the Virtual Machine.

Click on Review + Create.

v. Validation passed. You can now go ahead and click ”Create”.

Once deployment is successful, you have successfully created your virtual machine.

3. CONNECT TO VIRTUAL MACHINE

a. I am using a MacBook so I selected Connect via Bastion. For Windows, you just click on Connect.

b. Click Deploy Bastion.

c. Select Go to Bastion

d. Input the Username and Password that was created while spinning the VM under the Administrator account and Connect.

e. Once you have connected your Remote Desktop, you have entered your Virtual Machine.

4. INITIALIZE DATA DISK

a. To initialize the data disk, you right click on the Windows button and select Disk Management.

b. Click on the disk you want to initialize and select the partition style for the selected disk as indicated in diagram below.

c. The data disk shows Unallocated which means the disk is not ready for use. Right click on the disk to be initialized and select New Simple Volume.

d. Click Next on the dialog box

e. Select Next

f. Select Next

g. Select Next

h. To close the dialog box, Select Finish.

i. Data disk has been initialized and is ready for use as shown below.

j. Initialization process is complete and Data Disk is ready for use.

I hope my step-by-step guide would help you create a virtual machine, a data disk, remotely connect to the virtual machine and successfully initialize the data disk.