Arnim van Lieshout Rotating Header Image

Unattended upgrade of HP mgmt agents – Part 2

It’s been a year since I blogged about my script to perform an unattended upgrade of the HP management agents 8.1.1 on ESX 3.5 U3. After HP upgraded their management agents to version 8.2.0 some things changed. The installation procedure is now a 2 step process. First there’s a PreInstall_Setup.sh script which modifies some startup scripts on your host and will perform a reboot if an IPMI device is found. After the reboot you have to install the management agents as usual. 

The script below is for installing the HP management agents version 8.3.0 for ESX 3.5 U4 and ESX3.5 U5. It probably can also be used for version 8.2.0., but I haven’t tested this. If you require an older version of the HP management agents, use my previous script. You might think I’m getting a bit old school still running ESX3.5 but hold on. I also have a version 3.0 of this script for installing HP management agents version 8.3.1 on ESX4.0 and ESX4.0U1, but it still needs a little work. I’ll publish this very soon, so keep an eye on this site for the next few days.

The extra reboot needed before the actual installation makes an unattended installation a bit more challenging. But don’t be afraid we won’t let this hold us back from automating it. I’ll show you how I modified my unattend script to get the job done again. 

First I inserted a little piece of code to warn you about the necessary host reboot and let you choose if you want to continue. 

# +-----------------------------------------------------+
# | Warn about the reboot                               |
# +-----------------------------------------------------+

SETCOLOR_YELLOW="echo -en \\033[1;33m"
SETCOLOR_RED="echo -en \\033[0;31m"
SETCOLOR_WHITE="echo -en \\033[0;39m"

$SETCOLOR_YELLOW
echo "This update requires a reboot! "
echo -n "Do you wish to continue (y/n) "
	read answer
	if [ "$answer" != "y" ]; then
		echo "Action cancelled by user"
		$SETCOLOR_WHITE
		exit
	fi
$SETCOLOR_WHITE

Next thing to check is if the host is in maintenance mode. Just to make sure the host isn’t rebooted with running virtual machines on it.

# +-----------------------------------------------------+
# | Check if host is in Maintenance mode                |
# +-----------------------------------------------------+

if [ `vimsh -n -e hostsvc/runtimeinfo | grep -i "inMaintenanceMode = false" | wc -l` == 1 ]; then
	$SETCOLOR_RED
	echo -e "\nHost must be in Maintenance Mode, exiting...\n\n"
	$SETCOLOR_WHITE
	exit
fi

Everything looks ok, so let’s download the required files and uninstall the old management agents. There’s nothing changed in this code from the previous version.

# +-----------------------------------------------------+
# | Download files                                      |
# +-----------------------------------------------------+

/usr/sbin/esxcfg-firewall --allowOutgoing

lwp-download http://repository.mydomain.com/hpagents/$HPPACKAGE /tmp/$HPPACKAGE
lwp-download http://repository.mydomain.com/hpagents/$HBAPACKAGE /tmp/$HBAPACKAGE
lwp-download http://repository.mydomain.com/hpagents/$HPCONFIG /tmp/$HPCONFIG
lwp-download http://repository.mydomain.com/hpagents/$HPSMHCONFIG /tmp/$HPSMHCONFIG

/usr/sbin/esxcfg-firewall --blockOutgoing

# +-----------------------------------------------------+
# | Unpack archives                                     |
# +-----------------------------------------------------+

cd /tmp
tar -zxvf $HPPACKAGE
mkdir /tmp/hbaapi
tar -C /tmp/hbaapi -zxvf $HBAPACKAGE
cp /tmp/$HPSMHCONFIG /tmp/hpmgmt/$HPVERSION/smhpd.xml

# +-----------------------------------------------------+
# | Uninstall old packages                              |
# +-----------------------------------------------------+

cd /tmp/hpmgmt/$HPVERSION
echo -e 'y\ny' | ./installvm${HPVERSION}.sh --uninstall
cd /tmp/hbaapi
./Remove.sh

We can only install the new agents after the PreInstall_Setup.sh script has run and the system is rebooted. Therefore we have to put the actual installation code of the new management agents inside the /etc/rc.d/rc.local script, which is automatically run every time the host starts up. But before we make any changes to this file we create a backup, which we will restore after the installation is done.

