20533 Module 4 Lab Answer Key
20533 Module 4 Lab Answer Key
Lab: Managing Virtual Machines
Scenario
Now that the planning and VM deployment for the two A. Datum applications is complete, you must configure VHDs and configure availability and scalability for these VMs. You will place the two IIS web servers, which will host the front end for the expense application, in a load-balanced availability set. For the expenses web application, you will attach a new disk to an IIS server to store the ASP.NET disk cache and create a new Storage Space on the SQL Server to increase the efficiency of the database. Finally, you will use the Cross-Platform Command Line Interface to manage a virtual machine.
Exercise 1: Exploring Availability
u Task 1: Specify Availability Sets
1. On the taskbar, right-click Microsoft Azure PowerShell and click Run ISE as Administrator. Click Yeswhen prompted.
2. In the PowerShell ISE, in the command prompt pane, enter the following command to add an Azure account to the local PowerShell environment:
Add-AzureAccount
3. When prompted, sign in using the Microsoft account associated with your Azure subscription.
4. In the PowerShell ISE, click File and then click Open.
5. In the Open dialog, browse to D:LabfilesLab04Starter.
6. Click ExampleCommands.ps1 and then click Open.
7. If the Script pane is not visible, on the View menu, click Show Script Pane.
8. In the PowerShell ISE, in the command prompt pane, enter the following command and press Enter:
Get-AzureVM
NOTE: you can send the output of this command to a text file by running this code:
Get-AzureVM > c:vminfo.txt
You can then browse to the text file and extract the information required below
9. In the PowerShell ISE, in the command prompt pane, select the service name, then right-click, and click Copy.
10. In the PowerShell ISE, in the Script pane, paste the cloud service name.
11. In the PowerShell ISE, in the Script pane, locate the following code:
Get-AzureVM -Name WebVM1 �ServiceName <#Copy your cloud
service name here#>
12. Replace <#Copy your cloud service name here#> with your service name.
13. In the PowerShell ISE, in the Script pane, select the code you have just edited.
14. On the toolbar, click the Run Selection button and wait for the script to complete.
15. Notice that the AvailabilitySetName property is blank.
16. In the PowerShell ISE, in the Script pane, locate the following code:
Get-AzureVM -Name WebVM1 -ServiceName <#Copy your cloud
service name here#> | Set-AzureAvailabilitySet -AvailabilitySetName adatumfrontend | Update-AzureVM
17. Replace <#Copy your cloud service name here#> with your service name.
18. In the PowerShell ISE, in the Script pane, select the code you have just edited.
19. On the toolbar, click the Run Selection button and wait for the script to complete.
20. In the PowerShell ISE, in the Script pane, locate the code you edited in Step 12. On the toolbar, click the Run Selection button and wait for the script to complete:
Get-AzureVM -Name WebVM1 �ServiceName servicename
Where servicename is the service name you edited in step 12.
21. Notice that the AvailabilitySetName property is now filled in.
22. In the PowerShell ISE, in the Script pane, locate the following code:
Get-AzureVM -Name WebVM2 -ServiceName <#Copy your cloud
service name here#>
| Set-AzureAvailabilitySet -AvailabilitySetName adatumfrontend | Update-AzureVM
23. Replace <#Copy your cloud service name here#> with your service name.
24. In the PowerShell ISE, in the Script pane, select the code you have just edited.
25. On the toolbar, click the Run Selection button and wait for the script to complete.
26. In the PowerShell ISE, in the Script pane, locate the following code:
Get-AzureVM -Name WebVM2 �ServiceName <#Copy your cloud
service name here#>
27. Replace <#Copy your cloud service name here#> with your service name.
28. In the PowerShell ISE, in the Script pane, select the code you have just edited.
29. On the toolbar, click the Run Selection button and wait for the script to complete.
30. Notice that the AvailabilitySetName property is filled in.
u Task 2: Configure the Azure Load Balancer
This Task is prone to error - here is a possible fix - See instructor if you have difficulty
To add the second WebVM1 to the balanced set
try a second time
leave the default value 2
it wants a "number of retries value" e.g. 31
Initially it may complain about the "timeout" value being 0
try a second time
leave the default value 2
it wants a "number of retries value" e.g. 31
Initially it may complain about the "timeout" value being 0
1. Start Internet Explorer, browse to http://portal.azure.com, and sign in using the Microsoft account that is associated with your Azure subscription.
2. In the toolbar on the left, click BROWSE and then click Virtual Machines.
3. In the list of virtual machines, click WebVM1.
4. In the Configuration section, click Load balanced sets and then click JOIN.
5. In the ENDPOINT NAME box, type AdatumWebEP.
6. In the PRIVATE PORT box, type 80.
7. Click LOAD BALANCED SET Configure required settings.
8. In the NAME box, type AdatumWebLBS.
9. In the first PROTOCOL drop-down list, select TCP.
10. In the PUBLIC PORT box, type 80.
11. In the second PROTOCOLdrop-down list, select TCP.
12. In the PORT box, type 80.
13. In the INTERVAL box, type 15.
14. In the NUMBER OF RETRIES box, type 31.
15. Click OK twice.
16. Close the
Comments
Post a Comment