Lab 21: Using VMware vSphere High Availability

In this Lab,  I am going to demonstrate how to work on vSphere HA functionality in the VMware VSphere environment.

For Implementing high availability for vCenter Server, VMware Virtualization uses primarily VMware vCenter Server Heatbeat and VMware vSphere High Availability. vCenter Server Heatbeat protect against planned and unplanned downtime in the vCenter Server and vSphere HA ensures that running virtual machines will remain available on the vCenter Server. It also protects against hardware and operating system failures.

vSphere High availability function ensure that virtual machines running in the environment remain available  to the user end by the following technologies:

  • Virtual machine migration
  • Multiple I/O adapter paths
  • Virtual machine load balancing
  • Fault tolerance
  • Disaster recovery tools

The features of high availability and fault tolerance of vSphere exist in a physical data centre. It protects against hardware failure, planned maintenance with zero downtime, and also protect again unplanned downtime and disasters. It works at every level of the data center including all individual components, server, storage, data and the entire site.

Methods for making vCenter Server Available: It uses vSphere High Availability to protect the vCenter Server virtual machine and VMware vCenter Server Heartbeat.

To provide high availability to vCenter Server: It Provides high availability for the components by using the Authentication identity source, for example, VMware vCenter Single Sign-On or Active Directory, and also vCenter Server Database.

The tasks list for the lab 21:

  • Create a Cluster-Enabled for vSPhere HA
  • Add ESXi Host to a Cluster
  • Test vSPhere HA Functionality
  • Determine the vSphere HA Cluster Resources Usage
  • Manage vSphere HA Slot Size
  • Configure a vSphere HA Cluster with Strict Admission Control

Prerequisites:

  • 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.

Steps for the task: Create a Cluster-Enabled for vSphere HA

VMware vSphere HA Cluster enables a collection of the ESXi hosts to operate together. A group of hosts can provide higher level availability by sharing their resources for virtual machines rather than individual operate ESXi Host.

Step1: Go to the Home ->vCenter -> Hosts and Clusters4

Step 2: Righ -Click on your data center [ My Data Center name: Data Center, If you are following VMware Lab guide, Your data center name: Training]

Then click on the “New Cluster1.jpg

Step3: You can see a New Cluster wizard. Now you need to perform the following action to active vSphere HA Cluster.

Option1: Give an Appropriate Name

Option2:  Turn On vSphere HA

Option 3: Policy: select radio button of Percentage of Cluster resources reserved as failover spare capacity.

leave the rest of other options as the default setting. Then OK. If you monitor in the Recent Task pane, you can see a cluster is created.2.jpg

Steps for the task: Add ESXi Host to a Cluster

In this task,  I am going to show how to move the host to the cluster. For this activity, You can use the vSphere Web Client.

Step 1: Go to the Home->vCenter->Hosts and Clusters. Select Lab Servers folder that you created before for your hosts and VMs.

3.jpg

Step 2: Expand your Lab Server folder inventory object and select ESXi host  that you want to move to the cluster and Drag it to the Lab cluster  inventory object5.jpg

Step 3: Monitor Recent Activity task, You can see “Configure vShpher HA” performing the operation.6.jpg

Step 4: Configuration Verify: Click Monitor and select vSphere HA tab. In the Summary tab, You can see which host is the master, how many Virtual machines in the cluster, Are they protected or unprotected statistics?

In my case, There is one Master Host: esxi02.momataj.local. Virtual machines: 2 Protected7.jpg

Click Heartbeat: You will get an idea from here that how many data store are used for heart beating. In my case: Two Datastore: Private VMFS02-00 and Private VMFS 0304

8.jpg

Click Configuration issues: You can see here some configuration warning and errors. Click on the link for the details review.

The common error is that “The ESXi hosts in the cluster have no management network redundancy”

The reason for that warning is that: Your ESXi host has a single management network port configure for the cluster. Even though vSphere HA can work with a single management network port, But it still it requires second management port for redundancy.

910.jpg

Step 5: Configure redundancy management port with vMotion Network port: Go to the Manage-> Networking->VMKernel adapters. Select “vMotion” VMKernel adapter and Click Edit settings.

11.jpg12

Click on the “Management traffic” from Edit Settings for enable management port redundancy. 13.jpg

Right Click on your ESXi hosts and Go to the All vCenter Actions -> Reconfigure for  vSphere HA14.jpg15.jpg16.jpg

Now you can check the summary and will see that ” That redundancy error message has been disappeared’17.jpg

18.jpg

Steps for the task: Test vSPhere HA Functionality

In this task, I will verify vSphere HA functionality.

Step1:  Gp to the Home ->vCenter ->  Hosts and Clusters. Select your master ESXi host in the inventory. 2.jpg

Click on the Related object -> Virtual machines tab. Powered on the VM which is right under Master host.3.jpg4.jpg

Reboot your master host. You will get a message that host is not in maintenance mode. In a real environment, you should not reboot your system without place it maintenance mode.7.jpg

Write in the box: Testing vSPhere HA8.jpg

Click the monitor -> Events tab15.jpg16.jpg

After  reboot your master host, check our host status, You can notice from the Slave Host Summary that vSphere HA State: Election is happening17.jpg

Click the Related Objects tab and Click the “Virtual Machine” tab. Now you can see that Original Master ESXi host should now be running host in the cluster.18.jpg

Now you can see vesxi01 ( before It was the slave) become Master in the cluster.task -3 master change salve summary.jpg

Original Master host connected as (Slave)

task -3 master change salve.jpg

And original Slave host is running as Master.task -3 master change.jpg

Steps for the task: Determine the vSphere HA Cluster Resources Usage

In this task, I will show how to determine the vSphere Cluster Resources Usage.