# +-----------------------------------------------------+
# | Modify rc.local to start installxxx.sh script       |
# +-----------------------------------------------------+

# Backup original rc.local file
cp /etc/rc.d/rc.local /etc/rc.d/rc.local.bak

# Modify rc.local to start hpagent setup after the reboot
cat >> /etc/rc.d/rc.local < /root/hpmgmt-install.log 2>&1

# Restore original rc.local file
mv -f /etc/rc.d/rc.local.bak /etc/rc.d/rc.local
EOF

The only thing left is installing the HBAAPI libraries and run the PreInstall_Setup.sh script. The HBAAPI libraries can be downloaded from the following sites: 

Emulex
http://www.emulex.com/downloads/emulex/cnas-and-hbas/drivers/vmware.html

QLogic
http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/SearchByOs.aspx?ProductCategory=39&OsCategory=6&Os=167&OsCategoryName=VMware&ProductCategoryName=Fibre Channel Adapters&OSName=VMware ESX / ESXi 

# +-----------------------------------------------------+
# | Install HBAAPI libraries and start PreInstall script|       |
# +-----------------------------------------------------+

cd /tmp/hbaapi
./Install.sh

cd /tmp/hpmgmt/$HPVERSION
echo -e 'y' | ./PreInstall_Setup.sh

#Force reboot if PreInstall script detects no IPMI device on this system
shutdown -r now "System shutdown as preinstall operation for agents installation"

As far as I could see, nothing changed in the hpmgmt.conf and smhpd.xml files, so you can reuse them. If you’re new to this read my previous post on how to acquire these files. 

And finally the complete script:

#!/bin/sh
# +-----------------------------------------------------+
# | HP Insight Manager Agents unattend install Script   |
# |                                                     |
# | Version : 2.0                                       |
# | Author  : Arnim van Lieshout                        |
# +-----------------------------------------------------+

# version 2.0
# ==========
# This script only supports HP management agents 8.3.0
#
# If you require version 8.1.1 download version 1.0 of this script from:
# http://www.van-lieshout.com/2009/03/unattended-upgrade-of-hp-management-agents/

# +-----------------------------------------------------+
# | Setting some variables                              |
# +-----------------------------------------------------+

HPPACKAGE=hpmgmt-8.3.0-vmware3x.tgz
HBAPACKAGE=qlapi_vmw-v4.00build23.tgz
HPVERSION=830
HPCONFIG=hpmgmt${HPVERSION}.conf
HPSMHCONFIG=smhpd${HPVERSION}.xml

# +-----------------------------------------------------+
# | Warn about the reboot                               |
# +-----------------------------------------------------+

SETCOLOR_YELLOW="echo -en \\033[1;33m"
SETCOLOR_RED="echo -en \\033[0;31m"
SETCOLOR_WHITE="echo -en \\033[0;39m"

$SETCOLOR_YELLOW
echo "This update requires a reboot! "
echo -n "Do you wish to continue (y/n) "
	read answer
	if [ "$answer" != "y" ]; then
		echo "Action cancelled by user"
		$SETCOLOR_WHITE
		exit
	fi
$SETCOLOR_WHITE

# +-----------------------------------------------------+
# | Check if host is in Maintenance mode                |
# +-----------------------------------------------------+

if [ `vimsh -n -e hostsvc/runtimeinfo | grep -i "inMaintenanceMode = false" | wc -l` == 1 ]; then
	$SETCOLOR_RED
	echo -e "\nHost must be in Maintenance Mode, exiting...\n\n"
	$SETCOLOR_WHITE
	exit
fi

# +-----------------------------------------------------+
# | Download files                                      |
# +-----------------------------------------------------+

/usr/sbin/esxcfg-firewall --allowOutgoing

lwp-download http://repository.mydomain.com/hpagents/$HPPACKAGE /tmp/$HPPACKAGE
lwp-download http://repository.mydomain.com/hpagents/$HBAPACKAGE /tmp/$HBAPACKAGE
lwp-download http://repository.mydomain.com/hpagents/$HPCONFIG /tmp/$HPCONFIG
lwp-download http://repository.mydomain.com/hpagents/$HPSMHCONFIG /tmp/$HPSMHCONFIG

