Lab Answer Key: Module 4: Managing Virtual Machines
Lab Answer Key: Module 4: Managing Virtual Machines
Lab Answer Key: Module 4: Managing Virtual Machines
5. On the 20533D0401-LabRG blade, review the list of resources. Note that includes an
availability set named 20533D0401-avset.
6. Click 20533D0401-avset.
7. On the 20533D0401-avset blade, note that the availability set has 2 fault domains, 5
update domains, and it contains two virtual machines. Also note that each VM has a
unique fault domain and update domain.
8. Leave the Microsoft Edge window with the Azure portal open.
• Name: 20533D0401-ilb
• Type: Public
• Public IP address: click Choose a public IP address, on the Choose public IP address
blade, click Create new, on the Create public IP address blade, in the Name text box
type 20533D0401-ilbfe, ensure that the Dynamic option is selected, and click OK.
• Resource group: click Use existing and, in the drop-down list, click 20533D0401-
LabRG
• Location: the same Azure region you chose when running the provisioning script at the
beginning of this module
4. In the hub menu, click All services, in the service menu, click Load Balancers, and
then on the Load balancers blade, click 20533D0401-ilb.
5. On the 20533D0401-ilb blade, click Backend pools, and then click Add.
6. On the Add backend pool blade, in the Name text box, type 20533D0401-ilb-bepool,
click IPv4, and then, in the Associated to drop down list, click Availability set
8. Click Add a target network IP configuration, in the Target virtual machine drop
down list, click 20533D0401-vm0 and, in the Network IP configuration drop down
list, click the ipconfig1 entry.
9. Click Add a target network IP configuration, in the Target virtual machine drop
down list, click 20533D0401-vm1 and, in the Network IP configuration drop down
list, click the ipconfig1 entry.
11. On the 20533D0401-ilb blade, click Health probes, and then click Add.
12. On the Add health probe blade, specify the following settings, and then click OK:
• Name: 20533D0401-ilb-probetcp80
• Protocol: HTTP
• Port: 80
• Path: /
• Interval: 5
• Unhealthy threshold: 2
14. On the 20533D0401-ilb blade, click Load balancing rules, and then click Add.
15. On the Add load balancing rule blade, complete the following , and then click OK:
• Name: 20533D0401-ilb-ruletcp80
• IP Version: IPv4
• Frontend IP address: LoadBalancerFrontEnd
• Protocol: TCP
• Port: 80
• Backend port: 80
• Idle timeout: 4
18. On the Add inboud NAT rule blade, specify the following settings and click OK:
• Name: 20533D0401-ilb-natrulerdpvm0
• Service: Custom
• Protocol: TCP
• Port: 33890
19. On the 20533D0401-ilb blade, click Inbound NAT rules and then click Add.
20. On the Add inboud NAT rule blade, specify the following settings and click OK:
• Name: 20533D0401-ilb-natrulerdpvm1
• Service: Custom
• Protocol: TCP
• Port: 33891
2. In the Windows PowerShell Integrated Scripting Environment (ISE) window, open the
IISInstall.ps1 file located in E:\Labfiles\Lab04\Starter folder.
3. Review the content of the file. Note that this is a DSC configuration that controls the
installation of the Windows Server Web-Server role.
5. Review the content of the script. Note the variables that it uses, including the storage
account and its key. The script first retrieves the storage account from the resource
group, and then publishes the DSC configuration defined in the Install.ps1 into it,
placing it in the default DSC container named windows-powershell-dsc, stores the
resulting module URL in a variable, and then sets the Azure Agent VM DSC extension
on two virtual machines deployed by the provisioning script by referencing that URL.
The script generates a shared access signature token that provides read only access to
the blob representing the DSC configuration archive.
6. Start the execution of the script. When prompted, sign in using the Microsoft account
that is the Service Administrator of your subscription. Wait until the script completes.
8. On the Virtual machines blade, click ellipsis to the right of the 20533D0401-vm0
entry and click Connect.
10. If a Remote Desktop Connection warning message displays, select Don’t ask me again
for connections to this computer, and then click Connect.
11. In the Windows Security dialog box, type the following credentials, and then click OK:
• Password: Pa55w.rd1234
12. If another Remote Desktop Message displays, select the Don’t ask me again for
connections to this computer checkbox, and then click Yes.
14. After you establish a Remote Desktop session to the VM, wait for the Server Manager
window to open. In the Server Manager window, verify that IIS appears in the left
pane, indicating that the Web Server (IIS) server role is installed.
15. Repeat steps 9 through 14 for the other virtual machine 20533D0401-vm1.
16. After completing the tasks, switch back to your lab computer MIA-CL1. Leave both
Remote Desktop sessions open.
• Source: Any
• Destination: Any
• Protocol: TCP
• Action: Allow
• Priority: 1100
• Name: allow-http
7. Click OK.
10. On the 20533D0401-ilb blade, note the value of its Public IP address entry.
11. Open a new InPrivate Microsoft Edge window, in the navigation bar, type http://
followed by the IP address that you noted in the previous step, and then press the
Enter key.
12. Verify that you can access the default IIS webpage.
13. Switch to the Remote Desktop session on 20533D0401-vm0. In the Server Manager
window, click Tools and, in the drop down menu, click Services.
14. In the Services window, scroll down to the World Wide Web Publishing Service
entry, right click on it, and click Stop in the right-click menu.
15. Switch to the Remote Desktop session on 20533D0401-vm1. In the Server Manager
window, click Tools and, in the drop down menu, click Services.
16. In the Services window, scroll down to the World Wide Web Publishing Service
entry, right click on it, and click Stop in the right-click menu.
17. Switch back to MIA-CL1. From MIA-CL1, refresh the InPrivate Microsoft Edge window.
18. Verify that the Hmm, we can’t reach this page message appears.
19. Switch back to the Services window the Remote Desktop session on 20533D0401-
vm0.
20. In the Services window, right-click the World Wide Web Publishing Service entry,
and then click Start in the right-click menu.
21. Once the service is running, switch back to MIA-CL1 and refresh the InPrivate
Microsoft Edge window. Verify that you can again access the default IIS webpage. Note
that you might need to wait about a minute after you start the World Wide Web
Publishing Service service.
Note: Optionally you can repeat this sequence, but this time stopping the World Wide Web Publishing Service on
20533D0401-vm0 and starting it on 20533D0401-vm1. As long as the service is running on at least one of the two
virtual machines, you should be able to access the webpage.
Result: After completing this exercise, you should have implemented DSC.
4. In the Data disks section, click the drop down list in the NAME column and then click
Create disk
5. On the Create managed disk blade, specify the following settings and then click Create:
• Name: 20533D0401-vm2-data01
• Resource group: ensure that the Use existing option is selected and 20533D0401-
LabRG appears in the drop down list.
• Size: 128
7. Back on the 20533D0401-vm2 blade, ensure that the HOST CACHING column contains
the None entry.
9. In the Data disks section, click the drop down list in the NAME column and then click
Create disk
10. On the Create managed disk blade, specify the following settings and then click Create:
• Name: 20533D0401-vm2-data02
• Resource group: ensure that the Use existing option is selected and 20533D0401-
LabRG appears in the drop down list.
• Size: 128
11. Back on the 20533D0401-vm2 - Disks blade, ensure that the HOST CACHING column
contains the None entry and then click Save. Wait for the operation to complete.
4. If a Remote Desktop Connection warning message displays, select Don’t ask me again
for connections to this computer, and then click Connect.
5. In the Windows Security dialog box, type the following credentials, and then click OK:
• Password: Pa55w.rd1234
6. If another Remote Desktop Message displays, select the Don’t ask me again for
connections to this computer checkbox, and then click Yes.
8. After you establish a Remote Desktop session to the VM, wait for the Server Manager
window to open. In the Server Manager window, click File and Storage Services.
10. In the STORAGE POOLS pane, click the TASKS menu, and then click New Storage
Pool on the drop-down menu. This will open the New Storage Pool Wizard.
12. On the Specify a storage pool name and subsystem page, type StoragePool1 in the
Name text box, and then click Next.
13. On Select physical disks for the storage pool, select the check boxes next to the two
physical disk entries (which represent disks you attached from the Azure portal), and
then click Next.
15. On the View results page, select the Create a virtual disk when this wizard closes
check box, and then click Close.
16. In the Select the storage pool dialog box, ensure that StoragePool1 is selected and
click OK. This will launch the New Virtual Disk Wizard.
18. On the Specify the virtual disk name page, type VirtualDisk1 in the Name text box,
and then click Next.
20. On the Select the storage layout page, click Simple, and then click Next.
21. On the Specify the provisioning type page, ensure that Fixed is selected, and then
click Next.
22. On the Specify the size of the virtual disk, select Maximum size, and then click Next.
24. On the View results page, ensure that the Create a volume when this wizard closes
check box is selected, and then click Close. This will open the New Volume Wizard.
26. On the Select the server and disk page, ensure that VirtualDisk1 is selected, and
then click Next.
27. On the Specify the size of the volume page, accept the default volume size, and then
click Next.
28. On the Assign to a drive letter or folder page, ensure that the Drive letter is set to F,
and then click Next.
29. On the Select file system settings page, accept the default settings (NTFS with default
allocation unit size), and then click Next.
2. On the taskbar, right-click the Windows PowerShell icon, and then click Run as
Administrator. In the User Account Control dialog box, click Yes.
4. When prompted, sign in by using the Microsoft account that is the Service
Administrator of your Azure subscription.
5. If you have multiple Azure subscriptions, select the one you want the script to target.
10. Right-click unoccupied area of the dashboard and, in the right-click menu, click Reset
to default state. When prompted to confirm, click Yes.