DEV Community

Romanus Onyekwere
Romanus Onyekwere

Posted on

Create a Windows Virtual Machine in the Azure portal. Step-by-Step Guide

Steps

  1. Introduction of Virtual Machine
  2. Sign in to the Azure portal
  3. Create a Virtual machine
  4. Connect to the virtual machine
  5. Clean up resources

1. Introduction
What are Virtual Machines?

  • VMs are emulations of computer systems.
  • They provide the functionality of a physical computer.

Why Azure Virtual Machines?

  • On-demand, scalable computing resources.
  • Flexibility: Choice of OS, size, and configuration.
  • Scalability: Adjust resources based on demand.
  • Support for Windows and Linux.
  • Full administrative control over the VM.

Azure virtual machines (VMs) can be created through the Azure portal. This method provides a browser-based user interface to create VMs and their associated resources. This quickstart shows you how to use the Azure portal to deploy a virtual machine (VM) in Azure that runs Windows Server 2019. To see your VM in action, you then RDP to the VM and install the IIS web server.

  • If you don't have an Azure subscription, create a free account before you begin
  • Click try Azure for free and follow the prompt Image description

2. Sign in to the Azure
Sign in to the Azure portal

3. Create a virtual machine

  • Enter virtual machines in the search bar
  • Under services select virtual machine
    Image description

  • On the virtual machines page, select Create and the Azure virtual machineThe Create a virtual machine page opens
    Image description

  • On the Basics tab under Project details enter Azure Subscription 1 for the Subscription and onyekwereRG for the Resource group created or enter the existing name.

  • Under Instant details enter onyekwereVM for the Virtual machine name

  • Choose Windows Server 2022 Datacenter; Azure edition- x64 Gen 2 for the Image.

  • Leave others at defaults
    Image description

Image description

  • Under the Administrator account provide a username such as azureuser and a password
  • Confirm the password

Image description

  • Under inbound port rules, choose Allow selected port and then select RDP (3389) and HTTP (80) from the drop-down
  • Leave the rest at default
  • Click review and create

Image description

  • After validation runs, select the Create button at the bottom of the page
    Image description

  • After deployment is completed, select Go to resource
    Image description
    4. Connect to Virtual Machine
    Create a remote desktop connection to the virtual machine.
    These directions tell you how to connect to your VM from a Windows computer. On a Mac, you need an RDP client such as this Remote Desktop Client from the Mac App Store

Image description

  • On the overview page of your virtual machine, select the Connect > RDP

Image description

  • In the Connect with RDP tab, keep the default option to connect by IP address over port 3389, and click on Download RDP file
    Image description

  • Open the downloaded RDP file and click Connect when prompted.
    Image description

  • In the Windows Security window, enter your password

  • Click OK.

Image description

  • You may receive a certificate warning during the sign-in process.
  • Click View certification to install Certification.

Image description

  • Click on install

Image description

  • Certificate import wizard
  • Click next

Image description

  • Click Finish

Image description

  • Click Yes to create the connection and your Virtual Desktop is created

Image description

5. Clean Up
Delete Resources

  • When no longer needed, you can delete the resource group, virtual machine, and all related resources.
  • On the Overview page for the VM, select the Resource group link.
  • At the top of the page for the resource group, select Delete resource group.
  • A page will open warning you that you are about to delete resources. Type the name of the resource group
  • Select Delete to finish deleting the resources and the resource group.

Top comments (0)