/usr/sbin/esxcfg-firewall --blockOutgoing

# +-----------------------------------------------------+
# | Unpack archives                                     |
# +-----------------------------------------------------+

cd /tmp
tar -zxvf $HPPACKAGE
mkdir /tmp/hbaapi
tar -C /tmp/hbaapi -zxvf $HBAPACKAGE
cp /tmp/$HPSMHCONFIG /tmp/hpmgmt/$HPVERSION/smhpd.xml

# +-----------------------------------------------------+
# | Uninstall old packages                              |
# +-----------------------------------------------------+

cd /tmp/hpmgmt/$HPVERSION
echo -e 'y\ny' | ./installvm${HPVERSION}.sh --uninstall
cd /tmp/hbaapi
./Remove.sh

# +-----------------------------------------------------+
# | Modify rc.local to start installxxx.sh script       |
# +-----------------------------------------------------+

# Backup original rc.local file
cp /etc/rc.d/rc.local /etc/rc.d/rc.local.bak

# Modify rc.local to start hpagent setup after the reboot
cat >> /etc/rc.d/rc.local < /root/hpmgmt-install.log 2>&1

# Restore original rc.local file
mv -f /etc/rc.d/rc.local.bak /etc/rc.d/rc.local
EOF

# +-----------------------------------------------------+
# | Install HBAAPI libraries and start PreInstall script|       |
# +-----------------------------------------------------+

cd /tmp/hbaapi
./Install.sh

cd /tmp/hpmgmt/$HPVERSION
echo -e 'y' | ./PreInstall_Setup.sh

#Force reboot if PreInstall script detects no IPMI device on this system
shutdown -r now "System shutdown as preinstall operation for agents installation"

You can also download a copy of the script here.

Always test this in a test environment first before using it in production. I don’t take any responsibilities for things that might happen to your ESX servers due to using this script.

PowerShell Plus™ 3.1 out now

Idera released PowerShell Plus™ 3.1
PowerShell Plus is a powerful interactive development environment for Windows PowerShell designed to help administrators and developers quickly learn and master the PowerShell scripting language while dramatically increasing the productivity of both novice and expert users.

PowerShell Plus™ v3.1 includes these new features:

  • Community Script Library Integration – Increases script developer productivity by providing instant access to thousands of scripts from community script libraries such as PowerShell.com, Microsoft’s TechNet Script Center and Poshcode.org. Powerful search facilities provide fast and accurate identification and download of scripts directly into the PowerShell Plus personal script library.
  • Enhanced Personal Script Library content – Provides a personal ‘QuickClick’ script library containing over 170 customizable scripts, including scripts for managing desktops, networks, hardware, Active Directory, Microsoft Exchange, IIS, SharePoint, SQL Server, VMware and MySQL.
  • Script Sharing – Provides the ability for PowerShell Plus™ users to quickly and easily share scripts with their colleagues and also post them to the community script library on PowerShell.com.
  • Enhanced PowerShell Learning Center – Includes a wealth of knowledge and resources to make learning PowerShell easier than ever, including: Dr. Tobias Weltner’s book, Mastering Powershell.
  • Instant Access to Expert PowerShell Tips and Tricks from PowerShell.com – Interactive help for PowerShell commands, and much more.
  • PowerShell v2.0 support – Supports both Powershell v1.0 and the newly released PowerShell v2.0, including support for Modules in both 32-bit and 64-bit environments.

A while back I was one of the lucky winners to win a free PowerShell Plus™ license and fell in love with this great product right from the start. Let me explain you why.

Interactive PowerShell Console

The PowerShell console provides Intellisense-style code completion which makes finding the right cmdlet very easy. It also shows your command history in the console, lets you inspect variables and even allows you to view the content of the current pipeline. It provides a QuickClick script library with cool one-liners and sample scripts for ActiveDirectory, Exchange, IIS7, MySQL, SharePoint, SQL Server and VMware. You can add your own scripts which makes organizing and accessing your personal scripts quick and easy.

Advanced Script Editor

