Category Archives: ESX/ESXi

Updating from ESXi 5.1 to ESXi 5.1 Update1 with PowerCLI

Recently I was asked by someone how they could do rolling automated updates from ESXi 5.1 to ESX 5.1 Update 1 in their environment using PowerCLI, obviously there are a number of ways to achieve this and William Lam did a great job of showing these in this blog including a piece of sample PowerCLI code.

I figured I would share the code I used to perform this so that others may gain from this experience…

Continue reading Updating from ESXi 5.1 to ESXi 5.1 Update1 with PowerCLI

Using PowerShell v3.0 CIM cmdlets with VMware ESXi Hosts

I noticed that in PowerShell V3.0 some CIM cmdlets were introduced which allowed PowerShell to be able to interact with CIM providers and gather information, when importing the CIM Cmdlets into my session you can see we have a number of new cmdlets to work with:


Even though I know PowerCLI 5.1 R1 (Current release on 29th Oct 2012) does not support PowerShell v3.0 I thought I would check out what I could do with these and what information I could receive using the CIM cmdlets.

As a reminder, Carter Shanklin did some work in this area a long time ago and he ended up writing a function to be able to pull CIM information from ESX hosts, this can be found here, he also includes some links to documentation on the CIM providers the VMware hosts can provide:

As you will see from the video below the new cmdlets cut out most of the hard work Carter had to do and allow us to pull CIM information from the ESXi hosts with ease.

Using PowerShell v3.0 CIM Cmdlets with VMware ESXi Hosts from Alan Renouf on Vimeo.

For your reference, here is the code I used during this demo:

import-module CimCmdlets
$ipaddress = ""
$HostUsername = "root"
$CIOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl
$Session = New-CimSession -Authentication Basic -Credential $HostUsername -ComputerName $Ipaddress -port 443 -SessionOption $CIOpt
Get-CimInstance -CimSession $Session -ClassName CIM_Fan

Migrating ESX to ESXi


Just released on the VMware Flings site is a fling which is designed to help when you make the move from ESX to ESXi, this tool will help you check hardware software and also that there are no lingering scripts or locally stored VMs etc.

A great tool to download and run against your environment to ensure you have caught everything before the move to the next version of ESXi. Continue reading Migrating ESX to ESXi

ESXi 5.0 Reference Poster

During VMworld most people I talked to were either moving to ESXi or excited by the new features of vSphere 5 and were investigating what they would need to do to upgrade and get the latest and greatest.

Those who attended the Hands on Lab were lucky enough to grab a poster bought to you by VMware Technical Marketing, this year VMware were giving out two posters, the first is the “VMware Management with PowerCLI 5.0” poster which can be downloaded here.

The second was a new poster which was designed to help you  move to ESXi 5.0, this is called the “VMware ESXi 5.0 Reference” poster, it includes handy quick references to advise people of common tasks like upgrading to the latest version…

Continue reading ESXi 5.0 Reference Poster

Backing up the ESXi System Image

ESXi is based on a system image, VMware used to call this a firmware but some people found this misleading, most people still refer to it as firmware but in this post I will refer to it as a system image.

The system image is a unified image which is the same whether booting from USB, Hard Disk, PXE or any other media. The logic in the first boot will provide auto configuration based on the kind of installation you have.

One thing to remember about ESXi is that it is memory based, so once booted the system image is entirely loaded into memory, ESXi doesn’t care if the original media disappears after boot, there is no reliance on the boot device for running after booting.

ESXi is essentially made up from a number of tardisks (VM TAR files) or archives, these tardisks are mounted into the empty root filesystem in order of enumeration, one of these is called the state tardisk or state.tgz.

The state tardisk is made up of any file in /etc which is marked as sticky, VMware uses the sticky bit to flag the files which are to be included as part of this tardisk but only if they reside under /etc, these are files like esx.conf, inetd.con, passwd….  These are the files which will be persisted after boot.

Continue reading Backing up the ESXi System Image

