Tag Archives: esxi

Monster VMs Mass Storage & How to check storage used

Jason Boche posted an interesting discovery with regards to Monster VMs and the amount of storage one would be sticking to them.  One of the large projects being designed today  has the likely reason to hit this limit with just a single VM.  This is pretty easy for that project to hit that as a single VM will have about 75TB assigned to it.   Since this design has 4 or 5 VMs of this size, which then means our standard ESXi Host will have around 300+ TB assigned to it.  Thankfully RDM isn’t impacted by this limit in theory, so there is a workaround available.  Not ideal and yet doable.

Instead one of the questions that came out of this news is “Does this issue impact the rest of our environment?”   Will this explain some random stability issues we have seen?

This script will return what every single host has in terms of VMDK files.  To use this script look at each host and see if the host itself is under the limits.  Then look at the cluster level based on the HA rules and see what the VMDK limits would be if a host failed.  That should give an idea of how close your clusters might be to hitting this limit.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if ( -not (Get-PSSnapIn | where {$_.Name -eq "VMware.VimAutomation.Core"}) )
{ 
    Add-PSSnapin -Name "VMware.VimAutomation.Core"
}
 
$vcenters = "vCenter"
 
connect-viserver -server $vcenters -cred (Get-Credential)
 
$diskuse = @()
 
$clusters = get-cluster
foreach ($cluster in $clusters) {
    "Working on Cluster $cluster"
    $vmhosts = get-vmhost -Location $cluster
    foreach ($vmhost in $vmhosts) {
    "`tWorking on VMHost $vmhost"
        $vmlist = get-vm -location $vmhost
        $totalDisk = 0 
        foreach ($vm in $vmlist) {
            $view = $vm | get-View   
            foreach ($disk in $view.Guest.Disk) {
                $disksize = ([math]::Round($disk.Capacity/1MB))
                $totaldisk += $disksize
            }
         }
         "`t`tVM size: $totaldisk"
            $obj = new-object PSObject -Property @{
                Cluster = $cluster
                VMHost  = $vmhost
                TotalDiskMB = $totaldisk
            }
         $diskuse += $obj
    }
}
 
$diskuse | export-csv "OpenFileDiskUse.csv" -NoTypeInformation

With Default settings the magic numbers to look for:

  • ESXi 4.x – 4TB
  • ESXi 5.1 – 8TB

VMware still supporting DOS

Just saw the release of the 28 July 2011 patches for ESX(i) and in the list fixed is this little nugget.

When you use Altiris DOS boot disk and PXE boot a
virtual machine running on ESX 4.1 with flexible
adapter, the virtual machine might fail to start when it
attempts to load MS‐DOS LAN Manager NetBind.

VMware is still supporting DOS long after Microsoft has sent it to the curb.  I know several Fortune 1000 companies that still have DOS applications that they need to run that are critical to the business processes.   What other top notch hypervisors support DOS still?

Upgrading Firmware on ESXi

A bane of any system administrator’s existence is the constant stream of firmware updates to fix various bugs and issues that occur. One of these HBA Firmware updates is a fairly common issue where a new LUN or Target is not being discovered without a reboot. With Emulex there is a set of tools called the HBAanywhere that can be installed onto ESX Classic. Then you can perform an Emulex HBA Firmware upgrade without having to reboot the ESX Host.

Example script:

1
2
3
4
cd /usr/sbin/hbanywhere
./hbacmd listhbas
./hbacmd download 00:00:01:02:03:04:05 zd282a4.all
./hbacmd hbaattributes 00:00:01:02:03:04:05

With this you have just updated the firmware to 2.82a4 on an LPe11000-M4 card.

With ESXi it isn’t that easy since hbacmd isn’t available. The solution I came up with is to create a bootable WinPE CD with the Emulex Tools and firmware available on it. Then all you have to do is boot off this CD and you will be able to update your 10G CNA or your Emulex LPe12000 HBAs.

This script expects you to have the Windows AIK installed locally. Just update this script to point at the appropriate locations of the listed files.

CustomEmulexWinPE.cmd – Run this to create a bootable ISO that will install the Emulex WinPE utilities & drivers and then attempt to upgrade the 10G CNA & LPe12000 cards in the system.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
call "C:Program FilesWindows AIKToolsPEToolspesetenv.cmd"
 
call copype x86 EmulexWinPE
 
imagex /mountrw Winpe.wim 1 mount
 
mkdir mountEmulex
xcopy "setupElxAll-x86.exe" mountEmulex
xcopy /s "Firmware" mountEmulex
del mountWindowsSystem32startnet.cmd
xcopy "startnet.cmd" mountWindowsSystem32startnet.cmd
 
peimg /prep mountWindows
imagex /unmount mount /commit
copy winpe.wim ISOsourcesboot.wim
 
oscdimg -n -betfsboot.com ISO EmulexWinPE.iso

startnet.cmd – This runs on boot and will attempt to update the 10G CNA & the Emulex LPe12000 cards in the system.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
wpeinit
 
EmulexsetupElxAll-x86.exe /q
cd "Program FilesEmulexUtilelxApp"
 
winlpcfg download a=lpe12000-m8 i=emulexlpe12000ud111a5.all
winlpcfg download a=lpe12000-m8 i=emulexlpe12000ub202a2.prg
 
winlpcfg download n=1 i=emulexoce10102s1462001.ufi
winlpcfg download n=2 i=emulexoce10102s1462001.ufi
winlpcfg download n=3 i=emulexoce10102s1462001.ufi
winlpcfg download n=4 i=emulexoce10102s1462001.ufi
 
winlpcfg listhba

Once this script is done running you’ll have a EmulexWinPE.iso that you can mount and boot off of. It will automatically run and upgrade the firmware of the Emulex devices.

This basic setup should allow you to do anything scripting wise you need to do in a Windows environment to update the hardware configuration or run various diagnostics tests outside of ESXi.

Download Locations:
setupElxAll-x86.exe
Windows AIK
Emulex Firmware – Download as needed and update the location you copy it to your WinPE ISO file in the Startnet.cmd and in the CustomEmulexWinPE.cmd.