Tag Archives: PowerGUI / VESI

VESI & PowerGUI PowerPack Management

I have spoken about VESI and PowerGUI a few times on the blog now so you should know all about these FREE little gems, one thing that I like about them is the way you can create your own PowerPack.

A PowerPack is basically a collection of scripts and actions and cmdlets all bundled together in shiny wrapping paper and passed back into the GUI for you to harness the power of Powershell without even realising it.

As you can see from the PowerGUI site there is a PowerPack for almost everything you would like to manage and if there isn’t one there then you could either put one together yourself or leave a message on their site planting the idea in their brains. Continue reading VESI & PowerGUI PowerPack Management

PowerCLI: Listing Cluster Primary HA Nodes

Following my recent post on Slot Sizes and pointing to Duncan’s great HA Deepdive article I came across a great script today on Hypervisor.fr, he has been creating some great PowerCLI scripts recently and also sent me some fantastic additions to my Daily Report, all of which will be added in the next version which is due out any day now.

Just to set the background I will steel a little of Duncan’s post but please make sure you read his full article and then re-read it until it is ingrained in your brain, this guy knows his stuff.  Duncan’s post reads…

A VMware HA Cluster consists of nodes, primary and secondary nodes. Primary nodes hold cluster settings and all “node states” which are synchronized between primaries. Node states hold for instance resource usage information. In case that vCenter is not available the primary nodes will have a rough estimate of the resource occupation and can take this into account when a fail-over needs to occur. Secondary nodes send their state info to the primary nodes.

Nodes send a heartbeat to each other, which is the mechanism to detect possible outages. Primary nodes send heartbeats to primary nodes only. Secondary nodes send their heartbeats to primary nodes only. Nodes send out these heartbeats every second by default. However this is a changeable value: das.failuredetectioninterval. (Advanced Settings on your HA-Cluster)

The first 5 hosts that join the VMware HA cluster are automatically selected as primary nodes.  All the others are automatically selected as secondary nodes. When you do a reconfigure for HA the primary nodes and secondary nodes are selected again, this is at random. The vCenter client does not show which host is a primary and which is not.

A question was raised on the PowerCLI communities before the days of vSphere asking if you could get the information with regards to which of the hosts were primary for each cluster, a suggestion was made by The PowerCLI master himself LucD to grab the information via a putty session and then present it back onto PowerCLI to use the data.

Now, with vSphere and the updated SDK it would seam that this information is available, so I have modified the script found on Hypervisor.fr to list each cluster and the primary nodes within these cluster as seen in the example below:

image

This can be achieved with a simple (well kinda) script which will check that the cluster has HA enabled and that the vCenter server is Version 4 (vSphere) and then present the results for each cluster:

If ((Get-View ServiceInstance).Content.About.Version-ge 4.0.0){
Get-View -ViewType ClusterComputeResource |Where {$_.Configuration.DasConfig.Enabled-eq $true} | Select Name,  @{N=PrimaryHosts;E={[string]::join( & ,(($_.RetrieveDasAdvancedRuntimeInfo()).DasHostInfo.PrimaryHosts))}}
}
Else{
Write Sorry this is only available to a V4 vCenter Host
}

Or if the perl toolkit is your cuppa tea then check out this version from William Lam (Perl Ninja)

I have also added this to a VESI PowerPack which I am in the middle of creating and will publish soon, as you can see from the below:

image

The VESI 1.2 – Get it now

People who read my blog know how much I like the Virtualisation EcoShell, I love the way it adds the power of PowerCLI back into the GUI to enable you to create customised GUI’s all of your own enhancing the true power of PowerShell and allowing people who do not know how to code in PowerCLI (yet) the chance to harness the power.

Version 1.2  of the VESI has now been released and it has some great new features:

Continue reading The VESI 1.2 – Get it now