ESX4i build 171294 - released

From a query on the VMTN forums, I found this one.

It seems there has been a release (very very quiet one… sshhhh..) from the original GA code version 164009.

It now seems there are two versions of ESX4i floating around now.



ESX4i Free 

164009 171294

There are no release notes for the new version, so I do not know if anything changed.

Feelers are out on Twitter - for more info. If I have any new info I will update this post.

Update 1- Found another post on the forums with the same build number.

Update 2 - Host Update Utility would not upgrade a ESX4i build 164009 vm


So I built a new VM with the new VMware-VMvisor-Installer-4.0.0-171294.x86_64.iso


Now to see what has changed.

Update 3 - a quick check of what was reported in this post have not been fixed in this release.

ESX 4.0 Running a VSphere Lab - Part 3

We continue our Saga. Part 2 ended with configuring our cluster and now we go onto shared storage and vMotion.
If you looked at the previous topology of my lab you will notice that there was no interface configured there for shared storage. That was a small oversight on my part which I corrected by adding a additional NIC, by the way, that is why I love working on virtual machines as a lab - hardware does not cost anything!!

I added a fourth NIC to each ESX host with a VMKernel port connected to 1.1.2.x - named NFS.
So after adding a new nic to each of my ESX hosts the topology looks like this

ESX4-1 ESX4-2
esx4_1_after esx4_2_after


We will now add a shared NFS volume to each server. I know that NFS is not the most popular choice for shared storage out there, but I do have to say that I am extremely pleased with the performance, and in my personal production environment, the benefits we receive with, ease of use, backup times and administration, has made NFS the de-facto choice for all our ESX deployments.

The NFS share is hosted on an Openfiler server (well I am exaggerating a bit - it is actually a desktop with a large disk). Extremely stable - as you can see from the screen shot below.


"There is more than one way to skin a cat" - so go the saying, and there is more than one way to add an NFS volume.

We can do it through the VI client.






Or we can do it from the command-line on the ESX host.

esxcfg-nas -a <volume name> -o <hostname/ip> -s <share name>

or in my case


And now we have both Servers which see the same Shared Storage.


And this is a diagram of my environment


I now fired up a Windows Server machine to test out my vMotion


Next up on the menu Fault Tolerance


Powershell Scripting Games - Day 8