The advanced script editor provides an integrated debugger with Visual Studio-like step, inspect and correct during execution functions. It also supports code folding to allow hiding sections of your script, which helps you keeping the overview of your code.

Comprehensive Learning Center

Last but not least it includes a comprehensive learning center where you can easily find all the documentation you need. It now even includes Tobias Weltner’s book, Mastering Powershell.

As an extra bonus Idera has extended the trial period from 14-days to 30-days. So what are you waiting for, download your trial now and explore all the beautiful features PowerShell Plus™ has to offer.

PowerCLI: Match VM and Windows harddisks – Part 2

This is a follow up on a post I did a couple of weeks ago to create a mapping table between Windows- and VMware hard disks. In another previous post PowerCLI: Get WMI info from isolated guests, I showed you how to get WMI info from a guest without using the guest’s network. I used this technique to enhance my mapping table script.

You need to login to both the ESX host and the Windows guest seperately, so there’s no more need for the user running the script to have administrator permissions on the guest. Multiple domains aren’t an issue anymore and neither are firewalls.

Remember: this only works when VMware Tools are installed

# This script requires PowerCLI 4.0 U1
#
# Create Disk Mapping Table v2.0
# Created by Arnim van Lieshout
# Http://www.van-lieshout.com

# Initialize variables
# $VCServerList is a comma-separated list of vCenter servers
$VCServerList = "vcenter01","vcenter02"
$DiskInfo= @()

# Set Default Server Mode to Multiple
Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Confirm:$false | Out-Null
# Connect to vCenter Server(s)
foreach ($VCServer in $VCServerList) {Connect-VIServer -Server "$VCServer" | Out-Null}

$Vm = Read-Host "Enter VMName to create disk mapping for"
if (($VmView = Get-View -ViewType VirtualMachine -Filter @{"Name" = $Vm})) {
    $ESXHost = Get-VMHost -id $VmView.Summary.Runtime.Host
    # Get credentials
    $HostCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter ESX host credentials for $ESXHost", "root", "")
    $GuestCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter Guest credentials for $VM", "", "")

    #Get WMI info
    $Error.Clear()
    $Out = Invoke-VMScript "wmic path win32_diskdrive get Index, SCSIPort, SCSITargetId /format:csv" -vm $VM -HostCredential $HostCred -GuestCredential $GuestCred -scripttype "bat"
    if (!$error) {
        $FileName = [System.IO.Path]::GetTempFileName()
        $Out.Substring(2) > $FileName
        $WinDisks = Import-Csv $FileName
        Remove-Item $FileName

        foreach ($VirtualSCSIController in ($VMView.Config.Hardware.Device | where {$_.DeviceInfo.Label -match "SCSI Controller"})) {
            foreach ($VirtualDiskDevice in ($VMView.Config.Hardware.Device | where {$_.ControllerKey -eq $VirtualSCSIController.Key})) {
                $VirtualDisk = "" | Select SCSIController, DiskName, SCSI_Id, DiskFile,  DiskSize, WindowsDisk
                $VirtualDisk.SCSIController = $VirtualSCSIController.DeviceInfo.Label
                $VirtualDisk.DiskName = $VirtualDiskDevice.DeviceInfo.Label
                $VirtualDisk.SCSI_Id = "$($VirtualSCSIController.BusNumber) : $($VirtualDiskDevice.UnitNumber)"
                $VirtualDisk.DiskFile = $VirtualDiskDevice.Backing.FileName
                $VirtualDisk.DiskSize = $VirtualDiskDevice.CapacityInKB * 1KB / 1GB
                # Match disks based on SCSI ID
                $DiskMatch = $WinDisks | ?{($_.SCSIPort  1) -eq $VirtualSCSIController.BusNumber -and $_.SCSITargetID -eq $VirtualDiskDevice.UnitNumber}
                if ($DiskMatch){
                    $VirtualDisk.WindowsDisk = "Disk $($DiskMatch.Index)"
                }
                else {Write-Host "No matching Windows disk found for SCSI id $($VirtualDisk.SCSI_Id)"}
                $DiskInfo += $VirtualDisk
            }
        }
        $DiskInfo | Out-GridView
    }
    else {Write-Host "Error Retrieving WMI info from guest"}
}
else {Write-Host "VM $Vm Not Found"}

