How to Create Azure Virtual Machine and configure IIS.

THISISWALI
5 min readJul 11, 2024

--

In this article you might learn about creating Azure VM and configuring IIS in VM.

Prerequisites

  1. Azure subscription

Creating Azure Virtual Machine using Azure Portal

Step 1

Go to https://portal.azure.com/
and Sign-in the portal

Step 1

Step 2 || Create a Resource Group.

  1. Select the subscription
  2. Give a unique resource group name.
  3. Select a Region
  4. Review + create
Step 2

Step 3 || Create Azure Virtual Machine

  1. Click on Virtual machine
  2. Click on Create
  3. Select Azure virtual machine
Step 3 | Click on Virtual machine
Step 3 | Select Azure Virtual Machine

Step 4

  1. Select specific subscription (if you have multiple). Select the resource group (Test_RG) or you can create a new resource group.
  2. Give a VM name (TestVM) or you can choose any other name as well.
    - Region (By default appear based on your resource group region, you can change the region as well)
    - Availability options: Select No infrastructure redundancy required/ you may select another based on your requirements
    - Security type: Standard
  3. Select the Image (operating system): Windows Server 2022 Datacenter
  4. Select the Size | Standard_DS1_V2 ($53.29/month). Based on you selection cost will apply, so be careful on that. We can change the size later anytime as well.
  5. Administrator account: Provide- Username, Password, Confirm password and remember it.
  6. Select inbound ports: (HTTP, HTTPS, RDP)
Step 4
Step 4

Step 5 | Disks and Networking

Keep as it is, if you don’t want to add extra disk. You can add or remove disk after creating the VM as well.

Step 5 | Disk

Keep as it is, if you don’t want to configure. You can it after creating the VM as well.

Step 5 | Networking

Click on Review + create

Validation passed

Click on Create

Validation Passed
Deployment is in progress
Deployment has been completed

Step 6 |

Click on Go to resource or check the VM under Virtual machine navigation

  1. Click on TestVM
  2. Connect
  3. Download RDP file
Step 6
Step 6 | Connect
Step 6 | Download RDP file

Step 7 | Connect to VM

Open the downloaded RDP file

  1. Check the TestVM IP, and provide the correct credentials that we have provided in Administrator account section
  2. Click on OK
  3. Yes
Step 7 | RDP sign-in
Step 8 | Yes

Successfully connected!

Click on Add roles and features

Step 1 of 9

Next

Step 2 of 9

Next | Role-based or feature-based installation

Step 3 of 9

Next | Select a server from the server pool

TestVM

Step 4 of 9

Next | Select Web Server (IIS), click on Add Features

Step 5 of 9

Next | Select ASP.NET 4.8

Step 6 of 9
Step 7 of 9

Next

Step 8 of 9

Next | Check Restart this destination server automatically if required

Click on Install

Step 9 of 9

Installation Started …..

Succeeded

|| Installation Succeeded

Succeeded!

Now check IIS page

Open Edge Browser and type “localhost”

Type TestVM IP address as well

If you forget to add HTTP, HTTPS inbound port, just add under Network settings in Inbound port rule

--

--

THISISWALI
THISISWALI

Written by THISISWALI

Full Stack .NET Developer | Microsoft Azure Expert

No responses yet