Author Archives: Alan

About Alan

Alan Renouf has a role of Automation Frameworks Product Manager at VMware responsible for providing the architects and operators of the cloud infrastructure with the toolkits/frameworks and command-line interfaces they require to build a fully automated software-defined datacenter. Alan is a frequent blogger at http://blogs.vmware.com/vipowershell and has a personal blog at http://virtu-al.net. You can follow Alan on twitter as @alanrenouf.

Keeping up on blogs with PowerShell

Recently the top virtualization blogs were announced and updated on Eric Sieberts page here: http://vlp.vsphere-land.com This is a great place to check out for all sorts of virtualization links.

The great thing about this site is that it also gives us a chance to mess with the Invoke-WebRequest and Invoke-RestMethod cmdlets which allow us to read web information and manipulate it.

First lets grab the data from the site:

$Top50Bloggers = Invoke-WebRequest -Uri "http://vlp.vsphere-land.com"

Continue reading →

Cloud Physics – Making reporting on vSphere easier

Anyone who reads my blog will know how useful PowerCLI is for retrieving information from vCenter and easily creating complex reports, something that has historically been hard to achieve from the vSphere Client or web client.

imageRecently I have been looking at Cloud Physics and their offering in this area, they have a great solution which allows you to offload your data to their website and have the ability to quickly analyze it and view cards of information and potential issues you didn’t even know you had.

This blog post is not to give you an in depth view into their solution, it is purely to advise you to attend their upcoming webex where Irfan Ahmad, CTO of CloudPhysics will take you through their solution and show you some of the cool benefits of their product.

Personally I think this is a great solution and offers so many benefits for reporting and analysis of your vSphere environments.

Continue reading →

Now everyone can contribute to vCheck

After making the recent changes to vCheck I was astounded by the amount of responses I received and the help that the community has put back into this script, I am constantly receiving new plugins and code fixes for the existing plugins.

In fact I receive so many that I am unable to add them back into the script and update it to the latest version as believe it or not – I have a day job and a family to entertain at night Winking smile

So what to do?

I didn’t want all these great additions getting lost and also I didn’t want duplication of people fixing the same issues all the time so I wanted an easy way for people to contribute and still have the script easily available for everyone to download and benefit from.

Continue reading →

More Auto Deploy PowerCLI shortcuts

Following on from a post I created a while back which gave you a couple of new functions to use with Auto Deploy I wanted to add a few extra pieces of code which I use on a regular basis that may save people time when they are building out their image profiles or working with auto deploy:

Adding the VMware hosted software depots to your PowerCLI Session:

Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

Listing the 5 most recent image profiles from the online depot (Thanks to Andreas Peetz):

Get-EsxImageProfile | Sort-Object -Descending -Property @{Expression={$_.Name.Substring(0,10)}},@{Expression={$_.CreationTime.Date}},Name | Select -first 5 | FT -AutoSize

image

List the latest image profile which includes VMTools:

Continue reading →

Reporting on RPO violations from vSphere Replication

vSphere Replication was introduced with vSphere 5.0 and SRM 5.0 providing a way for customers without the ability to leverage storage array replication to utilize Site Recovery Manager (SRM) within their environments as their disaster recovery solution.

With the release of vSphere 5.1 vSphere Replication also became available as a standalone replication solution included with Essentials Plus and higher vSphere license editions. Customers now have the option of deploy vSphere Replication on its own to provide basic per-VM replication for use cases where SRM’s advanced DR orchestration capabilities were not applicable.

As adoption of vSphere Replication is growing amongst the vSphere 5.1 customer base so has the number of requests for ideas, hints and tips on what kind of reporting could be added to provide usage information for the various events that could occur amongst a collection of replicated VM’s.

Some examples would be:

  • highlight when a given VM violates its RPO
  • detect when the violated RPO state is restored
  • compute the time duration for the RPO violation
  • collate the total amount of data replicated for a given VM over a given time period

The number of customers asking for this kind of information led to this blog being written and the scripts being created in conjunction with Lee Dilworth who is a Principal Systems Engineer with VMware and SRM expert.

In this initial article we have included some scripts that will provide the Continue reading →

Cool Tech: Pebble watch

photoYesterday I finally received my Pebble which I ordered a while back when they were in their Kickstarter phase of “Should we do this?” – I for one am glad they did as it’s a great device!

For those of you who are not aware, a Pebble is a cool watch witch uses Bluetooth to connect to your iPhone or Android phone and allow you to do cool things like…

Continue reading →

Using Show-Command with PowerCLI

Recently when at the Western Pennsylvania VMUG I was asked by Rob Velarde if I had tried Show-Command with PowerCLI, I know that PowerCLI5.1 R2 now supports PowerShell V3 where the Show-Command cmdlet was introduced so thought I would take a look.

Looking at a cmdlets syntax can be complicated for people who are new to PowerShell and PowerCLI, the below is an example of the New-VM cmdlet…

SNAGHTMLa230967

So what does all this mean?

 

Continue reading →

Altering VMKernel NIC MTU with PowerCLI

I was asked if it was possible to set the VMKernel Nic MTU in PowerCLI, after looking on the internet there were several people showing how to do this but some of them were very complicated, maybe this has got easier over time as with each release of PowerCLI one of the things the PowerCLI Dev team looks at is how to make things easier for the end user?

Anyway, I thought I would show my one line solutions for listing and setting the MTU for the VMKernel Nics for multiple hosts,

Listing the MTU for each VMKernel Nic

image

Setting the MTU to 9000 for each VMKernel Nic

image

The Code

Listing the MTU for each VMKernel Nic

Get-VMHost | Get-VMHostNetworkAdapter | Where { $_.GetType().Name -eq "HostVMKernelVirtualNicImpl" } | Select VMHost, Name, MTU

Or an even easier way of doing this (but you cant expand it to change the MTU easily is:

Get-VMHost | Get-VMHostNetwork | Select -ExpandProperty VirtualNic | Select VMHost, Name, MTU

Setting the MTU to 9000 for each VMKernel Nic

Get-VMHost | Get-VMHostNetworkAdapter | Where { $_.GetType().Name -eq "HostVMKernelVirtualNicImpl" } | Foreach { $_ | Set-VMHostNetworkAdapter -Mtu 9000 -Confirm:$false }

PowerShell Summit–My recorded sessions

imageRecently I was lucky enough to attend the PowerShell Summit at Microsoft HQ in Redmond, this was an awesome event which was focused on PowerShell, it included not only people who are using PowerShell but also some of the people who wrote and designed it.

There were a bunch of great sessions, all of which can be reviewed and slides downloaded here.  I was also asked to present two sessions.  I have included the recordings for these sessions below.  Thanks to Aaron Hoover for recording these.

A couple of comments which I took away from the PowerShell Summit which really surprised me where:

  • A number of people told me they had started out with PowerCLI and then worked back into PowerShell (much like myself).
  • I was surprised that 2/3 of the room when I presented were using VMware, after all this was a Microsoft Conference!

Continue reading →

My VMworld 2013 Sessions

image_thumb1This year there are some awesome sessions at VMworld, I think people are starting to realize the benefits of automation and how these can be achieved with VMware products.  I am looking forward to attending and hopefully presenting some great sessions at VMworld 2013.

Today is the last day of voting so if you are still looking through the session list and wondered what I had put forward this year then please find a list below, if these looks interesting to you then please feel free to vote for it here!

Continue reading →