vCheck (daily report) version 5.27

I took a night off yesterday from home repairs and painting and decided to knock out a little more on the vCheck script. Here are the new features:

# Version 5.27- bwuch: Added host uptime check
# Version 5.26- bwuch: Added host OS pivot table
# Version 5.25- bwuch: Added SSL host and vCenter checks
# Version 5.24- bwuch: Change to output file name format
# Version 5.23- bwuch: Performance fix for mis-named VM check
# Version 5.22- bwuch: More changes to prevent 4.1.1 warnings

Here is the latest version for review & comments: vCheck5.27.ps1. Also, if you want to check the feature request list it is available here: http://spreadsheets.google.com/ccc?key=0AgJcHGY0M6CTdHR3RjZMZm45SkUybS1yZFV2bXVXYWc&hl=en&authkey=CJT_mdML

Posted in Scripting, Virtualization | Leave a comment

vCheck (Daily Report)

One of the best scripts I have ever used is the Virtu-Al.net vCheck daily report (http://www.virtu-al.net/featured-scripts/vcheck/). Not only does it show problems in your virtual infrastructure, it also shows the power of PowerCLI and PowerShell. A little over a month ago I decided I would attempt to learn more PowerCLI — but I needed a project to get me started. After a few days I decided to go through all of the comments on the vCheck daily report looking for feature requests. Right now my list has 54 items on it — with 21 marked as completed. Some of the feature requests are things I have added after looking at the script for a few hours and learning a bit more about PowerCLI.

If I had some more time I would keep working on these features. However, as luck would have it, I just bought my first home. Its about twenty years old or so and needs some minor work that I’m going to try and tackle myself. For the next month or two I’ll be working on a different list of feature requests — using tools other than PowerCLI.

I wanted to share the new features and the checklist I’ve been using as a baseline. Here is a listing of the new features:

# Version 5.21- bwuch: Change code to prevent warnings when running with PowerCLI 4.1.1
# Version 5.20- bwuch: Add PowerCLI Version check and vCenter Update Manager host baseline compliance
# Version 5.19- bwuch: QA/QC bug check fix data issues
# Version 5.18- bwuch: Added Guest OS pivot table
# Version 5.16- bwuch: Added host hardware check
# Version 5.15- bwuch: changed variable name on cluster cpu allocation ratio check
# Version 5.14- bwuch: fixed quotes on VM limit check
# Version 5.13- bwuch: added sort to old VM hardware check
# Version 5.12- bwuch: QA/QC bug check; minor cosmetic fixes
# Version 5.11- bwuch: Added check for cluster CPU allocation ratio (ie vCPU to pCore)
# Version 5.10- bwuch: Added option to include all headers -- even on tests that return no results
# Version 5.09- bwuch: Added several additional checks listed on my blog http://enterpriseadmins.org/blog/?p=196
# Version 5.08- bwuch: Added fix from Leo to check for Free Space instead of capacity
# Version 5.07- bwuch: Added check for VMTools that need updated; provided by kevin, slight update by Traveller
# Version 5.06- bwuch: Added comment on how to specify multiple NTP servers as suggested by Mark
# Version 5.05- bwuch: Added check for unwanted hardware as suggested by Jon
# Version 5.04- bwuch: Added fix for select-object statement provided by Ccalvin
# Version 5.03- bwuch: Add VM resource limit check using code provided by Ed.
# Version 5.02- bwuch: Show VCB garbage bug fix from rvdnieuwendijk
# Version 5.01- bwuch: Show overallocation bug fix from James Davis

Here are the files — version 5.21 of the script and the latest comments:
vCheck5.21.ps1

Edit: 2011/01/16 – Moved vCheck Comments/feature requests to Google Documents for easier maintenance. http://spreadsheets.google.com/ccc?key=0AgJcHGY0M6CTdHR3RjZMZm45SkUybS1yZFV2bXVXYWc&hl=en&authkey=CJT_mdML

Posted in Scripting, Virtualization | Leave a comment

Dell M610 BIOS Update on ESXi 4.1

I recently needed to update the BIOS on a Dell PowerEdge M610 blade running ESXi 4.1 offsite. The server had an iDRAC Enterprise, giving me access to the local console and virtual media — however, the only BIOS update I could find from Dell was for Windows or DOS. This is usually fine, as you can copy the BIOS files directly to the floppy boot disk, boot the machine with that virtual media and run your update. The bad news was this update rang in at 1.542MB, slightly larger than my 1.38MB free space on a floppy disk.

  • Using a Windows XP virtual machine, I created a virtual floppy image and attached it as A:
  • In the Windows XP virtual machine, I formatted the disk as a system disk.
  • Using WinImage I selected Disk > Use floppy A: and then Disk > Read disk
  • Once I had all of my system files in the display, I selected Image > Change format… to create a 2.88MB floppy disk
  • I then copied my M610 firmware to the image
  • Finally, I saved the image as a .flp file and attached it to the iDRAC as a virtual floppy.

Not as easy and straight forward as I would have hoped, but it worked in the end.  If anyone has a better suggestion on how to make this easier please post a comment and let us (me) know.

Posted in Virtualization | 4 Comments

Multiple Default Servers in PowerCLI

I support multiple vCenter environments. The most recent versions of PowerCLI support this through the use of multiple default servers. When you are connected to multiple vCenters commands such as ‘Get-VM’ will return VMs from both default servers.

When you first attempt to connect to a second vCenter server you will receive the following warning.

Working with multiple default servers?

    Select [Y] if you want to work with more than one default servers. In this case, every time when you connect to a different server using Connect-VIServer,  the new server connection is stored in an array variable together with the previously connected servers. When you run a cmdlet and the target servers
cannot be determined from the specified parameters, the cmdlet runs against all servers stored in the array variable.
    Select [N] if you want to work with a single default server. In this case, when you run a cmdlet and the target servers cannot be determined from the specified parameters, the cmdlet runs against the last connected server.
    You can change your preference at any time using  the DefaultServerMode parameter of Set-PowerCLIConfiguration.
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

This can be bothersome if you really want to access multiple default servers. The following command:

Set-PowerCLIConfiguration -DefaultVIServerMode multiple -Confirm:$false

Will set your default server mode to allow multiples.

Proxy Policy    Default Server
                Mode
------------    ---------------
UseSystemProxy  Multiple

Now when you try to connect to a second vCenter you will just connect, no input needed.

Posted in Virtualization | Leave a comment

OPENFILER and VMXNET3

Installed VMware tools using my previous article at http://enterpriseadmins.org/blog/?p=133

Once the tools were install I shutdown the virtual machine and changed the Guest OS from ‘Other Linux (64-bit)’ to ‘Red Hat Enterprise Linux 5 (64-bit)’. Once I had switched to a supported OS, I was able to add a VMXNET3 adapter.

After powering the virtual openfiler box back on I accessed the ‘system’ tab of the web GUI and found the eth1 interface disabled. I enabled the eth1 interface from the web GUI and configured it for DHCP.

I’ve used IOMETER to push about 700GB worth of IO to an NFS share on the OPENFILER VM – all across the VMXNET3 adapter so I’m sure its working 🙂

Posted in Virtualization | Leave a comment