Think about simulations when you hear the word ‘virtual’. It can also be better explained using the term ‘computer generated’.
All thanks to some certain processes, you no longer need
to purchase hardware every time you need a different kind of operating system to
for example, run a particular application. This is because a ‘computer
generated’ computer, can now run on your laptop or desktop. This is possible
because of the process known as virtualization.
Virtualization uses hypervisors (a layer of abstraction
between the hardware, it’s OS and the guest OS) to accommodate other operating
systems on your hardware itself. This means that more than 1 operating system
can run on your computer device at the same time. The generated computer shares
the disk space of the existing hardware and imitates the hardware’s
functionality. Ultimately, through this technology, organizations can run
multiple operating systems and applications on a single server. Of course, I do
not need to mention the immediate advantages that it presents such as lesser
operating costs, as opposed to actually buying hardware every time you need to
run specific applications, with custom fit OS, and lesser purchasing and set up
time for these hardware machines.
Hardware (host machine)----Host OS (optional) ---
Hypervisor --- Guest OS libraries apps
Now, these hypervisors, mostly come in 2 types, Type
1 (also known as bare-metal hypervisor) these are loaded directly on a hardware,
just like an OS usually is example ishyper-v and Type 2 (also known as hosted
hypervisor) which is loaded on an OS running on the hardware, just like running
an application, a good example is Oracle VM (virtual box).
Image not mine, retrieved from https://www.youtube.com/watch?v=UEk0CKoeUnA |
However, instead of installing hypervisors on your
computer servers or OS, cloud computing providers make it even easier to create
virtual machines, as I said in my earlier blog post, this is an Infrastructure
as a Service, IaaS offering. This is because in this case, all you need to do
is log into their portal, create a resource (this particular resource being a
virtual machine), and follow the prompts to customize it to taste.
I will be logging onto Microsoft’s Azure portal and
showing you how to create a virtual machine shortly. Stay with me please.
Firstly, login to the Azure Portal.
Click on Virtual Machine within the left navigation pane.
In *Virtual machines* click on create.
Now configure setting for your Virtual Machine
*Subscription* can be left as default.
*Resource group* create one and name it as Webservers.
*VM Name* set to web01
*Region* can be left as default but double check that it is the region
that iis closest to your location.
In the Availability options bar, you can set it to 'No infrastructure redundancy required'.
For Image, use Windows Server 2019 Datacenter-Gen1
For Size, use `Standard_DS1_v2 - 1 vcpu, 3.5 GiB memory (If you do not see this size, you can choose the size in the standard section with the closest specifications).
For Username, use 'iisadmin'
For Password, use a password that meets the given requirements
Select inbound ports 'HTTP (80)', HTTPS (443), RDP (3389)
Don't change options for the licensing!!!
Click on 'Review + create'.
Click on 'Create'.
Once provisioning is underway, you will get a page that says something
along the lines of
'your deployment is in progress' and shortly after, 'your deployment is complete'.
Click on the button Go to resource.
On the top left click *Connect* and select *RDP*
When you click *Connect with RDP*, your IP address and port number are displayed. Mine were: Public IP address (40.85.165.209), and Port number 3389
Next, you should click on 'Download RDP file' and open the fileEnter the login credentials that you created within the Azure Portal for the username and password of the virtual machine (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
But why stop here? Why not take it a notch higher? Let's create a web page!
Once you login, the Server Manager should be open. Then you can click on 'Add roles and features'
Follow the wizard and leave all the settings in the default settings, keep clicking next until you get to Server Roles.Under Server Roles, select 'Web Server (IIS)',
Select 'Include management tools (if applicable)' and
The next thing to do, is to select 'Restart the destination server automatically if required', then click 'Install'.
Once the installation has completed, click 'Close'.
Go to the main menu for you computer and search for 'inetmgr' and open 'Internet Information Services (IIS) Manager'
Click the '>' to the left of 'web01 (web01/iisadim)' to open up
the pane
Click the arrow next to 'sites' to access the default website.
Right click on the default website, select 'manage website'. Select 'advanced settings' (Look for and copy the physical path which should be something like '%SystemDrive%\inetpub\wwwroot').
Open 'File Explorer'
Enter the physical path into the search bar at the top
*%SystemDrive%\inetpub\wwwroot*
Right click on the empty space and select *New Text Document* and
then open the text document
Enter the following text with no markup into the text document.
'Welcome to my initial web page'
Click 'File' and save as 'index.html'
Change the 'Save as type' as 'All Files'.
Click 'Save'
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 , you should see the home page you created with the text "Welcome to my initial web page".