Step1 :  Go to the Home -> vCenter -> Hosts and Clusters -> Select Lab Cluster. Click Resource Allocation tab: 

CPU usage for Total capacity and Name: Here you can see Reserve capacity for the CPU and available capacity. In the name section, you can see the limitation of the resources for the VM. In my case, It is showing unlimited. Because I did not apply any limitation and Cluster resources are available for VMS.1.jpg

Memory Allocation check for the total cluster.2.jpg

Storage capacity check for the total cluster. Total capacity of my cluster is 148.50 GB3.jpg

Steps for the task: Manage vSphere HA Slot Size

In this task, I will show how to manage vSphere HA Slot Size. The vCenter server uses admission control to ensure that sufficient resources are available in the cluster to provide failover protection and also ensure that VM resources reservations are respected.

Step1: Go to the Home ->vCenter-> Hosts and Clusters. Righ click on the “Lab Cluster” in the inventory and select “Settings

1.jpg

Select the vSphere HA and “Edit” button2.jpg

Go to the admission control panel from the edit setting. Select “Define failover capacity by a static number of hosts” policy. Then “OK”3.jpg

Step 2: Go to the monitor tab and click “vSphere HA” tab. review the slot information for your cluster from the Advanced Runtime Info. My Slot size is: 32 MHz5.jpg

Step 3: Select Home-> vCenter-> VMs and Templates7.jpg

Right Click on one of your VMs in the inventory and Select “Edit Settings”8.jpg

Change the CPU reservation. Now it is showing “O”9.jpg

Change it 0 to 512 MHz. Then Click “OK”

10.jpg

Monitor ->vSphere HA tab. Now you can see Slot size has changed. It’s now 512 MHz from Advanced runtime info.

11.jpg

Step 4:  Right Click “Lab Cluster” and select “Edit Settings”

13.jpg

Go to admission control. make it expand and select “Slot Size Policy”. And Select “Fixed Slot Size”. CPU Slot size = 300. click on calculate button14.jpg

The calculation for the VM, you will see: A total number of the reserve slot it 2 because CPU slot size has not fixed to 300 MHz and the VM CPU slot size is 512 MHZ. CPU reservation for that specific VM will reserve two slots while powering on. Then “OK”15

Click “Monitor” tab and select “VSphere HA Tab”. See the details summary of the Cluster HA information tab.16.jpg

Step5: Right Click “Lab Cluster”  and Select “Settings”

17.jpg

Click on Edit button from the “vSPhere HA”18.jpg

Select “Cover all Power-on Virtual Machine” policy from the admission control Options. Then “Ok”

19.jpg

Step 6: Remove the CPU Reservation: Click on that Specific VM that you changed CPU reservation in the previous step for removing it now.20.jpg

Change the Reservation to 0 MHz21.jpg22.jpg

Step 7: Delete the ‘Lab Servers” folder from the inventory. Right click – Lab Server -> All vCenter Actions -> Remove from inventory.23.jpg

Steps for the task: Configure a VSphere HA Cluster with Strict Admission Cluster

A slot is a logical representation of the CPU and memory Resources. By default, It sets with VM satisfactory requirement. But Administrator can change it as per VM application and workload capacity.

The previous task, we learned “Define failover capacity by a static number of hosts”. In that policy, vSphere calculated the space for the VM to run based on the largest CPU and Memory Reservation across all the VMs.

In this task, I will discuss how to work with strict admission control.

Step1: Select Home->vCenter->Hosts and Clusters ->Lab Cluster -> Related Objects -> virtual mahcines. and Powered off all the VMS.1.jpg

Go to the Lab Cluster Summary.  Notice the Memory Capacity of the cluster. Compare it with the ESXi hosts capacity. 2.jpg

Go to the Monitor – > Resouces Allocation button -> click “Memory“. Identify the total capacity, reserve capacity, available capacity of the cluster. You will see the available capacity is less than the amount that you calculated in the previous screenshot from the Cluster Summary.3.jpg

Step 2: Right Click on the same VM machine which you used for the previous task. Select – All vCenter Actions-> Edit Resources Settings 4.jpg

Change the Memory reservation to 384MB. Then Ok5.jpg

Verify the change from the following Screenshot.6.jpg78.jpg9.jpg10.jpg11.jpg

Step 3:  Now Powered on your VM. Right Click on VM and select “Power On”12.jpg

Now verify again the Slot size. You will see Slot size has changed from “Advanced Runtime info”13.jpg14.jpg15.jpg16.jpg

Preparing for the Upcoming Lab

You need to change Memory Reservation that you changed the previous task for continuing upcoming Lab1.jpg

Select the Memory Reservation and make it 0 from value whatever you see there.2.jpg3.jpg

Right click “Lab Cluster” and Select “Settings”. Then vSphere -> Edit ->Admission Control. And then Select “Do not reserve failover Capacity”. Then “Ok”‘4.jpg

Problem and Solution:

Problem: If you get the following warning: vSphere HA agent on this host could not reach isolated address: xxxx.xxxx.xxxx.xxxx. This is because you are using a gateway address that is not pingable.

If you get this warning after enabling vSphere HA, don’t worry your system will work with vSPhere HA with this warning but you can solve this warning if you follow the solution I shared.HA Solves.jpg

Solution:

Click on lab cluster ->  Settings ->vSphere HA ->Edit -> Advanced Option

and Put these following command on Advanced option

das.isolationaddress0= any pingable address on your system [ I used my dc server IP address]

das.usedefaultisolationaddress = false.

Then click on your Host -> All vCenter Actions -> Reconfigure for  vSphere HA

You will no longer see that warning!

HA.jpg

Thank you  🙂 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s