Virtualization

VMware vCenter Custom Email Alert

VMware is best virtualization technology till now, I tried Oracle VM as well, it is nice but not that fancy, VMware is bit costly on Enterprise level but it is feature rich, it makes live easier at configuration and you don’t need to worry a lot for operation.

A problem I faced, I needed to send customized Email alert sent by vCenter but without trying VMware-PowerCLI.

Here is the easy way:

– I have Windows based vCenter, open the file under below path: \VMware\Infrastructure\VirtualCenter Server\locale\en\stask.vmsg

Be aware if you have any localization so the directory might be “fr,de, … ext” under locale, in my case it was English version of vCenter so it was en directory under locale

I modified below lines:

###

Email.statefulAlarm.subject = “[vAlarm] {alarmName} changed from {oldStatus} to {newStatus}”

Email.statefulAlarm.body = “Target: {targetName}\nPrevious Status: {oldStatus}\nNew Status: {newStatus}\n\nAlarm Definition:\n{declaringSummary}\n\n{alarmValue}:\n {triggeringSummary}\n\nDescription:\n{eventDescription}”

###

Email.statefulEventAlarm.subject = “[vAlarm] {alarmName} {eventDescription}”

Email.statefulEventAlarm.body = “Target: {targetName}\nPrevious Status: {oldStatus}\nNew Status: {newStatus}\n\nAlarm Definition:\n{declaringSummary}\n\n{alarmValue}:\n {eventDescription}”

###

Email.statelessEventAlarm.subject = “[vAlarm] {alarmName} {eventDescription}”

Email.statelessEventAlarm.body = “Target: {targetName}\nStateless event alarm\n\nAlarm Definition:\n{declaringSummary}\n\n{alarmValue}:\n{eventDescription}”

###

So you can Edit what’s inside email body and subject.

Virtualization

VMware HA Cluster with Virtual Storage Appliance as Shared Storage

1     Introduction

1.1   VMware Basics

VMware ESXi™, VMware vCenter Server™, and vSphere Clients, which are the virtualization layer, management layer, and interface layer, respectively, of vSphere.

1.1.1  Relationships between the Components Layers of VMware vSphere

VShpere

1.1.1.1     Virtualization Layer

The virtualization layer of VMware vSphere includes infrastructure services and application services. Infrastructure services such as compute, storage, and network services abstract, aggregate, and allocate hardware or infrastructure resources.

Application services are the set of services provided to ensure availability, security, and scalability for applications. Examples include vSphere High Availability and Fault Tolerance.

1.1.1.2     Management Layer

VMware vCenter Server is the central point for configuring, provisioning, and managing virtualized IT environments.

1.1.1.3     Interface Layer

Users can access the VMware vSphere datacenter through GUI clients such as the vSphere Client or the vSphere Web Client. Additionally, users can access the datacenter through client machines that use command-line interfaces and SDKs for automated management.

1.1.2  VMware vSphere Components and Features

An introduction to the components and features of VMware vSphere helps you to understand the parts and how they interact. VMware vSphere includes the following components and features.

2    VMware vSphere Storage Appliance

A VSA cluster provides a set of datastores that are accessible by all hosts within VMware datacenter. You can create a VSA cluster with two or three VSA cluster members. The status of the VSA cluster is online only when more than half of the members are online, in two member cluster you need to use VSA cluster service as quorum device.

A VSA cluster is a virtual alternative to expensive SAN systems. While SAN systems provide centralized arrays of storage over a high-speed network, a VSA cluster provides a distributed array that runs across several physical servers and utilizes local storage that is attached to each ESXi host.

A VMware virtual appliance that runs SUSE Linux Enterprise Server 11 SP2 and a set of storage clustering services that perform the following tasks:

  • Manage the storage capacity, performance, and data redundancy for the hard disks that are installed on the ESXi hosts
  • Expose the disks of a host over the network
  • Manage hardware and software failures within the VSA cluster
  • Manage the communication between all instances of vSphere Storage Appliance, and between each vSphere Storage Appliance and the VSA Manager