Disconnect-VIServer * -Confirm:$false

Since I like using the VESI, I integrated the script into the EcoShell with just a few minor adjustments. You can also use PowerGUI instead.
Just create a new Script node and paste the following code:

if ($global:defaultviservers) {
    $DiskInfo= @()
    $Vm = Read-Host "Enter VMName to create disk mapping for"
    if (($VmView = Get-View -ViewType VirtualMachine -Filter @{"Name" = $Vm})) {
        $ESXHost = Get-VMHost -id $VmView.Summary.Runtime.Host
        $HostCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter ESX host credentials for $ESXHost", "root", "")
        $GuestCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter Guest credentials for $VM", "", "")
        $Out = Invoke-VMScript "wmic path win32_diskdrive get Index, SCSIPort, SCSITargetId /format:csv" -vm $VM -HostCredential $HostCred -GuestCredential $GuestCred -scripttype "bat"
        $FileName = [System.IO.Path]::GetTempFileName()
        $Out.Substring(2) > $FileName
        $WinDisks = Import-Csv $FileName
        Remove-Item $FileName
        foreach ($VirtualSCSIController in ($VMView.Config.Hardware.Device | where {$_.DeviceInfo.Label -match "SCSI Controller"})) {
            foreach ($VirtualDiskDevice in ($VMView.Config.Hardware.Device | where {$_.ControllerKey -eq $VirtualSCSIController.Key})) {
                $VirtualDisk = "" | Select SCSIController, DiskName, SCSI_Id, DiskFile,  DiskSize, WindowsDisk
                $VirtualDisk.SCSIController = $VirtualSCSIController.DeviceInfo.Label
                $VirtualDisk.DiskName = $VirtualDiskDevice.DeviceInfo.Label
                $VirtualDisk.SCSI_Id = "$($VirtualSCSIController.BusNumber) : $($VirtualDiskDevice.UnitNumber)"
                $VirtualDisk.DiskFile = $VirtualDiskDevice.Backing.FileName
                $VirtualDisk.DiskSize = $VirtualDiskDevice.CapacityInKB * 1KB / 1GB
                $DiskMatch = $WinDisks | ?{($_.SCSIPort  1) -eq $VirtualSCSIController.BusNumber -and $_.SCSITargetID -eq $VirtualDiskDevice.UnitNumber}
                if ($DiskMatch){
                    $VirtualDisk.WindowsDisk = "Disk $($DiskMatch.Index)"
                }
                else {Write-Host "No matching Windows disk found for SCSI id $($VirtualDisk.SCSI_Id)"}
                $DiskInfo += $VirtualDisk
            }
        }
        $DiskInfo
    }
    else {[System.Windows.Forms.MessageBox]::Show("VM $Vm Not Found",'Virtual Machine not Found',[System.Windows.Forms.MessageBoxButtons]::OK,[System.Windows.Forms.MessageBoxIcon]::Information) | Out-Null}
}
Else {
    [System.Windows.Forms.MessageBox]::Show('You must connect to one or more hosts before you can use this node. Please click on the ''Managed Hosts'' node of the VMware PowerPack, connect to one or more of the servers you have configured there, and then try again.','Connection not established',[System.Windows.Forms.MessageBoxButtons]::OK,[System.Windows.Forms.MessageBoxIcon]::Information) | Out-Null
}

Example output from the EcoShell:

VMware VirtualCenter 2.5 Update 6

Last friday VMware released Virtual Center 2.5 update 6.  Most interesting new feature is that it now supports customization for both Windows 7 and Windows Server 2008 R2.

From the Release notes:

What’s New

Guest Operating Systems Customization Improvements

Customization support for the following guest operating systems has been added in this release:
For more complete information about supported guests included in this release, see the VMware Compatibility Guide.

  • Windows 7 Enterprise (32-bit and 64-bit)
  • Windows 7 Ultimate (32-bit and 64-bit)
  • Windows 7 Professional (32-bit and 64-bit)
  • Windows 7 Home Premium (32-bit and 64-bit)
  • Windows Server 2008 R2 Standard Edition (64-bit)
  • Windows Server 2008 R2 Enterprise Edition (64-bit)
  • Windows Server 2008 R2 Datacenter Edition (64-bit)
  • Windows Server 2008 R2 Web Server (64-bit)

