Archive for August 2012

vCheck Script

Summary

vCheck.ps1 is a vCenter checking script, the script is designed to run as a scheduled task before you get into the office to present you with key information via an email directly to your inbox in a nice easily readable format. This script picks on the key known issues and potential issues of the virtual infrastructure and reports it all in one place so all you do in the morning is check your email. One of they key things about this report is if there is no issue in a particular place you will not receive that section in the email, for example if there are no datastores with less than 5% free space (configurable) then the disk space section will not show in the email, this ensures that you have only the information you need in front of you when you get into the office. This script is not to be confused with an Audit script, It doesn’t want to remind you that you have 5 hosts and what there names are and how many CPU’s they have each and every day as you don’t want to read that kind of information unless you need it, this script will only tell you about problem areas with your infrastructure.

Instructions

  • Download the script where it says Download ZIP and copy to say c:\vCheck folder

vcheck

  • Run through the wizard which will go through the interactive install
  • Open Power CLI as an Administrator
  • Type Set-ExecutionPolicy RemoteSigned or unrestricted depending on how secure you want to be
  • Type set-powercliconfiguration -invalidcertificateaction -ignore
  • Type set-powercliconfiguration -proxypolicy no proxy

powercli2

  • Navigate to the C:\vCheck folder and run .\vCheck.ps1. By default on the first run, it will guide you through setting all your settings
  • If you need to rerun the wizard after configuring the furst time use vCheck.ps1 -config
  • To define a path to store each vCheck report in select .\vCheck.ps1 -Outputpath c:\vCheck\Reports
  • First you should see a screen prompting you for some information
  • Note: I was running this from a test vCenter Server which had a proxy server added in Internet Options. I didn’t need to add the Proxy Server into the script as it stopped the script from running or you can run Set-PowerCLIConfiguration -ProxyPolicy NoProxy as per first notes above

  • The script should start running and look like the below screen

  • By default, because I didn’t specify an output folder for my script, it saved the html output file in the following location
  • C:\Users\%username%\AppData\Local\Temp

Running as a Scheduled Task in Windows Server 2008 R2

  • Click Start > Administrative Tools  > Task Scheduler
  • Right click Task Scheduler Library and select New Task
  • Put in a name and a description and choose how you want the script to be run
  • Tick Run with Highest Privileges
  • We are running Windows 2008 R2 so I changed the Configure for to Windows 7,Windows 2008 R2

  • Choose Triggers  – How often the task will run. We like ours to run once a week when everything is quieter not that it takes up much resource to run!

  • Choose Actions and Edit – This will be where you will need to put your schedule in

  • In Action, choose Start a Program
  • In Program/Script type C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • In Add Arguments type -PSConsoleFile “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1” “& ‘C:\vCheck\vCheck.ps1′”
  • You don’t need to put anything in Start In (optional)
  • This is what worked for us but other people have probably slightly different ways of doing this

vcheck3

  •  Conditions as per below screen print

  • Settings as per below screenprint

  • History will show you everything which has happened associated with the tasks

  •  Click Ok and it will prompt you for the password for the User Account. Choose a generic user account or group as you don’t want to restrict people from running this or be left with an account who leaves the company as the user for this task.
  • If you want to check the Task is running in Task Scheduler, you can do the following
  • Click Display all Running Tasks and the below screeprint shows you what is running

  • You should also be able to see Conhost and PowerShell.exe running in Task Manager if everything has kicked off correctly

  • When I ran this with previous version, it took nearly 2 hours on a VMware 4.1 system with 26 Hosts and 350-400 VMs but the latest version which I have updated today 23-06-14 runs really fast in around 15 minutes which is fantastic 🙂

To add Multiple emails for receiving the report

  • Go to the c:\vCheck folder and open GlobalVariables.ps1 in Notepad
  • Edit the following fields – $EmailTo =  with the below
  • You can now also edit the following fields $Emailcc
  • All settings below are made up but just so you get the gist

vchecksettings

Task Scheduler Error Messages

  • Check no-one has changed your account password that you use to run this script
  • Check no-one has deleted your account that you use to run this script
  • Check no-one has disabled your task in the Task Scheduler

What’s new?

The best place to check for any updates and logged issues is Alan Renouf’s Github Page below as this is the main site for this community based script now

https://github.com/alanrenouf/vCheck-vSphere

 

 

VMware Technical Journal

Introduction

The VMware Technical Journal is a new publication for the company. They are looking forward to producing future journal issues at regular intervals to highlight the R&D efforts taking place in several different areas of engineering. Their current issue includes papers related to distributed resource management, user experience monitoring, and statistics collection frameworks for virtualized environments, along with several other topics. In future issues theywill highlight other areas of VMware R&D, including Cloud Application Platform and End User Computing, and research collaborations with academic partners.

Link

http://labs.vmware.com/publications/vmware-technical-journal

Whats the difference between SAS, Nearline SAS and SATA?

Types of Disk

When you buy a server or storage array these days, you often have the choice between three different kinds of hard drives:

  • Serial Attached SCSI (SAS)
  • Near Line SAS (NL-SAS)
  • Serial ATA (SATA).

SAS

Also known as Tier-1, these 10K & 15K RPM SAS drives provide the online enterprise performance and availability needed for mission critical application

  • General Standard in storage these days
  • Most reliable
  • Generally high performing
  • Lower BER (Bit Error Rate) than other types of disk.1 in 10^16 bits
  • SAS disks have a mean time between failure of 1.6 million hours compared to 1.2 million hours for SATA
  • SAS disks/controller pairs also have a multitude of additional commands that control the disks and that make SAS a more efficient choice than SATA.

Nearline SAS?

An NL-SAS disk is a bunch of spinning SATA platters with the native command set of SAS. While these disks will never perform as well as SAS thanks to their lower rotational rate, they do provide all of the enterprise features that come with SAS, including enterprise command queuing, concurrent data channels, and multiple host support.

  • NL-SAS drives are enterprise SATA drives with a SAS interface, head, media, and rotational speed of traditional enterprise-class SATA drives with the fully capable SAS interface typical for classic SAS drives.”
  • Same speed really as SATA. While these disks will never perform as well as SAS thanks to their lower rotational rate, they do provide all of the enterprise features that come with SAS
  • Good if you need 1TB drives in a SAS server, say for backups.
  • Not good for first or primary storage in a SAS based server.
  • Enterprise/tagged command queuing. Simultaneously coordinates multiple sets of storage instructions by reordering them at the storage controller level so that they’re delivered to the disk in an efficient way.
  • Concurrent data channels. SAS includes multiple full-duplex data channels, which provides for faster throughout of data.
  • Multiple host support. A single SAS disk can be controlled by multiple hosts without need of an expander.
  • The BER is generally 1 in 10^15 bits.
  • NL-SAS disks rotate at speeds of 7200 RPM… the same as most SATA disks, although there are some SATA drives that operate at 10K RPM.

SATA

Also known as Tier-2: these Nearline, Business Critical 5.4K and 7.2K RPM drives combine specific design and manufacturing processes for hard drives rated at 24x7x365 operations for true enterprise duty cycles. The main emphasis is on an exceptional dollars/GigaByte advantage over Tier 1 storage

  • It doesn’t perform as well as SAS and doesn’t have some of the enterprise benefits of NL-SAS
  • Used for large cheap capacity over performance