Create a virtual machine using Microsoft Azure
Tags: beginners, tutorial, azure, cloudskills
Published: 2021-12-29 17:45:00

As a beginner in Azure or Cloud computing in general, Creating a Virtual Machine(popularly called VM) is one of the fundamental knowledge you need to have.

In simple terms, a virtual machine is a program on a computer that works like it is a separate computer inside the main computer. It is a simple way to run more than one operating system on the same computer. A very powerful server can be split into several smaller virtual machines to use its resources better.

_**How do I create a virtual Machine?**_

I'm sure this is one of your top question as a beginner in this field, be rest assured it is as easy as it can be.

Now log into the Microsoft Azure portal, Look for Virtual machine on the Dashboard , click on it and then click create

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h95daxz8ve0x66mppz28.PNG)

I am going to take it step by step, at this point I will advice you practice along.

Subscription should be left at Default - Azure Subscription 1 
(according to the diagram above)

Create a new resource group, so click  **"Create new"**.

Name the **resource group**- I will be naming mine **"Webservers"**

**Next** is Region , leave this at the default region recommended.

**Next** is Availability,  **set Availability as No Infrastructure redundancy required**.

**Next** is Image, set this to **Windows server 2019 Datacenter-Gen1**

**Next** is Size, pick **'Standard_DS1_v2-1 vcpu,3.5Gib memory** from the chart[note if you didn't see this, make use of the closest size in the standard section]

Then you set your Username and password [Make use of the username and password that will be accepted/ meets requirement and you can easily remember.
Now you have to select inbound Ports - Select the following;
**HTTP(80) HTTPS(443) RDP(3389)**

**Next** is licensing - Do Not Touch(STOP) we are not changing options here.

All done at this point guys...Click on Review + create

This is what your page should look like;


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo7drf9kfxqxjz2dz93g.PNG)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxitm6jaeg43h63ucppo.PNG)
Then you click **create**. 

Your deployment will be in progress( give it some minutes)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h9rzevk0901fwz8dwr46.PNG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75smy12qdu02zkruvqbd.PNG)

Once this is complete, you will get a page that will show you clearly that your **"Deployment is complete"**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9adaga6sa5g2h2wkvgg2.PNG)

##_Lets take this a Step further, YaaaY_##


Now it is time to click on the button **"Go to Resource"**

Next is to get On the top left, click Connect and select RDP.
To Connect with RDP:
IP address used Public IP address (20.106.149.142).
Port number is set to 3389.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n7ajtlmdydl0hqyut9fn.PNG)

**Click on Download RDP file and open the file**.

Enter the login credentials that you created within the Azure Portal (Your username and password that I advise to use if you can  easily remember).Depending on your network you may need to click on other account and enter \iisadmin as the username and the password you setup.

**Click connect and yes to accept the certificate**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5iozm2i1cvrwv0hw6n4o.JPG)


Now Login and Server Manager should be open


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cemkdzwljuw2z67862go.JPG)
Next is to Click on Add roles and features, make sure to follow the wizard and leave all the settings in the default settings, keep clicking next until you get to Server Roles.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h2m0xv09cvywimj6lu4f.JPG)

  Server Roles select Web Server (IIS) as shown in the diagram above. Select **Include management tools** (if applicable) then Click Add features.

   **Click Next >**

 The minimal features should already be selected and adequate.

 **Click Next >**

Scroll down, select IIS Management Console in Management Tools, then **click Next >**.

Select Restart the destination server automatically if required, then click Install. Once the installation has completed, **click Close**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8x0k3ovl3idyghpc4yw3.JPG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcgnvup2ndfgwro9r1bc.JPG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/temcxmcwhv4e5uug9sxo.JPG)
Go to the main menu of your computer and search for **Internet Information Services Manager(IIS)**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z50l1jemd1xcwzdsxb37.JPG)

Now you need to click on the > to the left of web01 (web01/iisadim) to open up the pane.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rqcg0b8p8pp8agcxuzgc.JPG)

Make sure to click the arrow next to sites to access the default website.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t4uadtw7415v9bkqy2to.JPG)
Now right click on the default website.
  
 **Select Manage Website**.
 **Select Advanced Settings**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/979lxfblzbfh1arupjvz.JPG)

  Look for and copy the physical path which should be somethiing like **_*%SystemDrive%\inetpub\wwwroot_**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80m5b9isf44l2yg1c4u0.JPG)
Then Open File Explorer.
Go ahead to Enter this **"%SystemDrive%\inetpub\wwwroot"** physical path into the search bar at the top 

You right ight click on the empty space and select Net Text Document and then open the text document.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12t4ww67p8jdchqtzft0.JPG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2ncjurek0kdd53gujlc.JPG)
Now enter the following text with no markup into the text document.
**_Welcome to my initial web page_**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/soja6kuber9ffidzwuj9.JPG)

Next, **Click File and save as index.html**, Make sure to Change the Save as type as All Files.
Then **Click Save**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tq6qlsxnmmya2jjj2jxb.JPG)
   This will take precedents over the iisstart file and you should now see this page as your home page when you go to the public IP address
 When you go to the public IP address used earlier, you should see the home page you created with the text **"Welcome to my initial web page"** just like this;

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pci9p9iau4y7a3u95xkm.JPG)

**_That is all guys...Pretty straight forward right?_**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jrcolszaycadsy5pl9uj.png)

## Well done if you have come this far... Great Job!##
This is a hands on-experience on creating a VM and webserver on Azure.

_See you on my next blog, guys!!!_