There are a lot of other updates and bugfixes that come with this release, so when you’re still running a VI3 environment, my advice is to upgrade to this latest version.

PowerShell / PowerCLI linkage

Since I started looking into PowerShell and PowerCLI, I gathered a couple of links which I found interesting and useful. I needed a way for them to be accessible anytime anywhere. Obviously the first thing that came across my mind was putting them on my blog somewhere.

I decided to dedicate a page on my blog to PowerShell/PowerCLI. I arranged all my links into clear categories so they can easily be located. Hopefully you’ll find it useful as well.

If you’re new to PowerShell/PowerCLI, I recommended some good books on my page too. All these books are worth reading and will get you building your own scripts in no time! If you’re not a programmer and think writing scripts is not for you, please reconsider and find out how easy PowerShell/PowerCLI really is. PowerShell is Microsoft’s new scripting platform and management strategy, so if you’re a Windows admin you’ll have to face it sooner or later. It’s just a matter of time.

If you think I missed some good links worth the mention on my page, please let me know by dropping me an email, ping me on twitter or just leave a comment below.

PowerCLI: Get WMI info from isolated guests

A few weeks back I posted an article on matching Windows and VMware disks. Unfortunately this would work only if you could remotely query WMI information from that VM. If you have any VM that’s isolated or behind a firewall, you are out of luck. This bothered me, so I started looking for a uniform method to retrieve WMI information. I already knew that it was possible to run PowerShell scripts inside a guest using the Invoke-VMScript cmdlet, but unfortunately I don’t have PowerShell installed in all my VMs yet. When reading through the change log of PowerCLI 4.0 Update 1, I noticed the following enhancement of the Invoke-VMScript cmdlet:

feature Enhanced Invoke-VMScript to support BAT (Windows) and BASH (Linux) scripts.

When it’s possible to run BATCH scripts inside a guest, it’s probably possible to run executables directly too. So I took this for a test and it turned out that it was working indeed. View the following piece of code to execute the “dir c:\” command inside a VM.

Connect-VIServer vmwsv392

$VM = Get-VM ( Read-Host "Enter VM name" )
$ESXHost = $VM | Get-VMHost

$HostCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter ESX host credentials for $ESXHost", "root", "")
$GuestCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter Guest credentials for $VM", "", "")

Invoke-VMScript "dir c:\" -vm $VM -HostCredential $HostCred -GuestCredential $GuestCred -ScriptType "bat"

When running this script on my environment, I receive a nice directory listing of the c: drive on that VM. Nice!

Let’s take this method one step further. As of Windows 2003 there’s a wmi command-line utility available to us called “wmic.exe”. After fiddling around with all the available options of this command, I figured out a way to get WMI info in csv format. The syntax I need to provide me that information is:

wmic path <WMI_class> get <property_list> /format:csv

For example I can retrieve a list of diskdrives and their sizes using:

wmic path win32_diskdrive get caption,deviceid,size /format:csv

The next challenge I faced, was the fact that the info is returned as a string. I needed a way to convert the string value to an array, preferably an array of objects. All I was looking for was the output of the Import-Csv cmdlet, but unfortunately this cmdlet doesn’t accept data on the pipe. The solution I found to this is rather simple, just dump the string value to an intermediate temporary file and import that file using Import-Csv.

To do this properly we first have to cut off the first 2 characters of the string (There’s an extra carriage return and line feed character at the beginning) or else we can’t import the file using Import-Csv, because it expects the header to be on the first line.

I’ve modified the previous example code a bit as shown below:

Connect-VIServer vCenterServer01

$VM = Get-VM ( Read-Host "Enter VM name" )
$ESXHost = $VM | Get-VMHost

$HostCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter ESX host credentials for $ESXHost", "root", "")
$GuestCred = $Host.UI.PromptForCredential("Please enter credentials", "Enter Guest credentials for $VM", "", "")

$Out = Invoke-VMScript "wmic path win32_diskdrive get caption,deviceid,size /format:csv" -vm $VM -HostCredential $HostCred -GuestCredential $GuestCred -ScriptType "bat"