Automated support bundles

I received an email recently from a gentleman asking if it was possible to export the support bundles for each host on a daily basis, this can be useful for not only having an archive of your system logs to help resolve problems and work out when they started but also useful for auditing purposes.

At the moment he was doing this manually every day by using the virtual infrastructure client as can be seen below – you can imagine how long this was taking !

Exporting the logs from the vCenter Client


1.  Select the File menu and then Export, Export System Logs…


2.  Select the hosts which you want to download the system logs for and click OK

Continue reading Automated support bundles

Enabling ESX SSH via PowerCLI

Ok, I have been living under a rock a little recently, I have had so much going on that my blog and my hands on time has been suffering, sorry for that.

Whilst delivering a presentation on the new features in vSphere 4.1 – Of which there are tons (should have been 4.5 in my opinion), I came across the ability to be able to enable SSH from the DCUI (Direct Console User Interface).


Continue reading Enabling ESX SSH via PowerCLI

VMware Session 4: Advanced performance troubleshooting using esxtop

And last in this series of presentations given in London on the 8th October but by no means least is Advanced performance troubleshooting using esxtop, this was an absolutely fantastic presentation by a guy who blew my mind, the best bit was when someone asked him a question and he told the audience member where to find the information on the system and how to decode it from the hex file it was written in – A serious Guru !

Unfortunately there was an issue getting the audio of this session so it looks like we will have to stick with the slide deck but please do not be disappointed as this is 59 deep dive slides on esxtop including some of the new counters only relevant to 4.1, please check it out its great stuff.

Continue reading VMware Session 4: Advanced performance troubleshooting using esxtop

VMware Session 3: PowerCLI & Onyx

Following on in the series of presentations (listed below) given by VMware on the 8th October in London please find below the PowerCLI & Onyx slide deck and MP3 file.

Other presentations given:

VMware Session 1: Exploring VMware APIs

VMware Session 2: vSphere APIs for Performance Monitoring

This presentation focused on PowerCLI and Onyx, they skipped some of the easy stuff that normally goes at the start of a PowerCLI deck mainly because the London crowd is used to me force feeding them PowerCLI on a regular basis !

Its a great deck and a good listen on the MP3, some interesting questions and comments made throughout the deck.

This presentation was given by Vladimir Goranov and Yavor Boychev who are both part of the PowerCLI team. (See if you can spot the mistake on slide 7 Winking smile)

The MP3 file can be downloaded from here and the presentation is embedded below: Continue reading VMware Session 3: PowerCLI & Onyx

vCheck v5

That’s right, its finally here, vCheck v5 has arrived !

If you have been using previous versions of this report then its time to update, I have added lots of cool new features and checks which make this report (even if I do say so) awesome !

Some of the highlighted features of v5 are:


Each section now has comments telling you why I think it may be an issue, there are often links to blog posts and useful information for further reading, an example is below:


Obviously for the experts among you these comments can easily be removed in the script by changing the $comments = $true to $false

Automatic searching for log warnings

There is now a handy link to both the VMware KB site and Google which will automatically search for the errors found on these sites, no longer do you have a reason for not investigating those errors !


Multiple new checks

There are so many new checks that I have now created a dedicated page on my site for this script which lists some basic information, this will of course change over time as more detail is needed and I hope to shoot some video soon showing how to change some of the key areas.

To access the page click the “Featured Scripts” area above and select “vCheck (Daily Report)” or click here.



I have been bugging various people to help me with this script, whether it be for information or html help, thanks to everyone who helped me out and also to the beta testers.

To mention a few of the people specifically, thanks goes to:

Raphael Schitz – As always he has contributed some great checks for v5 and thought of areas I would never have.  Amazing job my friend.

Duncan Epping – I have bothered him more than once for clarification on the way things work, cheers mate.

Andy Grant – He did a great job helping me tidy up my HTML and add new areas.

The beta testers – you know who you are !

Sorry if I missed anyone !