Here is my solution for Event 8. Here we had to go through the hard drive and report which folder was using up all the space on the drive.

   1: #First we set the path
   2: $path = Read-Host "Which folder would you like to scan?"
   4: #assign what we want to get to a variable
   5: $myfolders = get-childitem $path -force -recurse | where-object{$_.PSIsContainer}
   7: #initiate an empty variable
   8: $mycol = @()
  10: #now we loop through all the folders 
  12: foreach($folder in $myfolders)
  13: {
  14:    Write-Host "Processing Folder $folder"
  15:    #Create and initialize a new variable with two fields Name, SizeMB
  16:    $myObj = "" | Select Name,SizeMB
  17:    #here we measure the actual size of the folder
  18:    [int]$DirSize = "{0:n2}" -f (((Get-Childitem $folder.FullName -recurse -force | ` 
  19:         measure-object -sum Length).Sum)/1mb)
  20:    #add the results to the variable
  21:    $myobj.Name = $folder.Name
  22:    $myobj.SizeMB = $DirSize
  23:    #add these to the mycol variable
  24:    $mycol += $myobj
  25: }
  27: #present the output and sort by size
  28: $mycol | sort-object SizeMB -Desc | format-table -auto

Almost at the end!!


ESX 4.0 running a vSphere Lab - Part 2

So Part 1 was about setting up the test environment. This part will be about setting up a cluster.
But before we can do anything with setting up clusters we need to set up networking.

This might be a bit complicated to understand so bear with me. Just a small recap.

The host (esx-sandbox2) has 3 vm's:
  • ESX4-1
  • ESX4-2

As this is a setup in a box first we have to go into how the host is set up. The host has 2 physical nic's, one for management and one for the vm's. There are 4 vSwitches on the esx-sandbox2:

  • vSwitch0 (vmnic0) - Service console and VM Network virtual machine Port Group (which on second thought I should have removed since it was not in use - but never mind).
  • vSwitch1 (vmnic1) - VM Port Group for VLAN 201 for external access to the vCenter and the Service console (SC) of ESX4-1 and ESX4-2.
  • vSwitch2 (no adapter) - internal vSwitch for vMotion traffic.
  • vSwitch3 (no adapter) - internal vSwitch for FT traffic.

The diagram below should give you a clear explanation of the network setup of esx-sandbox2.


Each of the ESX hosts are set up in the same way

  1. vSwitch0 (vmnic0) - Service Console and VM Port Group
  2. vSwitch1 (vmnic1) - VMkernel for vMotion (192.168.1.x)
  3. vSwitch2 (vmnic2) - VMkernel for Fault Tolerance (192.168.2.x)

Again a diagram below.



esx4-1_001 esx4-2


So now we have enough to build our cluster. In the short video below the steps are:

  1. Create TEST_CLS_01
  2. Check both boxes for HA and DRS
  3. Accept all the defaults for the cluster configuration and complete the wizard
  4. Drag both hosts into the cluster
  5. Wait for HA configuration to finish configuration.
  6. Since there is only one nic for the service console there will be an error about
    "management network redundancy", so since this is only a test environment I would like to ignore that error. Duncan Epping's HA Advanced options page gave me the das.ignoreRedundantNetWarning setting to disable this check.
  7. Reconfigure for HA on both hosts, and we have a functioning cluster.


Next up in the series - shared storage and vMotion.


ESX 4.0 running a vSphere Lab - part 1

I started out on my quest for getting a vSphere environment up for testing of the new technologies. I already had a Beta environment running - but for those of you who did not realize our Beta serial numbers expire on June 30th, 2009 - so you will have to update your labs anyway.

I have a dedicated Blade server for this purpose, and IBM HS21 E542 CPU (Quad) with 2GB of RAM and 150GB HD. Now you might say - and rightfully so - what can you do with only 2gb of RAM?? Well nothing really - that is why I have upped the RAM on the server to 8GB so I can get some testing done.

So since this is going to be a test bed for my full migration for the production system, I wanted to get it as close as possible to what my production system will be like.

So I started off by updating all the BIOS and firmware that was available for this Blade with the
IBM ToolsCenter Bootable Media Creator tool. This tool allows you to download the most up-to-date Firmware releases, and create a bootable ISO or USB key to install them. This is extremely useful because you can download the relevant releases for many different kinds of hardware. Enable VT and the setting for the Execution bit in the BIOS and then I installed ESX4i as my base OS.

One of the things I really love about ESXi is that it takes no time to have your host up and running, From the time you turn on the computer till you get the first ESXi login screen is not more than 7 minutes - I mean isn't that great?

So on this host I installed 2 Virtual machines - ESX 4.0 full version - using the tips from Eric Gray,
I had two hosts up and running in no time. The planned version for my production environment vCenter will be Windows 2008 Server. As you all know Windows Server R2 (which will be released on Oct. 22, 2009) will be 64 bit only - and therefore our IT dept. (with my "minor" influence) has decided that all Windows 2008 Servers will only be deployed as a 64bit OS.

I installed a windows 2008 Server 64 system with Service Pack 2, added it to the domain.

A small word of warning. Windows 2008 includes UAC. This was introduced in Windows Vista, and has now become an integral part of Windows 7 and Windows 2008. These are the defaults that UAC come with after a clean install with now settings changed from Group Policy. This could in some cases wreck havoc on your installation. In my case I wanted to see what happened if it was left at the defaults, and I had no problems


The pre-requisites for installing vCenter


So I checked that all of those were met.

local_admins user_rights






The installation was done with a member of the Domain Admins group.

I then started to install vCenter. I went through the defaults (MSDE, linked mode) I got to this screen and since this was my only vCenter server - I chose the first option.


So first a small explanation as to what exactly is happening here when installing linked mode. vCenter Linked mode works on the base of ADAM (it is as if you have Active Directory - but without actually having Active Directory).

ADAM provides data storage and retrieval for directory-enabled applications, without the dependencies that are required for the Active Directory directory service. ADAM provides much of the same functionality as Active Directory, but it does not require the deployment of domains or domain controllers, and the directory schema for ADAM is completely independent of the enterprise schema you may be using in an Active Directory domain. You can run multiple instances of ADAM concurrently on a single computer, with an independently managed schema for each ADAM instance. (Active Directory Application Mode: Frequently Asked Questions)

Well in Windows 2008 this is actually called Active Directory Lightweight Directory Services and can be managed through the Server Manager console.


Is creates a System Service which listens on port 389 (LDAP)..


And as you can see below this looks very similar to a full active Directory Schema


With the vCenter up and running I added both ESX vm's into vCenter.

And there you have it, An ESX4i Host running 3 VM's


  1. ILVSPHERE-TEST (one of those VM's)
  2. ESX4-1
  3. ESX4-2

And vSphere on ESX 4.0 hosting it all


Next up on the menu - Creating the cluster and enabling HA, and VMotion.


Powershell Scripting Games - Day 7

Here is my solution for the Beginner Event 7

Here we had to create a logging solution for script

   1: # ------------------------------------------------------------------------
   2: # NAME: ReplaceWordInWord.ps1
   3: # ------------------------------------------------------------------------
   5: $mypath = "c:\temp\test.doc"
   6: $logfile = "c:\temp\logfile.txt"
   7: #first we will see if the logfile exists
   8: $exists = Test-Path c:\temp\logfile.txt
  10:     if ($exists -eq $true) {
  11:         Remove-Item C:\temp\logfile.txt
  12:         }
  13:     New-Item -path c:\temp\ -Name logfile.txt -type "file" #Create the logfile
  15: "$(get-date) -- Created Log file: $logfile" | Out-File ` 
  16:     -Encoding ascii -Append $logfile
  18: $objWord = New-Object -ComObject word.application
  19: $objWord.Visible = $True
  20: "$(get-date) -- We have launched word" | Out-File ` 
  21:     -Encoding ascii -Append $logfile
  23: $objDoc = $objWord.Documents.Open($mypath)
  24: "$(get-date) -- We have the document" | Out-File ` 
  25:     -Encoding ascii -Append $logfile
  27: $objSelection = $objWord.Selection
  28: $FindText = "mispelled"
  29: $ReplaceText = "spelled incorrectly"
  30: "$(get-date) -- Replacing '$FindText' with '$ReplaceText'" | Out-File ` 
  31:     -Encoding ascii -Append $logfile
  33: $ReplaceAll = 2
  34: $FindContinue = 1
  35: $MatchCase = $False
  36: $MatchWholeWord = $True
  37: $MatchWildcards = $False
  38: $MatchSoundsLike = $False
  39: $MatchAllWordForms = $False
  40: $Forward = $True
  41: $Wrap = $FindContinue
  42: $Format = $False
  44: "$(get-date) -- Executing command" | Out-File -Encoding ascii -Append $logfile
  46: $objSelection.Find.Execute($FindText,$MatchCase,
  47:   $MatchWholeWord,$MatchWildcards,$MatchSoundsLike,
  48:   $MatchAllWordForms,$Forward,$Wrap,$Format,
  49:   $ReplaceText,$ReplaceAll)
  51: "$(get-date) -- Replace text complete" | Out-File ` 
  52:     -Encoding ascii -Append $logfile


Powershell Scripting Games - Day 6

This is my solution for Beginner Event 6

Here we got a script that was not working and had to debug it.

   1: #==========================================================================
   2: #
   3: # NAME: Beg_6.ps1
   4: #
   5: # COMMENT: Key concepts are listed below:
   6: #1. Uses wscript.shell to create three shortcuts on the desktop. The first is a shortcut
   7: #2. to this actual script. It uses the scriptfullName property to assign the path.
   8: #3. The second is a simple Web site URL shortcut. The third one is a shortcut to
   9: #4. Notepad.
  10: #==========================================================================
  12: $ErrorActionPreference = "SilentlyContinue"
  13: Set-PSDebug -Strict
  15: #initialize all the variables
  16: New-Variable -Name objShell #instance of the wshSHell object
  17: New-Variable -Name strDesktop #pointer to desktop special folder
  18: New-Variable -Name objShortCut #used to set properties of the shortcut. 
  19:                                #Comes from using createShortCut
  20: New-Variable -Name objURL #used to set properties of webshortcut.
  22: $objShell = New-Object -ComObject ("WScript.Shell")
  23: $strDesktop = $objShell.SpecialFolders.item("Desktop")
  25: #Create shortcut to script
  26: $objShortCut = $objShell.CreateShortcut($strDesktop + "\Shortcut Script.lnk")
  27: $objShortCut.TargetPath = $myInvocation.mycommand.path
  28: $objShortCut.WindowStyle = 0
  29: $objShortCut.Hotkey = "CTRL+SHIFT+F"
  30: $objShortCut.IconLocation = "notepad.exe, 2"
  31: $objShortCut.Description = "Shortcut Script"
  32: $objShortCut.WorkingDirectory = $strDesktop
  33: $objShortCut.Save
  35: #Create url link
  36: $objURL = $objShell.CreateShortcut($strDesktop + "\The Microsoft Scripting Guys.url")
  37: $objURL.TargetPath = "http://www.ScriptingGuys.com"
  38: $objURL.Save()
  40: #Create shotrcut to notepad
  41: $objShortCut = $objShell.CreateShortcut($strDesktop + "\notepad.lnk")
  42: $objShortCut.TargetPath = "notepad.exe"
  43: $objShortCut.IconLocation = "notepad.exe, 0"
  44: $objShortCut.description = "notepad"
  45: $objShortCut.Save()


Powershell Scripting games - Day 5

Registry keys. Sorry for the silly humor - don't know how and why Tonto got in there.

Thanks to Rob Rohr - for helping me out here.

   1: # first we define some variables
   2: $ourpath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
   3: $Maxdl1_0 = "MaxConnectionsPer1_0Server"
   4: $Maxdl = "MaxConnectionsPerServer"
   6: #for IE8
   8: $ie8path = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_MAXCONNECTIONSPERSERVER"
   9: $ie8path1_0 = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_MAXCONNECTIONSPER1_0SERVER"
  10: $ie8Max = "iexplore.exe"
  13: function upsertReg($path, [string]$name, [int]$value, [string]$propType) {
  14:     "Path: $path"
  15:     "Name: $name"
  16:     "Target Value:  $value"
  18:     # verify path exists
  19:     $keyExists = Test-Path $path
  21:     if ($keyExists -eq $true) {
  23:         # check if named registry item exists at path
  24:         $reg = get-itemproperty $path
  25:         if ($reg.$($name) -eq $null) {
  26:             # value doesn't exist... Create.
  27:             Write-Host " Key is not there Kimosabi. Let's make some magic."
  28:             New-ItemProperty $path -name $name -value $value -propertytype ` 
  29:                 $propType
  30:         } 
  31:         else {
  32:             # value exists... Update...
  33:             $curr = Get-ItemProperty -path $path -name $name
  34:             Write-Host "Hold you horses Kimosabi. It is already there!"
  35:             $confirm = read-host " You have ($curr) as your current value and ` 
  36:                 we are going to change it to ==>$value. Are you sure? (Y/N)"
  37:             if ($confirm -eq "Y") {
  38:                 Set-ItemProperty -path $path -name $name -value $value
  39:                 Write-Host "Entry has been changed Kimosabi."
  40:             }
  41:             else {
  42:             Write-Host "You chose not to change it - so it stays there."
  43:             }
  44:         }
  45:     } else {
  46:         "Path doesn't exist.  Registry entry not created."
  47:     }
  48: }
  50: # create/update registry items using the function
  51: upsertReg $ourpath $Maxdl 10 DWord
  52: upsertReg $ourpath $Maxdl1_0 10 DWord
  53: upsertReg $ie8path $ie8Max 10 DWord
  54: upsertReg $ie8path1_0 $ie8Max 10 DWord