Wednesday, October 16, 2013

VMware Storage Distributed Resource Scheduler (SDRS)

Storage DRS automatically places virtual machines and vmdks files on a datastore which has lower latency and most space available. SDRS uses svMotion to move the virtual machines. The virtual machines are automatically balanced by being vMotioned to a better datastore if they aren't receiving the latency they need. SDRS enables you to aggregate datastores to a single object called a datastore cluster. SDRS enables smart placement of virtual machines based on space availability and latency. In other words when you create a new virtual machine/ when a clone is created/ when virtual machine is relocated you will select a datastore cluster instead of particular datastore and SDRS will place the virtual machine on correct datastore in the datastore cluster.
Another thing that SDRS does is the load balancing. SDRS algorithm is triggered based on (a) High latency and (b) Low space. The default threshold to trigger SDRS is the 80% space utilization. Another metric is I/O latency. If I/O latency gets above default threshold of 15ms than the SDRS algorithm can be triggered. I/O latency is evaluated every 8 hour based on last 24 hour trend.
Storage DRS also helps in datastore maintenance. Consider a datastore that is needed to be shutdown for maintenance maybe the SAN lun is degraded and you want to replace one of the disk in the lun. Simply put the datastore in the maintenance mode and all the virtual machines and vmdks files on that particular datastore will be evacuated automatically using svMotion.
Storage DRS VMDK affinity and anti-affinity rules are also available. VMDK affinity rule keeps virtual machine's vmdks together on the same datastore while VMDK anti-affinity rule keeps virtual machine's vmdks on different datastore.

Storage DRS requirements:
1- Minimum of vSphere Enterprise plus license.
2- Storage vMotion must be enabled.
3- Shared storage must be present on all hosts.

Storage DRS configuration:
I have already presented two datastore from the SAN. Backup and Storage namely.

1- Now go to home tab and select Datastore and Datastore clusters.

2-  Right click datacenter and select new datastore cluster.

3- Enter a suitable name and select next.

4- Select next.

5- Select next with the default settings.

6- Select the cluster and select next.

7- Select the datastores and select next.

8- Select finish.

9- The storage DRS cluster has been configured.

Conclusion:
The storage DRS has been sucessfully configured. Now SDRS will move the virtual machine when the datastore is experiencing high latency or low space.  


Tuesday, October 8, 2013

VMware Distributed Resource Scheduler (DRS) and Dynamic Power Management (DPM)

In this post i will show how to configure DRS and DPM. DRS and DPM are the amazing vSphere features. The job of DRS is to understand the resources of virtual infrastructure. It knows about CPU, Memory, Power and Storage utilization. DRS ensures that virtual machine gets the resources that it needs. DRS is not load balancing, its not trying to make sure every ESXi host has the exact same cpu or memory utilization, what it does it look after the resource requirements for the virtual machines, it checks to see if that virtual machine is getting the resources it needs from the current ESXi server. If the virtual machine is not getting the resources it will motion it to another ESXi server where it would get the resources. The DRS not only works with existing virtual machine but it also works with brand new virtual machine. When you create a new virtual machine DRS will automatically place the virtual machine on the right ESXi server. When DRS moves running virtual machine from one ESXi server to another it uses VMware vMotion therefore there is no downtime.
DPM is a sub-feature of DRS. In order to use DPM, the DRS must be enabled first. When the load on your virtual infrastructure is low, DPM will use vMotion to migrate running virtual machines and actually consolidates them to many fewer ESXi servers. Than it will put the ESXi server to sleep mode from where the virtual machines are moved. In other words those ESXi physical servers are powered off and they wouldn't be using as much electricity as compared to what they were using before. When the load of virtual infrastructure increases the DRS and DPM will power on the ESXi servers and automatically distribute the virtual machines. DPM will help organization saving lot of money over the time.

DRS and DPM Requirements:
1- Minimum of vSphere Enterprise license
2- Shared storage must be present on each host
3- DRS will use vMotion, therefore vMotion must be configured
4- DPM will require DRS to be configured first

Since its a lab environement, i have already add two ESXi hosts in the datacenter. vMotion is also configured. For vMotion configuration check this post
http://mfaizanansari.blogspot.com/2013/09/vmware-vmotion-configuration.html

1- Right click on the datacenter and select new cluster.

2- Enter a suitable name and check on turn on vSphere DRS. Select next.

 3- Select next.