2.1   VSA Cluster Components

A VSA cluster requires the following vSphere and vSphere Storage Appliance components:

  • ESXi Hosts: Two or three ESXi hosts version 5.0 or later, All hosts are running same ESXi version (Existing VMs can be migrated)
  • vCenter Server: Windows based is the only supported release to manage VSA instance (one vCenter can manage multiple VSA instances)
  • vSphere Client: can be Web or vShpere Client
  • VSA Manager: installed as plugin on vCenter (Windows), After you install it, you can see the VSA Manager tab in the vSphere Client. You can use VSA Manager to monitor, maintain, and troubleshoot a VSA cluster.
  • VSA Cluster Service: service is used in a VSA cluster with two members to act as a third member in case one of the VSA cluster members fails. In such a case, the online status of two out of three members maintains the online status of the cluster. The service does not provide storage volumes for the VSA datastores[1]
  • Ethernet Switches: Gigabit Ethernet or 10 Gigabit Ethernet switches provide the high-speed network backbone of the VSA cluster.

2.2   VSA Cluster Service Considerations for Two Members Cluster Setup

A VSA cluster with two VSA cluster members uses an additional service called VSA cluster service. The service participates as a member in the VSA cluster, but it does not provide storage. For the VSA datastores to remain online, a VSA cluster requires that more than half of the members are also online. If one instance of a vSphere Storage Appliance fails, the VSA datastores can remain online only if the remaining VSA cluster member and the VSA cluster service are online. In a simple configuration, the VSA cluster service can run on the vCenter Server machine. However, note that the installation of VSA Manager on vCenter Server always installs the VSA Cluster Service, whether it is going to be used or not.

When you use a single vCenter Server instance to manage multiple remote VSA clusters in a more complex configuration, the VSA cluster service must always run on the same network of the two member VSA cluster. Unfortunately it is not possible to have same VSA cluster service for multiple VSA clusters because VSA cluster service actually works as a third VSA cluster Node for 2 Node VSA Cluster.

Only one vSphere Storage Appliance can run on an ESXi host at a time

3.3   How a VSA Cluster Handles Failures

A VSA cluster provides automatic failover from hardware and software failures.

Each VSA datastore has two volumes. A VSA cluster member exports the main volume as the VSA datastore. Another VSA cluster member maintains the second volume as a replica. If a failure occurs to the hardware, network equipment, or the VSA cluster member of the main volume, the main volume becomes unavailable, and the replica volume takes its place without service interruption. After you fix the failure and bring the failed VSA cluster member back online, the member synchronizes the main volume with the replica to provide failover in case of further failures.

The following illustration depicts automatic failover in a VSA cluster with 2 members. The replica volume takes over the failed main volume. In this case, to make sure that more than half of the members are online, the VSA cluster service simulates a VSA cluster member.

A VSA cluster provides automatic failover from the following failures:

  • Failure of a single physical NIC or port, or a cable connecting the NIC port to its physical switch port
  • Single physical switch failure
  • Single physical host failure
  • Single VSA cluster member failure

4     vShpere Availability &HA Cluster

The vSphere vMotion and Storage vMotion[1] functionality in vSphere makes it possible for organizations to reduce planned downtime because workloads in a VMware environment can be dynamically moved to different physical servers or to different underlying storage without service interruption. Administrators can perform faster and completely transparent maintenance operations, without being forced to schedule inconvenient maintenance windows.

VMware vSphere HA protects application availability in the following ways:

  • It protects against a server failure by restarting the virtual machines on other hosts within the cluster.
  • It protects against application failure by continuously monitoring a virtual machine and resetting it in the event that a failure is detected.
  • You do not need to install special software within the application or virtual machine. All workloads are protected by vSphere HA.
  • After vSphere HA is, no actions are required to protect new virtual machines. They are automatically protected.