Labs 18 and 19
Lab 18
This lab covered alarms in vSphere. Alarms can be set to trigger from a variety of different events and can trigger events themselves. You can set alarms on specific machines, or any other object in vSphere such as a datacenter or resource group.In the case of this lab, I first created an alarm on one of my VMs that that would trigger a warning if the CPU usage went over a certain level. It's very easy to change what different levels of warning you want to trigger, and at what CPU usage level.
I then set an action so that the VM would be suspended when the alarm is triggered.
The next alarm I created was on the Datacenter. It was set to trigger when a VM with the specified name was suspended. I tested if you could enter a partial name for a VM to trigger for any VM starting with that name, but I figured out that the name has to be an exact match to a VM.
To trigger for multiple VMs, you could instead put the VMs in a resource pool and set the alarm to check if the VMs resource pool is equal to the specified name.
Another method is to assign tags to specific VMs and test if the VM tag is equal to the specified name. You should be able to use a similar method with any single object that you group VMs under.
Alarm on VM created:
Creating alarm on the datacenter:
Alarm triggered then cleared:
Disabling the alarms:
Lab 19
In this lab I had to set up and play around with vSphere HA (High Availability).
Cluster with vSphere HA enabled:

Three VMs protected with esxi01 as the master host:

Management enabled on the inter-host link:

Hosts reconfigured for vSphere HA:

For the next part I had to test HA. In my case the L2-Win7_01-2-RL VM was running on the master host esxi01.Setting Up HA
To start using vSphere HA, you first need to make a cluster with vSphere HA enabled. You then have to configure the networking, and reconfigure the hosts for HA by right clicking each host and selecting the option for the dropdown to reconfigure for HA. I had no problems at all while setting this set up.Cluster with vSphere HA enabled:
Three VMs protected with esxi01 as the master host:
Management enabled on the inter-host link:
Hosts reconfigured for vSphere HA:
Testing HA
After initiating a restart on esxi01, I got some error messages that vSphere couldn't talk to esxi01, and also got notifications that HA failover was in progress. As you can see in the below screenshot, the VM that was on esxi01 is still running even though esxi01 is not available. After clicking on the VM, it shows that it is now running on esxi02. This means that the failover worked correctly.
After esxi01 has restarted, it is no longer the master host. The VM previously running on it did not return and stayed on esxi02. The reason this happened is because esxi02 took over as the master host when esxi01 went down, and because the only way the VM would return to esxi01 is through DRS or by manually migrating the machine. HA merely takes care of the failover, it does not distribute resources.
Cluster Resources
Next I had a quick look at the cluster resources. For CPU, memory, and storage, you can see the total used and available resources, and resource reservation. The reservation is all at zero because I haven't configured any reservation.HA Admission Control
HA slots are used to make sure there is enough resources on the cluster. In the case of two hosts, a VM on one host will need one or more slots on the other host to ensure that it will have enough resources on that host if the current host fails. If there are not enough slots available on the cluster when a host fails, some machines may not power on or there will be performance degradation.
Default slot size:
Slot size after changing CPU reservation on VM:
If you reduce the slot size, the VM with 500 Mhz reservation requires 2 slots. As you can see, the number of VMs requiring multiple slots is one out of 3
When I powered off the all the VMs, you can see some resources are still being used. To answer the lab question, this is because the ESXi hosts are reserving memory for their own use. ESXi is an operating system that uses physical resources so it needs to make sure there is always some spare to be able to run.
Resources used by ESXi:
After adding memory reservations of 300MB to two of my VMs, total slots and any other slot calculations are all zero or N/A. This is because slot calculation only happens on live VMs and all my VMs are off. HA ensures VMs stay on and available even on host failure, so to work it needs VMs that are actually on.
Slots with one machine on:
Slots with two machines on:
Slots with three machines on
As you can see, the number of available slots reduces by one for every machine that uses one slot. If a machine requires more slots obviously it will reduce by more until you run out of slots. If a cluster has N total slots, you can power N number of machines on unless one or more machines use more than one slot.
Comments
Post a Comment