VS5OVR - Student Lab Guide
VS5OVR - Student Lab Guide
VS5OVR - Student Lab Guide
VMware vSphere: Overview ESXi 5.0 and vCenter Server 5.0 Part Number EDU-ENG-OVR5-LAB-STU Student Laboratory Exercises Revision A Copyright/Trademark Copyright 2011 VMware, Inc. All rights reserved. This manual and its accompanying materials are protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/ patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. The training material is provided as is, and all express or implied conditions, representations, and warranties, including any implied warranty of merchantability, fitness for a particular purpose or noninfringement, are disclaimed, even if VMware, Inc., has been advised of the possibility of such claims. This training material is designed to support an instructor-led training course and is intended to be used for reference purposes in conjunction with the instructor-led training course. The training material is not a standalone training tool. Use of the training material for self-study without class attendance is not recommended. These materials and the computer programs to which it relates are the property of, and embody trade secrets and confidential information proprietary to, VMware, Inc., and may not be reproduced, copied, disclosed, transferred, adapted or modified without the express written approval of VMware, Inc.
www.vmware.com/education
TA B L E
Lab 1: Lab 2: Lab 3: Lab 4: Lab 5: Lab 6: Lab 7:
OF
C ONTENTS
Using VMware vCenter Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Deploying a Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 Allocating Compute Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 Migrating Virtual Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 VMware Distributed Resource Scheduler Clusters (DRS) . . . . . . . . . . . . . . . . . . . . . . . . . .23 Using Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 Using vSphere High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
ii
Lab 1
3. Double-click the vSphere Client icon. 4. At the vSphere Client login window, enter the vCenter Server system name, user name, and
password, which you recorded in Preparing for the lab. Click Login.
5. Select the check box Install this certificate and do not display any security warnings for
<host_name> to prevent this warning from being displayed in the future. Click Ignore to proceed with the connection.
1
3
navigation bar.
2. Click the Hosts and Clusters icon. The Hosts and Clusters inventory view appears. Click the
plus sign (+) to expand inventory objects as necessary. What is the name of your datacenter? ___________________________________
3. Verify that the ESXi host you recorded in Preparing for the lab is present in the datacenter. 4. Verify that your assigned virtual machine, which you recorded in Preparing for the lab, is
blue triangle to the right of Inventory and select VMs and Templates.
6. In the inventory view, expand the folder named Templates.
7. Select your virtual machine in the inventory, then click the Summary tab.
What is the name of the datastore containing the virtual machines files? ______________________________ What is the name of the virtual machines network? ______________________________ Note the other types of information available about the virtual machine.
8. Navigate to the Datastores and Datastore Clusters inventory view. To do this, in the
navigation bar, click the blue triangle to the right of Inventory and select Datastores and Datastore Clusters.
9. Expand the vCenter Server object and the Training datacenter object. Select the datastore
containing your virtual machines files (which you recorded in an earlier step).
10. Click the Virtual Machines tab. Verify that your virtual machine is displayed in the list. 11. Navigate to the Networking inventory view. To do this, in the navigation bar, click the blue
Different icons are used to represent standard switches and distributed virtual switches. In the following sample inventory, three standard switches (Privnet, Production, and VM Network) and two distributed virtual switches (dvProduction and dvVMotion) are listed.
1
5
2. Click the Asset radio button. 3. Verify that your ESXi host and the vCenter Server have evaluation license keys. 4. Exit vSphere Client. To do this, from the menu bar, select File > Exit.
Lab 2
Guest operating system custom specification file Administrator password for virtual machine deployed from template
3. Verify that your virtual machine is now a template by noting its icon. A template icon looks like
2
9
Fields/settings Name
Value Name the new virtual machine with your first name, followed by the last numeral of your ESXi host and the number 1. For example, if your name is Greg, and your ESXi host is 172.20.10.52, then the virtual machine name is Greg2-1. Select your lab team folder. Select your ESXi host. Do not select any cluster. Select datastore01
Inventory Location Host or Cluster to run this virtual machine Datastore for the virtual machine
Value Same format as source Select the Power on this virtual machine after creation check box. Click Next
3. Click Finish to start the deployment task. 4. Monitor the task in the Recent Tasks pane. When the task completes, verify that the virtual
the password recorded in Preparing for the lab. To send the Ctrl+Alt+Delete sequence to your virtual machine, in the menu bar of the virtual machine console select VM > Guest > Send Ctrl+Alt+del.
5. Remain logged in to your virtual machine. Close the virtual machine console window.
Value Select your ESXi host. Keep your ESXi host selected. Do not select any clusters.
3. On the Ready to Complete page, click Finish to start the deployment task. 4. Verify that your template is now a virtual machine by noting its icon.
10
2
11
5. Rename the virtual machine that you converted (LabVM<kitname>-XX): a. Right-click the newly converted virtual machine and select Rename. b. Name the new virtual machine with your first name, followed by the last numeral of your
ESXi host and the number 2. For example, if your name is Tulika, and your ESXi host is 172.20.10.51, then the virtual machine name is Tulika1-2.
c. Verify that your virtual machine has been renamed. 6. Power on the virtual machine. To do this, right-click your virtual machine and select Power >
Power On. Leave the vSphere Client window open for the next lab.
12
:
3
13
Lab 3
Server with the user name and password that you recorded in Preparing for the lab.
2. Go to the Hosts and Clusters inventory view. 3. If necessary, expand your ESXi host in the inventory. 4. Under your ESXi host, select the resource pool named Fin-Test, then click the Summary tab.
View the CPU > Resource Settings area. Fin-Test has 2,000 shares.
5. Select the resource pool named Fin-Prod, then click the Summary tab. View the CPU >
Console). If necessary, log in to each virtual machine as user Administrator, using the password you recorded in Preparing for the lab.
4. From each virtual machines console, run the cpubusy.vbs script (located on the virtual
machines desktop) by right-clicking the script and selecting Open with Command Prompt.
5. After the scripts run for a few seconds, compare the performance of the script in each virtual
machine. Is there a difference in performance between virtual machines? Why or why not? The answer is no. No difference exists in performance between the virtual machines, because the VMkernel shifts the job load around to make the most efficient use of the available CPUs.
6. Generate CPU contention. To do this, schedule both virtual machines to run on the same CPU: a. Right-click one of the virtual machines and select Edit Settings. The Virtual Machine
14
c. In the Scheduling Affinity field, type 1. This schedules the virtual machine to run only on
3
15
CPU 1.
d. Click OK.
e. Repeating the preceding steps, set the scheduling affinity of the other virtual machine to
Setting a virtual machines scheduling affinity is not a recommended practice in a production environment. Use this setting in test environments only. machine. Is there a difference in performance between virtual machines? Why or why not?
7. After the scripts run for a few seconds, compare the performance of the script in each virtual
The answer is It depends. If there is enough CPU contention on the processor, then the answer is yes, there is a difference in performance between the virtual machines. For example, the virtual machine in the pool with more shares might compute sines in 2 seconds, and the virtual machine in the pool with fewer shares might compute sines in 9 seconds. However, if the amount of CPU activity generated does not cause CPU contention, then the answer is no, there is no difference because each virtual machine is getting the CPU resources that it needs.
8. Stop the cpubusy.vbs script in each virtual machine (type Ctrl+C in the cpubusy window). 9. Remove the scheduling affinity value from both the virtual machines. 10. Close the console of each virtual machine. Leave the vSphere Client window open for the next
lab.
16
:
4
17
Lab 4
Server with the user name and password that you recorded in Preparing for the lab.
2. Navigate to the VMs and Templates inventory view. 3. In your lab team folder, right-click the first virtual machine that you created (YourName##-1). It
appears.
6. When prompted by the wizard, enter the following values. When you reach the last page of the
wizard, click Finish. Fields/settings Select Migration Type Select Resource Pool Select Datastore Disk Format Values Change datastore. Keep your ESXi host selected (do not select a resource pool). Select the shared datastore that you recorded in Preparing for the lab. Same format as source
7. Monitor the progress of the task in the Recent Tasks pane. After the task is finished, view the
ESXi hosts Summary tab to verify that your virtual machine is now located on the shared datastore.
8. Repeat the step 1-7 for your second virtual machine (YourName##-2).
18
Task 2: Verify that your virtual machines settings meet vMotion requirements
In this task, you verify that the virtual machines settings meets VMware vSphere vMotion requirements. and then select Edit Settings. have an image in a local datastore defined: Client Device. list and click the device type, Client Device, to remove existing connections.
3. Verify that the virtual machine does not have scheduling affinity set: a. Click the Resources tab, then select Advanced CPU. b. Delete any numbers in the Scheduling Affinity field. 4. Click OK to apply all virtual machine changes.
1. In your lab team folder, right-click the first virtual machine that you created (YourName##-1)
2. Verify that the virtual machines CD/DVD drive is not connected to a local device and does not a. In the Hardware list, find CD/DVD Drive 1 and verify that the Summary column shows
b. If the Summary column does not show Client Device, then select CD/DVD Drive 1 in the
5. Verify that the virtual machines files are located on a datastore accessible by the destination
4
19
ESXi host:
a. Select your virtual machine, then click the Summary tab. b. Review the Datastores area. If the name of the datastore listed is not the shared datastore
that you recorded in Preparing for the lab, use Storage vMotion to migrate the virtual machines files from its current location to the shared datastore.
6. Using the same list of vMotion requirements, verify that the other virtual machine you created
Hosts tab.
c. Verify that your ESXi host and your partner teams ESXi host appear in the list.
2. Verify that your ESXi host and your partner teams ESXi host are connected to the same
check box.
i. Under VM Options, deselect every check box. j. Click Apply Relationships. Both ESXi hosts should have access to the same shared
20
4
21
A validation of vMotion requirements takes place. If the validation does not succeed, you receive warning or error messages and will be unable to continue with the migration until the errors are resolved. Resource Pool Migration Priority
Keep the ESXi host selected (do not select a resource pool). Reserve CPU for optimal vMotion performance (Recommended)
2. Monitor the progress of the vMotion migration in the Recent Tasks pane. 3. View the virtual machines Summary tab. In the General panel, verify that your virtual
ESXi host.
5. To prepare for the next lab, cooperate with the members of your partner team to migrate at least
four virtual machines (two per ESXi team) onto the lower-numbered ESXi host. The virtual machines do not have to be placed into a resource pool. For example, if your teams ESXi host is Server03 and your partner teams ESXi host is Server04, have your partner team migrate at least two of their virtual machines from their host (Server04) to your host (Server03). Leave the vSphere Client window open for the next lab.
22
5
23
Lab 5
Task 1: Work with your partner team to prepare hosts for lab
In this task, you work with your partner team to verify that at least four virtual machines are on the lower-numbered ESXi host.
1. If you exited VMware vSphere Client, use the vSphere Client to log back in to vCenter
Server with the user name and password that you recorded in Preparing for the lab.
2. Verify that you have at least four virtual machines on the lower-numbered ESXi host: two
virtual machines belonging to your team and the two other virtual machines belonging to your partner team.
3. Power off one virtual machine belonging to your team and one virtual machine belonging to
your partner team. To power off a virtual machine, right-click the virtual machine in the inventory and select Power > Power Off.
configured for manual mode and so gives you a recommendation on what host to place the virtual machine. Make sure to power on the virtual machine on the lower-numbered host.
24 Lab 5 VMware Distributed Resource Scheduler Clusters (DRS)
5
25
3. Generate CPU activity on the virtual machines that you chose to use for this lab:
a. Open a console to each of your virtual machines that you are using for this lab. Log in to
b. Before proceeding to the next step, verify again that four virtual machines are powered on
and located on the lower-numbered host. (The four virtual machines are two virtual machines belonging to your team and two virtual machines belonging to your partner team).
c. From each of your virtual machines consoles, run the cpubusy.vbs script, located on the
virtual machines desktop, by right-clicking the script and selecting Open with Command Prompt. This script generates CPU activity. Let the scripts run continuously while you wait for migration recommendations to appear. Do not apply any recommendations yet. click the DRS tab.
4. Navigate to the Hosts and Clusters inventory view. Select your lab cluster in the inventory, then
If you do not see any migration recommendations in a couple of minutes, click the Run DRS link in the upper-right corner to manually refresh the view. If you do see a recommendation, proceed to the next step. Again, do not apply any recommendations yet.
5. Click your clusters Summary tab. View the VMware DRS panel. Is your load balanced or
imbalanced?
6. Click the View Resource Distribution Chart link. This chart displays the CPU or memory use
per host. Hover the pointer over each colored square to see information on how much of a virtual machines entitled resources the virtual machine is using. How is this information useful?
7. Close the chart window. 8. Return to your lab clusters DRS tab. If your partner team has not reached this step, wait for
them. When everyone is ready, have one person apply all the recommendations by clicking Apply Recommendations, located in the lower-right corner of the view.
9. Monitor the migrations in the Recent Tasks pane.
10. Return to your lab clusters Summary tab and view the VMware DRS panel. Are the virtual
machines balanced across the hosts in the cluster? If necessary, click the Run DRS link to update the display.
11. Type Ctrl+C in each cpubusy window to stop each instance of the cpubusy.vbs script in
26
:
6
27
Lab 6
Using Alarms
Server with the user name and password that you recorded in Preparing for the lab.
2. Navigate to the VMs and Templates inventory view. Choose one of your virtual machines to
work with during this lab. Select that virtual machine in the inventory, then choose the Alarms tab.
Lab 6 Using Alarms
3. Click the Definitions button. Notice that the datacenter inherited all the alarms defined at the
Values
<First_Name> VM CPU Usage
(Your first name is used to differentiate your alarm from the alarms of the other students.) Description Alarm Type Monitor Leave blank. Select Virtual Machines, and select Monitor for specific conditions or state, for example, CPU usage, power state. Leave selected.
c. Click the Triggers tab, then click Add (near the bottom of the dialog box). d. Add the following trigger.
Trigger settings Trigger Type Condition Warning Condition Length Alert Condition Length Trigger if any of the conditions are satisfied
for 30 sec
50
28
6
29
e. Do not change anything in the Reporting tab. f. Click the Actions tab, then click Add. g. Configure the following action settings.
Action settings Action Configuration Green to Yellow Yellow to Red Red to Yellow Yellow to Green
Values
Click the field below the Action header, then select Suspend VM from the list.
Leave as is. (This column does not apply to this action.) Choose Once from the list. Change the setting from Once to blank. Leave blank. Leave blank.
h. Click OK. i. Verify that your alarm appears in the list of alarms (near the end of the list).
5. Create another alarm to check whether a virtual machine has been suspended. Apply this alarm
Values
<First_Name> VM Suspended
(Your first name is used to differentiate your alarm from other students alarms.) Description Leave blank.
Values Select Virtual Machines, and select Monitor for specific events occurring on this object, for example, VM powered On. Leave selected.
c. Click the Triggers tab, then click Add (near the bottom of the dialog box). d. Add the following trigger.
Values Click the field below the Event header, then select VM suspended from the list (near the end of the list). Alert
e. Under the Conditions column, click the Advanced link. The Trigger Conditions dialog
box appears.
f. Click Add. g. Click Change tag under the Argument column, then select VM name from the list. h. Under the Operator column, leave the value at equal to. i. Click the area under the Value column. Enter the name of the virtual machine that you are
using for this lab. The VM name is case-sensitive for this alarm.
j. Click OK. k. In the Alarm Settings dialog box, do not change anything in either the Reporting tab or the
Actions tab.
l. Click OK. m. Verify that your alarm appears in the list of alarms (it should appear at the end of the list).
30
6
31
In this task, you perform an action to trigger both alarms, you view the triggered alarms, and you acknowledge them.
1. In the Alarms tab, click the Triggered Alarms button. Keep this window visible because
alarms that are triggered are displayed in this pane. are using for this lab:
a. In the inventory, right-click the virtual machine and select Open Console.
2. Trigger your VM CPU Usage alarm by generating CPU activity in the virtual machine that you
b. On the virtual machines desktop, right-click cpubusy.vbs and select Open with
Command Prompt. Wait at least 30 seconds for the alarm to be triggered. Your VM CPU Usage alarm has been triggered when the virtual machine is suspended. You might notice that when your VM CPU Usage alarm is triggered, it briefly appears in the Triggered Alarms pane, then goes away. should see an entry for this alarm in the Triggered Alarms pane.
4. Acknowledge your VM Suspended alarm: a. Notice that the Acknowledged and Acknowledged By fields are blank.
3. Once the virtual machine is suspended, verify that your VM Suspended alarm is triggered. You
b. Right-click your VM Suspended alarm and select Acknowledge Alarm. Notice that the
select Power > Power On). Because your vSphere Distributed Resource Scheduler (DRS) cluster is in manual mode, you will get a recommendation on what host to power on the virtual machine. Accept the recommendation.
6. In the virtual machine console, stop the cpubusy.vbs script. 7. Close the virtual machine console.
2. Disable your VM Suspended alarm: a. Select your lab team folder in the inventory, then click the Alarms tab. b. Click the Definitions button. c. Right-click your VM Suspended alarm and select Edit Settings. d. In the General tab, deselect the Enable this alarm check box, then click OK.
Leave the vSphere Client window open for the next lab.
32
:
7
33
Lab 7
Task 1: Work with your partner team to prepare hosts for the lab
Perform this task with your partner team. Designate one person to perform the steps. The rest of the team should watch and understand the task being performed.
1. If you exited VMware vSphere Client, use the vSphere Client to log back in to vCenter
Server with the user name and password that you recorded in Preparing for the lab.
2. Go to the Hosts and Clusters view. Find your lab cluster, whose name you recorded in
Preparing for the lab. Your lab cluster currently has two ESX hosts.
3. Power on at least one virtual machine on each host. You can view the Virtual Machines tab of
each ESXi host in your cluster to determine which virtual machines reside on each host. If necessary, migrate virtual machines to the appropriate host.
b. Does the number of protected virtual machines match the number of virtual machines in the
cluster?___________.
ANSWER: Depends on number of powered on virtual machines
34
7
35
Perform this task with your partner team. Designate one person to perform all the steps. The rest of the team should watch and understand the task being performed. In this task, you verify that vSphere HA works properly in your lab cluster.
1. Simulate a host failure by rebooting one of the hosts in the cluster:
a. Right-click the master ESXi host that you recorded in task 2, step 3a, and click Reboot.
b. When a message warns you that your host is not in maintenance mode, click Yes to reboot. c. Type Testing vSphere HA as the reason for rebooting and click OK. 2. Select Lab Cluster in the inventory and click the Tasks & Events tab. 3. Click Events to display the Events view.
4. From the drop-down menu, select Show Cluster Entries to monitor the events for your
vSphere HA cluster. The cluster entries are sorted by time. Notice the entries made by vSphere HA when the host failure was detected.
5. Select the running ESXi host in the cluster and click the Virtual Machines tab. The virtual
machines that were running on the original master ESXi host should now be running on the remaining host in the cluster.
6. Monitor the vCenter Server inventory until you see that the original master ESXi host is
running.
7. Because your cluster has both vSphere HA and vSphere Distributed Resource Scheduler (DRS)
enabled, check for any DRS migration recommendations (view your lab clusters DRS tab). Apply all recommendations, if they exist.
8. Exit the vSphere Client. To do this, in the menu bar, select File > Exit.
36