Category Archives: PowerGUI / VESI

Exploring the PowerCLI cmdlets – Get-NicTeamingPolicy Part 2

In my previous post “Exploring the PowerCLI cmdlets – Get-NicTeamingpolicy” I showed you how to output some great looking information for vSwitches which detailed all the information we may ever need to know, so whilst on the same cmdlet lets look at PortGroups, these have the same type of settings and the same cmdlet also works against a PortGroup object, as before we can display this information with a single one liner… Continue reading

Exploring the PowerCLI cmdlets – Get-NicTeamingPolicy

One of the new cmdlets from PowerCLU 4.0 Update 1 is Get-NicTeamingPolicy, so what does this do ?

It retrieves the Nic teaming policies of the specified virtual switches and virtual port groups, obviously !

So how can we use this cmdlet ?

Well, as it details the teaming policies of either a virtual switch or a portgroup then we will need to give it a…virtual switch or a portgroup, so how do we do this, lets try a one-liner:

Get-VMHost | Get-VirtualSwitch | Get-NicTeamingPolicy

This will do as it says on the tin, get a list of the hosts, for each of these it will get a list of virtual switches attached to the hosts and then list their nic teaming policies, the output is as so:

Continue reading

Jump Start Virtualization EcoShell

I have talked about the Virtualisation EcoShell (VESI) enough on this blog for people to know what its all about but how do you get started ?

One option is to join the FREE live meeting tomorrow (1/12/2009) at 17:00 GMT (11:00 am Central Standard Time)  presented by Scott Herold by registering or joining here.  Anyone who has seen Scott present before will know how great the presentation will be and you are bound to pick up some expert tips from the man himself. Continue reading

vSphere 4.0 Quick Start Guide is here

image

Its here, I’m an author, watch out JK Rowling !

Its been a while coming but the vSphere 4.0 Quick Start Guide is now available to buy on Amazon (US), we are working at getting it on the UK site but I’m just pleased to see it out there and available to buy.

This book is a co-authored publication bought to you from some of the leading names in VMware bloggers and admins, and they also asked me to contribute too 🙂

The book is designed for you to carry around with you, its not a heavy duty full novel but more of a VMware admins help book which can be referred to when you are in the damp dark datacenter at 4am in the morning with no internet connection !

Having said that there is definitely something in there for everyone, whether you are new to VMware or a seasoned Pro.

Throughout the book you will find great tips, real life situations and numerous PowerCLI examples.

If you haven’t yet heard of this book then please read these wonderful comments already left on the Amazon post.

If you have read it then please, leave your comments along with the others.

Buy your copy now ! in fact buy two !

VESI & PowerGUI PowerPack V2

V2 Nodes

As the official download count for V1 of my PowerPack has now hit over 1000 downaloads (I cant thank you all enough), I have now released V2 of my PowerPack for VESI and PowerGUI, this is more like the version I wanted to release first time around.

In the first PowerPack, I took a fair few snippets of code I had written on my blog and added these to the PowerPack to get people interested, now in Version 2 I have added even more content, more nodes, more actions and a fair bit of user requested features.

As you can see from the image on the left, there are a fair few nodes (so many I had to cut and paste the image together as they wouldn’t all fit in one screen capture).

There are also some new actions (see screenshots below).

If you have ESXi hosts you should find this useful, now you will be able to download the current firmware state to your windows machine with the click of a button, deploy it back and also reset them back to default configuration (seen below).

I was also requested to add the vCheck script into this version so you could run ad-hoc reports on customer sites, you will find this under the General tab.

You will also find many more VM nodes, most of which where inspired by Armin van Lieshout who was a great help during the testing phase and even sent through his own code for me to include.  Thanks Armin.

Thanks to the other beta testers who sent me some great feedback (most of which is in here), I couldn’t have done it without you guys !  I also want to thank Kirk Munro who helped me out with a few coding or should I say User errors in V1 of this PowerPack 😉

Continue reading

PowerCLI – Where do I start ?!

Recently I have been asked a few times where to start when trying to learn PowerCLI and Powershell, there are many learning resources available for PowerShell, all you need to do is Google “Powershell basics” and off you go but what about PowerCLI ?

Well first on the list would have to be the book ‘Managing VMware Infrastructure with Windows PowerShell’ by Hal Rottenberg.  Its a great book with loads of examples and Hal has a great way of writing where it keeps you amused whilst still learning.

Secondly there is my blog post which takes it right back to basics and tells you how to install PowerCLI.

Thirdly, there are a number of great PDF files which you can read to help you along your journey, starting from the basics up to the more interesting ones including cmdlet references and in depth features:

Continue reading

Virtu-Al VESI & PowerGUI PowerPack

I have been teasing people on twitter for a week or so now and have just uploaded my PowerPack to the PowerGUI site, you can download it here

image

As you can see from the screen shot on the left, this is a first attempt at providing most of my scripts in one PowerPack and adding to the already great management that VESI and PowerGUI give you.

So what do I need to do to install this ?

  1. Install PowerShell V1 or V2 (if you do not already have these installed) V2 Recommended
  2. Install PowerCLI
  3. Install VESI or PowerGUI (VESI Recommended for Virtualization management)
  4. If you have PowerGUI installed you will need to add the  ‘VMware Infrastructure Management’ PowerPack which can be downloaded from here.
  5. Click the download button at the top of this post to download my latest PowerPack, and rate the PowerPack while you are there if you like !
  6. Import the PowerPack into VESI or PowerGUI

From then on you will see both the VMware set of icons and the Virtu-Al icons, you will need to connect to a VI server or number of hosts using the ‘Managed Hosts’ section of the VMware PowerPack, once connected all icons (nodes) become active in the Virtu-Al.net powerpack, simply click on one to see the results.

If you want anything added or find something that doesn’t quite work, firstly make sure you have the latest version of the PowerPack by following this post, if it still doesn’t work please let me know, I am aware of a few bugs and have yet to put any actions in there but please, use it and give me your feedback !

I hope you find this useful !

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

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