$FileName = [System.IO.Path]::GetTempFileName()
$Out.Substring(2) > $FileName
$In = Import-Csv $FileName
Remove-Item $FileName

When you look at the output window, you clearly see the differences between the $out and $in objects.

The converted $in object can easily be used inside PowerShell scripts.
Imagine the possibilities!

Voted #29 top blogger on vSphere-land.com

In my previous post, I already wrote about the Top25 Bloggers that were announced by Eric Siebert on vSphere-land.com. Eric has now put the full voting results online. Out of the 66 blogs I ended up as 29th.

Although I didn’t make it into the Top25, I’m still very satisfied ending up on the 29th place with all that fierce competition around.

I would like to thank everyone for voting for me. I see this as a positive feedback and apparently my posts are interesting enough for people to include me in their personal top10. Thank You!

vSphere-land Top25 bloggers

The votes have been counted and the new Top25 bloggers are revealed by Eric Siebert on vSphere-land. A total amount of over 700 people from all over the world have casted their votes, which delivered Eric a nice weekend counting.

The new Top25 as published by Eric siebert on vSphere-land:

  1. Yellow Bricks – Duncan Epping – 158 #1 votes – total score of 4,191
  2. Virtual Geek – Chad Sakac – 111 #1 votes – total score of 2,938
  3. Scott Lowe’s Blog – Scott Lowe – 56 #1 votes – total score of 2,889
  4. NTPro.nl – Eric Sloof - 22 #1 votes – total score of 2062
  5. RTFM Education – Mike Laverick – 7 #1 votes – total score of 1,734
  6. Virtualization Evangelist – Jason Boche – 13 #1 votes – total score of 1,482
  7. VM/ETC – Rich Brambley – 5 #1 votes – total score of 1,138
  8. Gabe’s Virtual World – Gabrie van Zanten – 8 #1 votes – total score of 1,096
  9. Virtual Storage Guy – Vaughn Stewart – 58 #1 votes – total score of 990
  10. Virtu-Al – Alan Renouf – 18 #1 votes – total score of 831
  11. Virtualization Pro – Eric Siebert & Others – 3 #1 votes – total score of 774
  12. vCritical – Eric Gray – 15 #1 votes – total score of 738
  13. VMware Tips - Rick Scherer -  5 #1 votes – total score of 726
  14. Frank Denneman – Frank Denneman – 22 #1 votes – total score of 697
  15. The VM Guy – Dave Lawrence – 2 #1 votes – total score of 643
  16. Planet VM – Tom Howarth – 4 #1 votes – total score of 633
  17. The Slog – Simon Long – 8 #1 votes – total score of 614
  18. VMGuru.nl – Various – 18 #1 votes – total score of 569
  19. Mike D’s Virt. Blog – Mike DiPetrillo – 2 #1 votes – total score of 537
  20. Hypervizor – Hany Michael – 8 #1 votes – total score of 453
  21. Techhead – Simon Seagrave – 12 #1 votes – total score of 452
  22. vReference – Forbes Guthrie – 11 #1 votes – total score of 443
  23. Pivot Point – Scott Drummonds – 2 #1 votes – total score of 380
  24. Technodrone – Maish Saidel-Keesing – 3 #1 votes – total score of 378
  25. Chris Wolf – Chris Wolf – 0 #1 votes – total score of 375

Congratulations to all Top25 bloggers.

Critical 2009 last-minute ESX3.5 patches

