Activity Overview: In this graded activity, students will learn how to create a publicly-accessible load-balancing solution in a cloud environment. Students will provision the resources necessary through Azure Portal, then configure them via PowerShell CLI (via Run Command) and Azure Portal.
Activity Outcomes: After completing this activity students will be able to:
- Demonstrate configuration cloud-based network resources
- Demonstrate configuration of a cloud-based load-balancer
- Demonstrate web-hosting principles
Deliverable: Upload all requested screenshots below, as a .pdf export from the editor of your choosing.
Naming convention: “lastnamefirstinitial_Assignment#.pdf” e.g: “smithp_A1.1.pdf”
Be sure to include your name, student number, and course (CNW-2511) at the top of your document.
Load-Balancing in Azure
Part of the advantage in hosting an environment on a Cloud platform is the ease of access to resources from anywhere in the world. In order to leverage this advantage, organizations must provide publicly-accessible web content in a highly-available, scalable, yet cost-efficient manner. Technicians must be familiar with many of these deployment models, along with the various methods to implement them.
Load-Balancing is a necessary solution to maintain availability of publicly accessible resources. These configurations also allow for transparent “scale-out, scale-in” provisioning as the need for more back-end resources arises.
Follow this link to log in to the Azure Portal. Virtual Machines (and many other billed resources), must be disabled/deleted via the Azure dashboard to prevent continuous billing. Shutting down a VM within the OS will not disable them.
After you have completed this activity, you will delete all created resources, then verify with screenshots.
Do not create any resources unless you are specifically requested to. This runs a very high risk of your student account credits ($100 cap) being spent in their entirety, at which point you will no longer be able to access any of the resources required for this course, and future courses. Please contact your instructor ASAP if this occurs.
In this lab, you will be provisioning:
- One (1) Resource Group
- One (1) Virtual Network
- One (1) Load-Balancer
- One (1) Public IP
- One (1) Network Security Group
- Two (2) Virtual Machines
As you progress through this activity, your instructor may request that you capture a screenshot periodically (on Mac OS: “command+shift+3” to capture the whole screen, or “command+shift+4” then drag the cursor over the area you would like to capture). These screenshots are part of your required deliverable and will be graded.
Please attend or view Live Lecture (Week 3 Part 1) when available for the latest walkthrough. It is important to understand Cloud Service Provider (CSP) platforms change frequently, so the available recording here may look differently than what you see. You are welcome to use your best judgement to navigate any differences, or wait until the Live Lecture recording becomes available for further elaboration.
Provision Resources via Azure Portal
Wherever you see “LNFI”, input your last name followed by your first initial (e.g. cnw-lb-LNFI = cnw-lb-smithp)- Create a new Resource Group
- name: cnw-lb-LNFI
- location: westus3 (or any region that allows VM creation)
- Create a new Virtual Network
- name: cnw-LNFI
- resource-group: cnw-lb-LNFI
- address-prefixes: 10.0.0.0/24
- subnet-name: cnw-web
- subnet-prefix: 10.0.0.64/26
- Create a new Resource Group
- Create a new Public IP named “lb-pip” – This must match the Standard SKU of your Load Balander
- Create a Load Balancer
- Name: cnw-lb
- Region: West US 3
- SKU: Standard
- Type: Public
- Tier: Regional
- Public IP Address: “lb-pip” (Use Existing) there may be an issue using a pre-created Public IP, in which case create a new public IP in this wizard.
- SKIP the rest of the configuration options during the creation of the Load Balancer, we will be configuring the items below after it has been provisioned.
- Configure Load Balancer Functions
- Create a new backend pool
- Name: cnw-VMbackend
- Create a new health probe
- Name: cnw-VMHP
- Protocol: TCP
- External / Frontend Port: 80
- Internal / Backend Port: 80
- Interval: 5 seconds
- Create a new load balancing rule
- Name: cnw-LB-http
- Backend Pool: cnw-VMbackend
- Frontend / External Port: 80
- Backend / Internal Port: 80
- Health Probe: cnw-VMHP
- Create a new backend pool
- Create a new Network Security Group
- Name: cnw-webNSG
- Location: West US 3 (or the region you’ve selected)
- Create a new Inbound Security Rule
- Source: Service Tag
- Source ST: Internet
- Source Ports: *
- Destination: Any
- Destination Port Ranges: 80
- Protocol: Any
- Action: Allow
- Priority: 100
- Name: inbound_allow
- Associate the NSG to the “cnw-web” Subnet
- Create Virtual Machines (2)
- VM 1 Name: web01 / VM 2 Name: web02
- Region: West US 3 (or the region in which you are working)
- Availability Options: None
- OS: Windows Server (any datacenter version, 2025 may not work)
- OS Disk Type: Standard SSD
- Use Managed Disks: Yes
- Virtual Network: cnw-LNFI
- Subnet: cnw-web
- Public IP: None – Important
- NIC NSG: None
- Place VM behind existing LB solution: Yes
- Options: Azure Load Balancer
- Load Balancer: cnw-lb-LNFI
- Backend Pool: cnw-VMbackend
- Management: All options OFF
Be sure to double-check the above VM settings on the “Review+Create” page, as provisioning certain VM configurations may change previously set ones.
Configure IIS via “Run Command”
It is possible to configure a virtual machine without the need for SSH or RDP, through Azure’s “Run Command” option within the Azure Portal. This is an extremely useful tool when a VM cannot be connected to while troubleshooting through normal remote means.
Complete the following steps on both of your provisioned VM’s:
- From the Azure Portal, select the VM
- Under “Operations” select “Run Command”
- Select “RunPowerShellScript”
- Copy and paste the following command string (all three lines):
Install-WindowsFeature -name Web-Server -IncludeManagementTools
remove-item C:inetpubwwwrootiisstart.htm
Add-Content -Path “C:inetpubwwwrootiisstart.htm” -Value $(“Hello World from ” + $env:computername)
This process will take a few minutes, but you can proceed to the second VM in another tab while the first script runs. You will need screenshots of the output for both VM’s once the commands are successful.
Verify HTTP Connectivity and Load-Balancing
- Navigate to your Load Balancer’s Overview page and copy the front-end public IP
- Open your browser and paste the public IP to access the load-balanced website
- Check to see which VM is posting the webpage by the name displayed
- Reload the website a few times to see if the VM name changes (this may take quite a few reloads). It’s possible that your browser cached the first page to load, and reloading will not show the other VM’s website.
- If the page isn’t alternating, go to your Virtual Machines and select “Stop” on the VM that is showing up when you access the website.
- Once the VM is fully stopped, reload the website and you should see the other VM’s name.
- To force this on the other VM, simply swap which VM is “On”
Required Screenshots
Take your screenshots after all configurations and lab steps have been completed.
The following screenshots should show the configurations identified in lab:
- Virtual Machines
- Overview for cnw-LNFI-web01
- Overview for cnw-LNFI-web02
- Virtual Networks
- Diagram for cnw-lb-LNFI
- Network Security Groups
- Inbound Security Rules
- Subnets
- Load Balancers
- Overview
- Backend Pools (with the list expanded to show both VM’s)
- Load Balancing Rules
- Screenshot of web browser accessing:
- cnw-LNFI-web01
- cnw-LNFI-web02
- All Resources
- Showing all provisioned resources for this lab deleted
There should be 11 individual screenshots.
Requirements:

Leave a Reply
You must be logged in to post a comment.