DEV Community

Cover image for HOW TO CREATE A WINDOWS VIRTUAL MACHINE ON AZURE
Adeyemi A
Adeyemi A

Posted on

HOW TO CREATE A WINDOWS VIRTUAL MACHINE ON AZURE

This is a guide to take us through the process of deploying a virtual machine on Azure without altering any default setting for disk, networking, management, security, or monitoring.

Deploying a Windows 10 virtual machine (VM) on Azure allows for utilization of Microsoft’s cloud infrastructure for various purposes, such as development, remote work and best for testing out new operating systems, including beta releases.

STEPS TO DEPLOYING A VIRTUAL MACHINE



- STEP 1: Sign up and Sign in to Azure portal
Having an Azure subscription is a prerequisite to deployment. You can sign up here, Follow the prompts to set up your account and proceed to log in upon successful registration with your email and password respectively. Please note that registration may involve verifying your identity with a credit/internationally recognized debit card.

- STEP 2: Create a Virtual Machine
Upon Sign in, the dashboard view should look like the below

AZURE DASHBOARD

Navigate to Virtual Machines:

  • In the Azure Portal, click on the left-hand menu indicated by the red arrow

Step 1 of VM Deployment

- Select “Virtual machines”
VM Selection

- Select "Create" and then "Azure Virtual Machine"

VM Creation

Project Details
- Step 3.1: Basics

  • Subscription: Select your Azure subscription by clicking on the “Azure subscription icon”. if you have multiple subscription you can choose the one you desire to use as well.

Basics page on VM Deployment

  • Resource Group: Resource groups help you manage related resources that you use in the Azure cloud. This groups the resources that you create with the same permissions, policies and lifecycle for better accessibility and functionality. Create a new Resource by clicking on “Create new”, type in the preferred name of resource and Press ok, your resource group will be created or Choose an existing resource group by clicking on the “(New) resource group” dropdown and select your resource group.

Resource creation

Instance Details

  • Virtual Machine name: Create a unique VM name (VM stands for Virtual Machine)

VM name creation

  • Region : A region can consist of three availability zones, known as Zone 1, Zone 2 and Zone 3. Each zone has one or more data centers that are kilometers apart from each other. Select a region that is closest to your users or resources for better performance.

Region selection

  • Availability Options & Availability Zones : You can choose options like availability sets or zones for redundancy. This option gives the opportunity to select the number of available zones preferred. These zones are in different areas in the selected region and the data centers are built in those zones and we can have multiple data centers within those zones. So, selecting a zone(e.g Zone 1) means your VM is in one of the datacenters in that Particular zone (Zone 1). You can select all the available zones for high availability, so when one zone checks out, the resources will still be highly available in the other zones.

Availability option and zones selection

  • Security Type : Select your security type from the drop-down

Security type

  • Image : An image is an operating system. It's like a outline for creating virtual machines / computer systems. It has all the instructions and settings required to set up a computer with a specific operating system and software. Select “Windows 10 Pro” from the list of available images. if you can’t find search for it by typing it in on the blue space bar underneath the red arrow or click on “see all images”.

Operating system image

DO NOT CHECK THE "Run with Azure Spot Discount". Azure Spot discount is a way to buy unused virtual machine (VM) capacity at a discount from Microsoft Azure. Spot VMs can offer discounts of up to 90% compared to pay-as-you-go prices. It's a cost savings option that you can use to run workloads that are not critical, so whenever Azure rescinds the discount, you would not be affected.

  • Size : Choose the size of the VM. Azure provides different VM sizes based on your performance and cost needs. You can see recommended sizes based on your selected image

Size

"Enable Hibernation" checkbox allows you to resume from where you left on your VM, exactly like hibernating a computer system. However, you need a more extensive size to be eligible for the enable hibernation option.

Hibernation

Administrator Account

  • Username and Password : Enter your desired username and a password for the Admin access into the VM

Username & password creation

  • Inbound port rules : You’ll see a section titled “Public inbound ports. Select either “Allow selected ports” or “None”. If you choose “Allow selected ports” you can check boxes for common ports like: RDP (3389): For remote desktop access.

HTTP (80): For web traffic.

HTTPS (443): For secure web traffic.

You can also select Custom to specify additional ports as needed.

  • Licensing : Confirm “licensing” by clicking on the box.

Port rules and licensing

Click NEXT: DISKS > button below

DISK

  • On the Disk page, Click on the OS disk type dropdown and Select "Premium SSD" or any disk type of your choice as shown below.

OS Disk type

  • Skip the Networking, Management, Monitoring and Advanced pages as default. Select "Review + create".

Upon Complete creation of VM, The below is expected

Complete VM Creation

Step 4: Access Your Windows Virtual Machine
Now that Creation and Deployment is complete, Click on "Go to Resource"

resource selection

  • Connect : Click "connect" dropdown and select "connect"

Connect

  • Download the RDP

Remote Desktop Download

  • Open the downloaded file on your laptop downloads by double clicking on it

RDP POP UP

  • Select "Connect"

  • Input your Username and Password earlier created as the Admin of the VM

Admin login

  • Click "Yes" to the security prompt

prompt

  • Welcome to your Remote Windows Desktop.

ActuaL VM

Step 5: Clean Up Resources
When you’re done with your VM, it’s essential to clean up resources.

  • Delete the VM: If you no longer need it, delete the VM and its associated resources from the resource group. Click on “Delete resource group”, “Enter resource group name to confirm deletion” then “Delete”.

deletion1

deletion 2

  • You can also delete the whole package i.e force deleting by Deleting the resource group with the VM in it. All will be deleted successfully

RG DELETION

Conclusion
With these steps, you can easily deploy a Windows virtual machine on Azure without changing any default settings for disk, networking, management, security, or monitoring.
Enjoy exploring your new Windows environment in the Azure cloud and well on your way to being a cloud engineer!

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more