pages

Wednesday, December 22, 2010

vCO - bug discovered on initializing variables

After examing Deric's question in VMware community for vCO I was a little bit confused of my testing results - could that be? - is it a feature or a bug.
Now we have a first statement, it is definitly a bug. Read more at http://communities.vmware.com/thread/296963.

Regards, Andreas

vCO - cluster AAM compliance check

Normal productive clusters are spread over two or more fire compartments. But only maximum five hosts in a cluster are primary hosts for AAM. What happens if all primary hosts reside in one section and this section fails?!  Check your cluster AAM fire compartment compliance:
The following code is compressed in one task for better viewing. For production use split it up in action & workflow(s), depending on sections. It will check, if minmum 2 host in each cell (fire compartment) is a primary host. Adapt these values for your use.
Parameters:
  • (input) Cluster [VcClusterComputeResource]: the cluster to be checked
  • (input) Cell1, Cell2 [Array/VcHostSystem]: an array containing the hosts in each fire compartment (e.g. use vCO configurations)
  • (output) compliant [boolean]: the cluster compliance
  • (output) Cell1Primary, Cell2Primary [Array/VcHostSystem]: primary hosts found for cell
Depending on compliance state you can use the both arrays in a next step email workflow to inform about the cell compliance.

If you are running vSphere 4.1 you can use DRS groups to get already defined host lists:

<Cluster>.configurationEx.group contains the group listing (array).
Cluster.configurationEx.group[x].host constains the host list of group x (array). You can use this to feed the parameters Cell1 & Cell2 dynamically with values from vSphere.

Regards, Andreas

Tuesday, December 21, 2010

X-Mas - a little gift: MCS-ViewHA

How to see the primary Nodes in a VMware HA Cluster?

As you know, VMware vSphere has really nice features. One of then is the VMware HA or VMware High Availbility feature. With this, it is possible to build a high availbility Cluster for virtual maschines. Any virtual Machine in that cluster are protected for Hosts crashes.

The HA Feature monitors all ESX-Hosts in the Cluster and restart any virtual maschine on other ESX-Server if one or more ESX-Servers are crashing. So the virtual machines are back and running in a few minutes.

A VMware Cluster can be build with at least max. 32 ESX-Hosts. You must configure it by the vCenter Server, but pretty nice is, that the VMware HA Feature works without the vCenter Management Server. This means that the ESX-Host is montoring itself and all other ESX-Hosts over heartbeats.

All Server do it?... Not all!

In a VMware HA Cluster are max. five ESX-Server primary Hosts. All other ESX-Hosts will be secondary Hosts. Only the primary Hosts will be have Information about the whole Cluster. The secondary Host does not have that Information. But in a kind of failure, a secondary Hosts can be promoted to a primary Node by any primary Node.

In the normal Szenario, if one primary Host goes down, the other primary Node realize that over the heartbeat and promote a secondary Hosts to a primary Host.

But what happend, if all primary Hosts goes down at the same time? Now the Cluster has a problem, that no ESX-Hosts has Information about the whole Cluster and can´t promote any Hosts to a primary state. Did you think that this szenario are infrequent? We have seen this really often.

One Example is, when you build a Cluster over two locations. The only secured way for that szenario is, to build up a Cluster with max. of 8 ESX-Hosts, so you can sure, that at least one Host per location is a primary host.

But what can you do if you want to build a cluster with more than 8 Hosts? Are you sure that you have primary Nodes on all Locations? Where can you seen this? The vCenter Client dosn´t show you this Information.

In many Project we are asked which ESX-Server in a VMware Cluster are active (primary) and which one was passive (secondary). So we build a little Tool that display the primary Nodes in a VMware Cluster what we named MCS-ViewHA. With that, you can see which ESX-Node is a primary Node.




You can Download this free Tool from our Website.

http://www.mightycare.de/downloads/mcs_viewha

Monday, December 20, 2010

vCloud Director - installation part I

Based on the actual evolutions in the VMware product environment, I decide to installl the new vCloud Director in my home-lab. There are two things which i had to get before starting:

  • Oracle DB 11g for Windows
  • RHEL 5 64bit
After several register processes and hours of downloads I decide to start with the oracle server based on windows. In the future I think i will run it under RHEL also.

Starting with the Oracle DB server there are several things which need my attention, because after the installation the Enterprise Manager (http://localhost:1521/em) was available to me but the listener only reacts on the 127.0.0.1 address. In my opinion there was no way to change it while installing.

First thing i try was diabling the Windows firewall :-) , but without success. Next thing i try was a special command:

tnsping oracle.cjo.local

which reports an error while connecting. After that i try to get an status of the actual configuration with:

lsnrctl status

which shows several TNS-xxxx errors (for example: TNS-03505: Failed to resolve name). After reading some support statements i stopped all services in the server manager.







Then i go to the dbhome_1 directory and edit the tnsnames.ora and listener.ora (configuration files for the service) and change all localhosts to the right DNS name.

tnsnames.ora














listener.ora



After that i start all stopped services (OracleDBConsoleoracle, OracleMTSRecoveryService, OracleOraDb11g_home1TNSListener and OracleServiceORACLE) and check the status via:

lsnrctl status

which shows the right connection name.














Also i try another

tnsping oracle.cjo.local

which shows the following:


Next part now is to install the vCloud Director and try if the connection works. An update will follow...

Sunday, December 19, 2010

vCO - get ESX SSL thumbprint

To add a new ESX host to virtual center by vCO you need the SSL thumbprint of this host.
The following scriptable task shows a simple solution. To keep the example as simple as possible, most parameters are defined local. For production use declare these parameters (port, userName, ...) as input parameters.


For example, you can modify the VMware workflow 'add host to cluster' as shown below, to add a host with self signed or unknown CA to your cluster:



Feel free to leave comments.

Regards, Andreas