Another post coming from our Dutch VMUG Event 2011 presentation. On position number 10, we find the vMotion Enhancements that were introduced with vSphere 5.
A single vMotion can now scale over multiple NICs. This feature can use a regular vSwitch or distributed vSwitch.On YouTube there are 2 videos, uploaded by VMwareKB, that show how to configure such a vMotion enabled multi-NIC vSwitch, regular and distributed.
Very useful videos, but as you can imagine, I wanted to automate this. No GUI clicking for me
Read more…
Categories: 2011, Dutch, multi-nic, PowerShell, vMotion, VMUG, vSphere Tags: multi-nic, PowerCLI, PowerShell, vMotion, vSphere
Buried in the massive amount of new features introduced with vSphere 5 there are several new API methods on the HostStorageSystem managed object.
Two of these API methods will allow you to automate the new Attach/Detach LUN feature from the vSphere Client. It concerns the AttachScsiLun and DetachScsiLun methods. Until this new feature is available natively in PowerCLI, you can use the following functions.
Read more…
In the vCenter Client, since vSphere 4, you can find a Storage Views tab on several of the VI containers. The data in these Storage Views is collected and provided by the vCenter Storage Monitoring plug-in.
Have a look at David Davis‘s post, called Using VMware vSphere Storage Views, for more information on what you can do with the Storage Views.
Some time ago I got a question from Andrew how the Multipathing Status presented in the Storage Views could be detected and reported upon by a PowerCLI script. What looked rather simple at first, turned out to be a bit more difficult than I anticipated.
Read more…
When you are dealing with big(ger) memory or storage values, it’s often not easy to present these in a human-readable format. I don’t know about you, but I find a number like 766509056 less readable, and meaningful, then 731 MB in a report.

You can introduce some nested If-Then-Else constructs in your scripts to do the conversion, but why repeat these in all your scripts ? That’s why I decided to write me a handy function, that would solve this problem once and for all.
Update November 14th 2011: handled passing a 0 to the Log function.
Read more…
This afternoon news of a new (and interesting) blog post from Julian Wood hit the Twitter-verse.
He took part from the logic of my Raiders of the Lost VMX script and used the relatively new VMFilePath parameter of the New-VM cmdlet, to shorten my script considerable. Well done, great job !
But I was intrigued by a remark in Julian’s post. He was obviously not too fond of using MoRefs in a script. But in Julian’s final script I still saw a Get-View cmdlet and the use of the HostDatastoreBrowser. Remembering a remark from one of my co-authors on the PowerCLI book, that the Get-View cmdlet would disappear, once the PowerCLI snapin would be sufficiently evolved, I decided to tackle Julian’s script and give it another simplification treatment and make it more PowerCLI
An interesting question arrived in my mailbox this morning. Robert wanted to know what was the most efficient way to create a new property, called lunID, for the objects returned by the Get-ScsiLun cmdlet.
The new property had to show the lunID, as it is returned in the LUN column in the vSphere client.

Read more…
With the vSphere 5 licensing buzz from the past days and the incredibel number of hits on my Query vRAM post, I considered that a script to help you discover your memory overallocations might be useful.
The script uses the metric mem.usage.average to find out what amount of it’s allocated memory a guest is actually using. The script produces a report that will help you to determine which guests would be good candidates to lower their memory allocation.
An interesting question came up in the PowerCLI Community. Can one extract the datastore statistics, that are used for the space utilization graphs in the vSphere Client, with PowerCLI ? The graph in question, which you find in the Datastores Inventory view under the Performance tab, looks something like this.

Read more…
It’s that time of the year again, you can now vote which sessions you would like to see at VMworld 2011.

Read more…
This post was triggered by a question in the PowerCLI Community around the ConfirmImpact attribute for PowerCLI cmdlets.
In PowerShell you can access the metadata of each cmdlet and extract quite a bit of useful information.
So I decided to have a look how I could use this cmdlet metadata to produce an alternative cmdlet reference for the PowerCLI cmdlets.
The list my script produces is NOT intended as a replacement for the excellent PowerCLI Reference. It is intended for those who already know what a PowerCLI cmdlet does but want to access parameter information quickly. It condences a lot of information in a spreadsheet.