4- Select automatic option to turn on DPM feature.

  5- Select next.

6- Select next.

 7- Select finish.

8- After successful configuration of DRS and DPM. Now its time to add the host in the cluster. Either right click the cluster and select host or use drag and drop method. I am using drag and drop method.

9- Select finish.
 Use the same method to add another host.

10- DRS and DPM hav been configured successfully. Now DRS and DPM will use their magic over the time.

 Conclusion: DRS and DPM have been successfully configured. In the next post i will show how to configure the storage DRS.

Friday, October 4, 2013

VMware High Availability (VMHA) Configuration

In this post I am going to show how to configure and test VMware High Availability. VMHA monitors physical servers and virtual machines, server failure detection also migrate and restart the virtual machine from offline hosts. vSphere uses an agent called "FDM" Fault Domain Manager. FDM agent communicates with vCenter to gather information about the status of virtual machines. In every VMHA cluster one host is always a Master and the rest are Slaves. The selection takes place via an election. The host with most number of mounted datastores becomes the Master. In case of a tie, Managed Object ID is used. The host with the highest ID becomes the master. The election takes place during the VMHA cluster creation or in case when the current Master's host fails or enters in maintenance mode. VMHA maintains a communication channel with all the hosts in a cluster with the help of heartbeat. In vSphere 5.0 there are two heartbeat mechanism. Network heartbeat and Datastore heartbeat (use when network is unavailable).

Master Responsibilities: 
1- Master host monitors the availability of host and virtual machines.
2- Manages virtual machines restart in case of host failure
3- Maintains the list of virtual machines on each ESXi host
4- Restarts fail virtual machines
5- Exchange the state with vCenter
6- Monitors the state of slaves.

Slave Responsibilities:
1- Monitors their running virtual machines and send status to Master and perform restart on request from Master
2- Monitors Masters host health
3- In case of Master failure, slave takes part in Master election.

VMware High Availability Requirements:
1- Minimum of vSphere Enterprise license 
2- At least two hosts in a cluster
3- All the hosts have access to shared storage
4- At least one management network, best practice says two
5- All hosts have static IP Address

Since its a lab environment, i have already configured a new datacenter and connected two ESXi hosts in it. The shared/centralized storage has also been presented on the host. A virtual machine has been created on the storage.

1- Right click the newly created datacenter and select new cluster.
 
2- Enter the name and select Turn on vSphere HA. For better performance VMware recommends to configure vSphere and vSphere DRS together. For the sake of simplicity, i have only using vSphere HA. Select next.

3- Configure the settings according to the requirements and select next.

4- Select next.

5- I have disabled the VM monitoring. Configure the setting according to the requirement and select next.

6- Select next.

7- Select next.

8- Select finish.

9- The cluster has been created.

10- Now its time to move the ESXi hosts into the cluster. Drag and drop each host in the cluster at a time. VMHA will install the FDM agent on each host and after that Master/Slave election will take place.

11- The VMHA has been successfully configured. In order to check the Master and Slave host. Check each host summary.
 In order to test the VMHA, just shutdown or restart the host which is hosting the virtual machine.

Conclusion: In this post the VMHA has been successfully configured and tested. In the next post i will show how to configure Distributed Resource Scheduler (DRS).



Tuesday, October 1, 2013

VMware Storage vMotion Configuration

VMware Storage vMotion is used to move running virtual machine from one datastore to another datastore. The running virtual machine stays on the server that it is on and the memory for the virtual machine never moves. The virtual machine disk files only moves from one datastore to another datastore. Storage vMotion uses Datamover to move the disk files.

VMware Storage vMotion requirements:
1- Minimum of vSphere Enterprise license.

Since it's a lab environment i am using Starwinds iSCSI SAN software. I have already presented a  storage named "STORAGE" on both hosts which is a source storage and where a virtual machine currently lives. I have also presented another storage from SAN named "BACKUP"to both hosts which will act as a destination storage.

1- Right click the running virtual machine and select migrate.

 2- Select change datastore and select next.

 3- Select the destination storage in my case "Backup" and select next.

4- Select finish.

5- Observe the progress in task bar.

6- After couple of minutes, the virtual machine has been successfully migrated to another datastore.

Conclusion: In this post i have shown how to configure storage vMotion and also perform the testing. In the next post i will show how to configure VMware High Availability.