In this lab, I am going to Create and Use Resource Pools on an ESXi host by using vCenter Server.
- Log in the VMware vSphere web client portal: https://vCenter Server Appliance Name.domainname:9443/vshpere-client/# or VMware vSphere Client via root user and password.
The tasks list for lab 18:
- Create CPU Contention
- Create a Resource Pool Named Fin-Test
- Create a Resouce Pool Name Fin-Prod
- Verify Resource Pool Functionality
Steps for the task: Create CPU contention
CPU contention is the state of using the limited logical CPU resources by the multiple VMs and being forced by the VMkernel to share. CPU contention is the responsible for the VMs poor Performance.
Step 1: Select Home ->vCenter ->VMs and Templates
Step 2: Powered On your VMs and make sure they are running on the same host
Step 3: Login into the VM using Console or VMRC. Right-click on the script of “Cpubusy.vbs” and Open with command Prompt
Step 4: Run the script 2-3 minutes for making it stabilise in the VM operating system.
Step 5: Now you can see that “cpubusy.vbs” is running both VMs
Step 6: Right Click on the VM and “Edit Settings“
Set the CPU -> Set Scheduling Affinity “1” in space provided from the Virtual Hardware section of Edit Settings.
Repeat the steps of Scheduling Affinity for the both VM. The VM will run only on Processor 1 after giving the value “1” to scheduling Affinity.
You will notice from the running script, the program is processing approximately at the same rate of each virtual machine.
Steps for the task: Create a Resouce Pool Named Fin-Test
You can control over the resources of a host through the Resource pools.
Step 1: Go to the Home ->vCenter -> Hosts and Clusters. Right-Click on the host [ I select ESXi host 1] and Select “All vCenter Actions -> New Resouce Pool.
Step 2: Perform the following action on the new Resource Pool wizard
CPU Resource Shares: low
All other settings keep the default. Then Ok.
Step for the task: Create a Resource Pool Named Fin-Prod
Step1: Select Home ->vCenter -> Hosts and Clusters. Right-Click on the ESXi host 1 and Select “All vCenter Actions -> New Resource Pool”
Step 2: Perform the following action on the New Resource Pool wizard
CPU Shares: High
All another setting keep the default. Then “OK”
Steps for the task: Verify Resource Pool Functionality
You can add and remove existing VM to a resource Pool.
Step 1: Select the “Fin-Prod” and Click “Summary” tab
Step 2: select the Fin-Test and Click the “Summary” for checking the number of Shares
Step 3: Drag You VM to the Fin-Pool and Prod-Pool. I placed “momatajvmcleint01-2” in Fin Prod and “momatajvmclient01-3” in the Fin-Test
Step 4: View the cpubusy.vbs in each VM console. You will see the difference from the running VMs.
Step 5: Right-Click on the Fin-Prod and Select Settings
Step 6: Change the Shares state for the Fin-Test resource pool = Low to Normal
Verify the result from running Script. The output has been changed.
Step 7: Change the CPU shares state for the Fin-Prod: Hign to Normal
Verify the result. Both VMs are running at the same rate at the CPU shares Normal
Press Ctrl + C to stop the Script from your VMs.
Thank You 🙂