I just noticed that VMware released a couple of critical ESX3.5 fixes on December 29th, shortly after releasing ESX3.5 Update5 on December 3rd. Wading through the patch details I stumbled upon some severe issues addressed by the ESX350-200912401-BG patch. I quote some issues that caught my eye: 

  • ESX hosts might get disconnected from VirtualCenter Server. This issue occurs when the ESX hosts are a part of DRS cluster and snapshots and VCB operations are performed on their virtual machines.
    Symptom
    The host agent on ESX hosts might stop responding to VI Client connections, VirtualCenter Server connection and internal or third-party SDK scripts or applications connections.
  • Enabling NTP service through VI Client or VirtualCenter might generate incorrect /etc/ntp.conf and /etc/ntp/step-tickers configuration files, and might cause the NTP service not to synchronize with the NTP Server. After applying this fix, the strings in ntp.conf and the step-tickers files in /etc/ntp/ are updated correctly.
  • Storage vMotion fails with the following error:
    Source detected that destination failed to resume.
    This occurs when performing storage vMotion of a virtual machine having at least two disks, of which one is RDM (located in the same folder as VMX), and the others are normal VMDK files in the destination VMFS volume. Both the RDM pointer and the normal VMDK file should have the same name for this issue to occur. The normal VMDK files are also deleted when storage vMotion fails.
    When the virtual machine is powered on the next time after this failure, the following error is displayed: Cannot open the disk.

Now that are issues that can get you in a really awkward position IMHO. Especially notice the yellow marked line, Ouch!. So take my advice and implement these patches a.s.a.p.

Support your favourite blog. Vote Now!

In case you didn’t noticed already, Eric Siebert  from vsphere-land has proclaimed a new top bloggers election. Blogging takes a lot of work, and most of us do this on top of our day jobs and hence don’t get paid for it. So I’m honoured to be a nominee alongside world’s greatest virtualization bloggers. Check out the nominees and if you read those various top blogs, please support your favourite ones and cast your vote. Eric even decided to expand the Top20 to the Top25, so there are 5 more rewards to be claimed.

As an added bonus there are great prices to win. Two randomly selected voters will receive a copy of the vSphere DVD training course from TrainSignal.

So what are you waiting for? VOTE!

In 2009, some of my more popular posts were:

Still here? VOTE!

Ofcourse I voted already to support my favourite ones, which was not an easy task, because there are so many great ones to choose from and to be honest, I don’t really have any favourites. I read lots of blogs on a daily basis and every blog has its own charms and characteristics. While some of them post on a daily basis and are a great source of news, others post less frequent, but deliver great quality in-depth articles. So I decided to pick the ones that really left a special impression on me over the last year, and surprisingly I find a lot of newcomers on my list.

Here’s my Top10:

  1. Arnim van Lieshout - Sorry guys, I just couldn’t resist :-D
  2. Yellow-Bricks – A blog with frequently lots of short quality articles both technical and news related, but also provides great quality in-depth articles. Sorry Duncan, no #1 vote for you :-)  As a multi-functional blogger and someone who’s always willing to reach out when someone is in trouble you get my second best vote.
  3. NTPro.nl – I guess by far the blog with the most posts over the last year. I just checked it and it were 524 posts to be exactly, which makes it an average of 1.4 a day!! Eric dude, where do you find the time. WOW! Now who can compete with Mr. Scoop on that?
  4. Virtu-Al – The mastermind behind the greatest TheVESI/PowerGui Powerpack ever. Great PowerCLI resource! Alan, this one is for you.
  5. Ken’s Virtual Reality – To be honoured for his vSwitch debate. Never saw such a huge quality multi-part post (8 parts!). Ken, you’ve got my vote!
  6. The SLOG – The man behind the vSphere practice exams and the VCP – and VCDX study notes, which helped me a lot prepping my VCP4 exam. Go Simon!
  7. Hypervizor – Good quality posts and not to forget his awesome Visio diagrams, which I consult very often. Definitely worth the vote. Hany, here you go!
  8. Frank Denneman – Provided great quality storage related posts, from which I learned a lot. Frank, Keep up the good work!
  9. Blog.scottlowe.org - Good series of quality articles, a great writer (love your books) and a huge apple fanatic. :-) Scott, sorry you finished 9th, but I think you don’t really need my vote to finish in the Top25 anyway and I just couldn’t let you out.
  10. Gabe’s Virtual World – Great blog with both quality articles and great reviews. Gabe, I hope you’re not offended, putting you on the sag wagon. On the other hand I’m certain you don’t have to rely on my vote to become top blogger again.

There are many more great blogs around that belong in the Top25, but you guys probably won’t need my vote anyway. So I hope I didn’t offend anyone, by not putting you on my list. But you see, I was only allowed to pick 10.

Hey dude! Are you still reading? VOTE! VOTE! VOTE!