Vsphere ICM 8 Lab 24
Vsphere ICM 8 Lab 24
0
INSTALL, CONFIGURE, MANAGE
Contents
Introduction .............................................................................................................................................. 3
Objective ................................................................................................................................................... 3
Lab Topology ............................................................................................................................................. 4
Lab Settings ............................................................................................................................................... 5
1 Prepare the Lab Environment ........................................................................................................... 6
2 Create a Cluster That is Configured for vSphere DRS ...................................................................... 14
3 Verify vSphere vMotion Configuration on the ESXi Hosts ............................................................... 19
4 Add ESXi Hosts to the Cluster .......................................................................................................... 21
5 Modify vSphere DRS Settings .......................................................................................................... 26
6 Power On VMs and Review vSphere DRS Recommendations ......................................................... 31
7 Review vSphere DRS Recommendations When the Cluster is Imbalanced ..................................... 35
Introduction
In this lab, you will delete and create a vSphere Distributed Resource Scheduler (DRS) cluster, use the
Cluster Quickstart to perform the basic configuration, and verify proper vSphere DRS functionality.
A vSphere DRS cluster is a group of ESXi hosts that are managed as a single entity by vSphere DRS.
vSphere DRS is a feature of VMware vSphere, the virtualization platform, that automatically balances
workloads across multiple ESXi hosts in a cluster. The goal of vSphere DRS is to improve system
performance, reduce resource contention, and increase resource utilization by dynamically distributing
Virtual Machines (VMs) across the available ESXi hosts in the cluster.
When a VM is powered on or the resource utilization of a VM changes, vSphere DRS evaluates the
current resource utilization of the ESXi hosts in the cluster, and determines if a migration is required to
balance the workloads. If a migration is necessary, vSphere DRS will automatically move the VM to a
different ESXi host, ensuring that the workloads are evenly distributed across the cluster.
vSphere DRS is a key component of the vSphere infrastructure, and can help organizations improve
system performance, increase resource utilization, and reduce costs. By automatically managing
resource utilization, vSphere DRS can help ensure that VMs receive the resources they need to meet
their performance and availability requirements.
Objective
Lab Topology
Lab Settings
The information in the table below will be needed to complete the lab. The task sections further below
provide details on the use of this information.
In this task, you will migrate LinuxGUI-01 and LinuxGUI-02 compute to sa-esxi-01.vclass.local and the
storage to the iSCSI-Datastore.
To launch the console window for a VM, either click on the machine’s
graphic image from the topology page, or click on the machine’s
respective tab from the Navigator.
2. Launch the Mozilla Firefox web browser by either clicking on the icon found in the bottom toolbar
or by navigating to Start Menu > Internet > Firefox Web Browser.
If the VMware Getting Started webpage does not load, please wait an
additional 3 - 5 minutes, and refresh the page to continue. This is
because the vCenter Server Appliance is still booting up and requires
extra time to initialize.
4. To log in to the vCenter Server Appliance, enter [email protected] as the username and
NDGlabpass123! as the password. Click LOGIN.
5. In the Navigator, ensure you are viewing the Hosts and Clusters tab, and select sa-
vcsa.vclass.local. In the right pane, select Datastores and right-click on iSCSI-Datastore. In the
Actions pull-down menu, click Increase Datastore Capacity….
6. In the Increase Datastore Capacity window on the Select Device step, select LUN 3 and click NEXT.
7. On the Specify Configuration step, leave the defaults, and click NEXT.
8. On the Ready to Complete step, review the information, and click FINISH.
9. Repeat steps 5 – 8, and expand iSCI-Datastore using LUN 4 and Lun 2. For Lun 2, you will only
increase the size by 10 GB for lab purposes.
10. Ensure you are still viewing the Datastores tab. Verify that the iSCSI-Datastore is showing a
capacity of 59 GB and at least 32 GB of free space.
11. In the Recent Tasks pane, verify that the iSCSI-Datastore tasks have successfully completed.
13. In the ICM-Datacenter main workspace, click the Virtual Machines tab, and select LinuxGUI-01 and
LinuxGUI-02.
16. In the 2 Virtual Machines – Migrate window on the Select a migration type, select Change both
compute resource and storage. Click NEXT.
17. On the Select a compute resource step, expand ICM-Datacenter and select sa-esxi-01.vclass.local.
18. On the Select storage step, select iSCSI-Datastore. In the Select virtual disk format drop-down
menu, select Thin Provision. Click NEXT.
19. On the Select Networks step, verify VM Network is selected for the Destination Network. Click
NEXT.
20. On the Ready to complete step, review the information, and click FINISH.
21. Monitor the Recent Tasks pane, and confirm that both Linux-GUI VMs have successfully migrated.
This will take 2 - 4 minutes to complete.
Confirm that the LinuxGUI-01 and LinuxGUI-02 VMs are located on sa-esxi-
01.vclass.local and utilizing the iSCSI-Datastore as their storage source.
22. Leave the vSphere Client open, and continue to the next task.
In this task, you will create a vSphere cluster, and you will use Cluster Quickstart to activate the vSphere
DRS service. vSphere DRS ensures that the resource requirements for the VMs in the cluster are
satisfied.
A vSphere cluster is created, and the Cluster Quickstart feature is used to activate vSphere DRS for the
following reasons:
• Improve performance: By automatically balancing the workloads across multiple ESXi hosts in
the cluster, vSphere DRS helps ensure that VMs receive the resources they need to meet their
performance requirements.
• Increase resource utilization: By dynamically allocating resources to VMs, vSphere DRS helps
increase the overall resource utilization of the vSphere infrastructure.
• Reduce resource contention: By monitoring the resource utilization of VMs and ESXi hosts,
vSphere DRS helps prevent resource contention, and ensure that VMs receive the resources
they need to meet their performance requirements.
• Streamline administration: By automating the process of allocating resources to VMs, vSphere
DRS can help streamline administration and reduce the workload of system administrators.
The Cluster Quickstart feature is used to activate vSphere DRS because it provides a simple,
streamlined process for configuring and activating vSphere DRS for a vSphere cluster. By using Cluster
Quickstart, system administrators can quickly and easily configure vSphere DRS and start benefiting
from its features, without having to perform a complex, manual configuration process. The Cluster
Quickstart feature also provides a wizard-driven interface that guides administrators through the
process of configuring and activating vSphere DRS, making it easier to get started with this feature.
1. While in the vSphere Web Client, click on the Hosts and Clusters tab. Right-click on Lab Cluster in
the inventory view, and click Delete.
4. In the New Cluster window, on the Basics step, type ICM-Compute-01 for the Name. Leave vSphere
DRS deactivated because you will use Cluster Quickstart to activate the vSphere DRS service.
Uncheck the Manage all hosts in the cluster with a single image box because you will manage your
hosts with images in another lab. Click NEXT.
6. If a window appears asking you to Share feedback on vSAN, check Don't show me this again, and
click Close.
7. Verify that the ICM-Compute-01 cluster appears in the Navigator. Select the ICM-Compute-01
cluster.
8. In the ICM-Compute-01 main workspace, select the Configure tab. Navigate to Configuration >
Quickstart. Click EDIT in the Cluster basics pane.
9. In the Edit Cluster Settings window, turn the vSphere DRS toggle button on. Click OK.
10. In the Cluster basics pane, in Cluster Quickstart, verify that vSphere DRS is showing as the Selected
service.
11. Leave the vSphere Web Client open, and continue to the next task.
In this task, you will verify that a VMkernel port is configured for vSphere vMotion on sa-esxi-
01.vclass.local and sa-esxi-02.vclass.local. vSphere vMotion is used by vSphere DRS to move VMs
among the hosts in the cluster. vMotion is already pre-configured, but it is good practice to always
verify the correct configurations.
Verifying vMotion configuration is important when setting up vSphere DRS, because vMotion allows
live migration of VMs from one host to another without disruption. This is a key component in ensuring
the smooth operation of DRS, which dynamically balances resource utilization across multiple hosts in
a vSphere cluster. If vMotion is not properly configured, DRS may not be able to move VMs to balance
resources and resolve any performance issues, leading to potential downtime and reduced
performance.
1. In the Navigator, on the Hosts and Clusters tab, select sa-esxi-01.vclass.local and click the
Configure tab. Navigate to Networking > VMkernel adapters.
2. In the VMkernel adapters window, verify that vmk1 has vMotion as an enabled service.
3. Select sa-esxi-02.vclass.local and click the Configure tab. Navigate to Networking > VMkernel
adapters.
4. In the VMkernel adapters window, verify that vmk1 has vMotion as an enabled service.
5. Leave the vSphere Client open, and continue to the next task.
In this task, you will use Cluster Quickstart to add ESXi hosts to the ICM-Compute-01 cluster.
By adding ESXi hosts to the vSphere cluster, vSphere DRS can take advantage of the combined
resources of all hosts in the cluster, allowing for more efficient use of resources and increased
scalability. Additionally, by distributing VM workloads across multiple hosts, vSphere DRS can provide a
higher level of availability and resiliency in the event of a host failure.
When an ESXi host is added to a vSphere cluster, the following steps occur:
• Discovery: The vCenter Server discovers the new ESXi host and adds it to the list of available
hosts in the vSphere environment.
• Configuration: The new ESXi host is configured with the appropriate network and storage
settings, such as vMotion and virtual SAN (vSAN) networks.
• Cluster membership: The new ESXi host is added to the vSphere cluster, allowing it to
participate in resource pooling and load balancing with other ESXi hosts in the cluster.
• Resource pool assignment: The new ESXi host is assigned to the appropriate resource pool,
allowing the vCenter Server to manage and allocate its resources.
• vSphere DRS configuration: If DRS is enabled on the cluster, the new ESXi host is added to the
DRS configuration, allowing it to participate in resource balancing and load balancing with other
ESXi hosts in the cluster.
• Monitoring: The vCenter Server begins monitoring the new ESXi host for performance and
availability, allowing for proactive management of resources and VMs.
In summary, adding ESXi hosts to a vSphere cluster is necessary for utilizing vSphere DRS, which
provides dynamic load balancing, resource optimization, and increased availability for VMs in the
cluster.
1. In the Navigator, on the Hosts and Clusters tab, expand sa-esxi-01.vclass.local and sa-esxi-
02.vclass.local. If any VMs are running, shut the VMs down.
The Cluster Quickstart wizard places the hosts in maintenance mode as it adds
them to the cluster. A host cannot enter maintenance mode if VMs are
running on the host. So, you must shut down or suspend the VMs before
proceeding.
2. At this stage, you have acquired knowledge on how to properly shut down VMs. To further
reinforce your understanding, kindly follow the steps outlined below if you need to shut down any
VMs.
Before proceeding to the next step, verify you have shut down any running
VMs.
3. In the Navigator, select the ICM-Compute-01 cluster. In the ICM-Cluster-01 main workspace, select
the Configure tab. Navigate to Configuration > Quickstart.
5. In the Add Hosts window, Add Hosts step, click the Existing hosts (0 from 2) tab.
7. On the Host summary step, review the information, and click NEXT.
9. Monitor the Recent Tasks pane, and wait for the tasks to complete.
10. In the Navigator, expand the ICM-Compute-01 cluster. Verify that esxi-01.vclass.local and sa-esxi-
02.vclass.local are located in the cluster. Notice the icon, and that both hosts are in maintenance
mode.
11. Right-click on sa-esxi-01.vclass.local and navigate to Maintenance Mode > Exit Maintenance
Mode.
12. Right-click on sa-esxi-02.vclass.local and navigate to Maintenance Mode > Exit Maintenance
Mode.
13. Verify that each host has exited maintenance mode by the change in their icon.
14. Leave the vSphere Client open, and continue to the next task.
In this task, you will use Cluster Quickstart to modify the automation level and migration threshold
settings for testing purposes.
Using Cluster Quickstart to modify the automation level and migration threshold settings in VMware
vSphere is a convenient and efficient way to test different configurations and determine the optimal
settings for a specific use case. This is important because the automation level and migration threshold
settings directly affect the performance and behavior of the vSphere DRS in the cluster.
By testing different automation level and migration threshold settings, administrators can determine
the best configuration for their specific needs, such as improving resource utilization, maximizing
performance, or reducing downtime. For example, increasing the automation level may result in more
efficient resource utilization, but may also result in increased VM migration and potential performance
impact. On the other hand, reducing the automation level may reduce VM migration, but may result in
suboptimal resource utilization.
Testing these settings using Cluster Quickstart allows administrators to make changes and evaluate the
results without having to go through a complex and time-consuming process of reconfiguring the
cluster quickly. This makes it easier to find the best configuration and optimize performance, as well as
troubleshoot any issues that may arise during the testing process.
1. In the Navigator, verify the ICM-Compute-01 Cluster is selected. On the Configure tab, navigate to
Configuration > Quickstart.
2. In the Cluster Quickstart main workspace, locate the Configure cluster pane, and click Configure.
3. On the Configure cluster window, Distributed switches pane, select Configure networking settings
later. Click NEXT.
4. In the Advanced options window, select Manual from the Automation level drop-down menu. In
Manual mode, vSphere DRS presents you with VM placement recommendations that you can
choose from. Select 5 from the Migration threshold drop-down menu. Click NEXT.
6. Verify that the vSphere DRS settings are correct. In the ICM-Compute-01 main workspace, click the
Summary tab. Locate the vSphere DRS pane, and click View DRS Settings.
7. In the DRS Parameters pane, verify that the Migration automation level is set to Manual. Since you
selected level 5 for the migration threshold, verify that recommendations from priority 1 through 5
will be applied. Click the Close icon.
8. Leave the vSphere Client open, and continue to the next task.
In this task, you can run vSphere DRS in either manual, partially automated, or fully automated modes.
In manual mode, you review the recommendations for optimal VM placement provided by vSphere
DRS when you power on a VM.
In manual mode, DRS provides recommendations for balancing resource utilization, but the
administrator must manually approve or reject the recommendations. This allows for more control
over the resource utilization and the VM migrations, but also requires more manual intervention.
Reviewing the recommendations in manual mode allows for a more thorough evaluation and
customization of the allocation of resources, rather than relying solely on pre-defined rules and
algorithms in partially automated or fully automated modes.
In partially automated mode, DRS continually monitors the resource utilization of VMs and hosts, and
provides recommendations for balancing the load, improving performance, and ensuring high
availability. Administrators can review and approve these recommendations or make changes as
needed, providing a level of oversight and control over the resource allocation process. This mode is
useful for organizations that want to ensure that resource allocation decisions are in line with specific
policies, requirements, or constraints.
In fully automated mode, DRS continually monitors the resource utilization of VMs and hosts and
makes changes to optimize performance and ensure high availability. The goal is to maintain an
optimal balance of resources and minimize downtime for VMs. This mode provides the highest level of
automation, allowing administrators to set policies and define resource utilization goals, but then step
back and let DRS handle the day-to-day resource allocation decisions.
Reviewing the recommendations in automated and manual modes allow administrators to compare
the behavior of DRS and determine which mode is best for their specific use case. For example, if
resource utilization is a high priority, automated mode may be the best option. On the other hand, if
control over VM migrations is a priority, manual mode may be the better option.
For lab purposes, manual mode will be utilized. Nevertheless, it is advisable to perform thorough
testing and evaluation of both automated and manual modes within a controlled test environment
prior to making a decision for a live production environment.
1. In the Navigator, select LinuxGUI-01. In the LinuxGUI-01 main workspace, click Power On.
2. In the Power On Recommendations window, select the recommendation that places LinuxGUI-01
on sa-esxi-01.vclass.local. Click OK.
3. Repeat steps 1 and 2 for the LinuxCLI-01 and LinuxGUI-02 VMs. Make sure to place the VMs on sa-
esxi-01.vclass.local.
5. Navigate back to the sa-esxi-01.vclass.local main workspace, select the Virtual Machines tab. Verify
that LinuxCLI-01, LinuxGUI-01, and LinuxGUI-02 are listed and powered on. Notice that a vSphere
Cluster Service VM (vCLS) is also listed and powered on. The vSphere Cluster Services manager
automatically deploys this VM when vSphere DRS is activated.
6. Select the ICM-Compute-01 cluster in the Navigator, and click the Summary tab.
7. In the ICM-Compute-01 main workspace, locate the vShere DRS pane. Click the Refresh icon a few
times at the top of the window to see the updated scores. At this point, results may slightly vary.
9. Leave the vSphere Client open, and continue to the next task.
In this task, you use the stress-ng tool to create a load imbalance in the cluster and observe how
vSphere DRS works. vSphere DRS provides recommendations for VM placement to ensure that the VMs
have the resources that they require.
It is important to review vSphere DRS recommendations when the cluster is imbalanced because it
helps ensure that resources are being utilized efficiently and that performance is optimized.
• Resource Utilization: When a cluster is imbalanced, it means that some hosts are overutilized
while others are underutilized. Reviewing DRS recommendations can help identify which VMs
need to be moved to balance resource utilization and improve performance.
• Performance Optimization: By balancing resource utilization, vSphere DRS can improve overall
performance by ensuring that VMs are not negatively impacted by resource constraints.
• High Availability: Reviewing DRS recommendations when the cluster is imbalanced can help
prevent issues such as host failure, which can result in downtime for VMs. By balancing
resource utilization, administrators can improve the high availability of their virtual
environment.
• Capacity Planning: Reviewing DRS recommendations can help administrators understand the
current state of their virtual environment and plan for future growth and resource needs.
In summary, reviewing vSphere DRS recommendations when the cluster is imbalanced is important
because it helps ensure that resources are being utilized efficiently, performance is optimized, high
availability is maintained, and capacity planning is facilitated.
2. In the Edit Settings window, expand CPU. From the Shares drop-down menu, select High. Click OK.
3. Select the LinuxGUI-01 VM, and select the Summary tab. In the Guest OS pane, click LAUNCH WEB
CONSOLE. If the LinuxGUI-01 VM is sleeping, click inside the web console to wake it up.
5. In the Terminal window, enter the command below and press Enter.
7. Select the LunuxGUI-02 VM, and select the Summary tab. In the Guest OS pane, click LAUNCH WEB
CONSOLE. If the LinuxGUI-02 VM is sleeping, click inside the web console to wake it up.
9. In the Terminal window, enter the command below, and press Enter.
10. Return to the vSphere Client by clicking the vSphere-LinuxGUI-02-*** tab in Firefox.
11. Let the stress-ng command run for a couple of minutes before continuing to the next step.
12. Select the ICM-Compute-01 cluster in the Navigator, and click the Summary tab.
13. In the ICM-Compute-01 main workspace, locate the vSphere DRS pane. You may need to click the
Refresh icon at the top of the window to see the updated scores. Please allow 5 - 10 minutes for
the score to accurately portray the results for this step. Results may slightly vary by the percentage
being lower or higher than the screenshot below.
15. Select the Monitor tab in the ICM-Compute-01 main workspace. Navigate to vSphere DRS >
Recommendations.
16. In the DRS Recommendations pane, click SELECT ALL and APPLY RECOMMENDATIONS.
17. Monitor the Recent Tasks pane, and wait for the migration task to complete.
18. Return to the cluster's Summary tab and observe any changes to the DRS scores. You may want to
allow 2 - 4 minutes for the score changes to occur.
20. The lab is now complete; you may end your reservation.