Using PowerCLi to run a ESXCli command to find storage info

So recently I had to use VMware Health Analyzer in order to run a health check on a clients’ virtual environment alongside a colleague who was running Navisphere Analyzer against the clients’ EMC storage array.

We notice a slight problem where we couldn’t match up the LUN IDs from the storage (ie Channel:Target:Lun – which VMware refers to as Runtime name) and the UUIDs that are used in VMware (ie naa.xxxxxxx).

The Health Analyzer outputs only datastore/LUN information referencing the appropriate UUID. The EMC nar file generated outputs only LUN information referencing the appropriate LUN ID (well that’s what my colleague says – if anyone knows how to generate data using the VMware UUID then please let me know!).

So we pretty much had no reference to match up VMware Health Analyzer LUN data to the EMC Navisphere Analyzer LUN data…….

So a quick google sent me looking here:

http://www.geekmungus.co.uk/vmware/matchvmwarelunidtoemcsanlunid

But that would only be useful if you are able to sit on site and look at the vSphere Client/Navisphere GUI, plus it would be quite a tedious process to go through all the LUNs.

Sooooo…. after a lot of trial and error, and googling PowerCLI commands, I ended up writing the following script (with a little help from Luke’s scripts at http://thephuck.com/):

param([string[]]$vmhosts = $null)
#By default, PowerShells execution policy is set to Restricted; that means that scripts will not run.
#RemoteSigned allows PowerShell to run any scripts you write, but only run scripts from the Internet if they have been signed by a trusted publisher.
Set-ExecutionPolicy RemoteSigned
Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue #required if running from normal Windows PowerShell and not VMware Powershell

function usage()
{
Write-host "This script is used to pull Storage information for all hosts provided."
Write-host "You can specify -vmhosts as an array:"
write-host "Get-LUN.ps1 -vmhosts (`"host1`",`"host2`",`"host3`")"
}

if ($vmhosts -eq $null)
#Checks to see if vmhosts parameter has been supplied when script is run
{
usage
break
}

if ($vmhosts -ne $null)
{
#Credentials required for ESX hosts - assuming credentials will be same for all ESX hosts
$vmhost_creds = $host.ui.PromptForCredential("ESX/ESXi Credentials Required", "Please enter credentials to log into the ESX/ESXi host.", "", "")
foreach ($vmhost in $vmhosts)
{
connect-viserver $vmhost -credential $vmhost_creds > $NULL 2>&1
$esxcli = Get-EsxCli -VMHost $vmhost
#Outputs the data into a text file located in C:\ and will name the file using the host name
$esxcli.storage.core.path.list() | Out-File c:\$vmhost.txt
disconnect-viserver -confirm:$false
}
}

#garbage collection
$vmhost_creds = $null
$vmhosts = $null
$esxcli = $null

 

So basically cut and paste the code into notepad and save it as Get_LUN.ps1 and run from a PowerShell console…….

The output will list all Adapters, UUIDs, Runtime Names, Identifiers, etc for the host.

 

If you want to limit the data obtained, then you could always pipe the data through a select filter before piping it to the output file….. so a bit like: $esxcli.storage.core.path.list() | Select Adapter,Device,RuntimeName,Transport | Out-File c:\$vmhost.txt

The 3 Amigos of DRAM

Wow…. didn’t know that there are now only 3 main players in the DRAM market!

Samsung, Micron and Hynix…….

I use to peddle memory on eBay, and use to see all sorts of memory manufacturers…… didn’t know that the big 3 had practically gobbled up the rest!

Anyways, given the amount of hype around flash-based storage over the last year or so (ie violin memory, netapps new offering, EMC’s entry with XtremIO, etc etc), you can imagine that these ‘Three Amigos’ of DRAM will be making quite a buck or three in the coming years!

http://www.theregister.co.uk/2013/03/19/micron_flash_numero_uno/

vSphere’s Built in performance monitoring tools

Currently reading around the subject on collecting and analysing performance stats in a VMware environment…..

A useful article I stumbled across:

http://searchvmware.techtarget.com/tip/VMware-vSpheres-built-in-performance-monitoring-tools

Whilst it doesn’t tell you how to use the tools, it gives a good summary of what the tools are….

In addition to VMware’s own perf mon doc: http://pubs.vmware.com/vsphere-51/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-51-monitoring-performance-guide.pdf

I also found a whitepaper by the same author but for Solarwinds: http://solarwinds-marketing.s3.amazonaws.com/solarwinds/whitepapers/VM_whitepaper_Perform_Management.pdf

Obviously most people use esxtop…. so info about this tool can be found here: http://communities.vmware.com/docs/DOC-9279

 

As always, there’s a good article on Yellow Bricks about esxtop: http://www.yellow-bricks.com/esxtop/

By aptones Posted in VMware

vForum 2013

Just a quick blog before I hit the sack regarding an upcoming VMware event that some people may not have heard of….

VMware Forum 2013

http://www.vmwareforum2013.com

VMware run this FREE event across the world and it’s coming to London at Wembley Stadium on the 2nd May 2013. (There’s another in Manchester at Old Trafford – on the 22nd May).

It is predominantly aimed at End-users and IT professionals who are keen to learn how they can engage with VMware and what they can do with the VMware portfolio either to start their virtualisation journey or to expand their virtual environment.

The agenda this year will be focusing on 3 key areas:

Cloud Computing – this will be focused around the vCloud Suite of products and how VMware envisage a ‘software defined datacenter’.

Virtualization – with the majority of clients having an idea of what virtualisation is about, this looks to be focusing on virtualising business critical/tier-1 applications as well as managing/monitoring an users virtual environment.

Mobility – this is pretty much End User Computing focusing on the new Horizon Suite and how it will affect VDI.

Whilst I would love to go to the event, it’s pretty much a non-partner event (i.e. VMware Partners – like my company MTI – are not really invited!). So if you’re interested in finding out more about VMware and how to introduce it into your IT environment….. register NOW and head down to Wembley! =)

Right… off to bed…. got an early start as  I’m heading down to an EMC VSPEX event organised by MTI at the London Transport Museum…. should be interesting stuff! (http://ecommunication.mti.com/acton/rif/1192/e-0481-1302/-/l-tst:30/l-tst/showPreparedMessage)

VXLAN

VMware have just released a new design guide regarding Network Virtualisation. Particularly focusing around VXLAN….

http://blogs.vmware.com/vsphere/2013/03/download-vmware-network-virtualization-design-guide.html

As part of my new job, I’ve taken it upon myself to educate my peers on interesting articles released by VMware.

VXLAN is being mentioned quite a lot these days as VMware and Cisco start banging on about the move to a “Software-defined datacenter”. Up until last December, I was pretty must oblivious to virtual networking and have only recently started reading up on the stuff….. pretty tough going considering my poor understanding of network technologies! (One area I am striving to improve on).

So given what I’ve learnt, I thought it would be useful to briefly explain my understanding on VXLAN! =)

Virtual eXtensible LAN (VXLAN) basically expands on VMware’s network virtualisation by getting rid of the limitations of scale when implementing VLANs (4096), the problems of spanning a network across disparate data centres, and also the lack of multi-tenancy isolation – I believe you can get 16mil networks with VXLAN.

It’s designed to act as an L2 virtual network over the L3 physical network – in other words the L2 packet from the VM (MAC) is wrapped in a L3 IP header by the vSwitch and sent out over UDP. One of the advantages of this MAC-in-IP encapsulation is the ability to span a network domain across 2 different data centres – i guess similar to a stretched VLAN.

TBH, I can only envisage VXLAN being implemented in multi-tenancy cloud solutions to allow network scalability. However, it’s worth understanding the basics of VXLAN and what it is as I’ve seen customers catch hold of this “buzzword from VMware/Cisco” and think it’ll be useful to them. If I’m honest, if anyone asks about VXLAN then I would suggest you tell them that unless they’re going to break the limit of VLAN then don’t bother with it until the technology is fully matured – there are niggling issues with switch supportability (if it’s not a new cisco switch), routing issues caused by multiple IP addresses on the same subnet existing in multiple locations at the same time (think multi-tenancy cloud talking out via 1 internet gateway), etc. Probably more headaches than it’s worth…… not to mention a re-think of your network and the cost of implementing it!

 

Anyways, here are 2 great blogs that have helped me to understand VXLAN:

http://www.yellow-bricks.com/2012/11/02/vxlan-use-cases/

http://blog.scottlowe.org/2011/12/02/examining-vxlan/

(You can never go wrong with Duncan Epping and Scott Lowe!)

What is the difference between OVA and OVF……

So thought I’d start blogging a bit more regarding stuff I have to keep explaining to colleagues.

Recently a colleague asked me to explain the difference between OVA and OVF…….

OVF = Open Virtualization Format

OVA = Open Virtualization Appliance

Without going into the history of both type of files, the simple explanation is this: 

An OVF is usually made up of several files.
Usually this is a small description file (.ovf), the VMs state files (ie it’s disk – *.vhd or *.vmdk) and sometimes a manifest file (.mf) – it’s an open standard so not just limited to VMware.
Classic example is if you download the vCenter Server 5.1 Appliance, it’s a small .ovf file (9.1KB), and 2 disks (system disk – 2GB, data disk – 8.4MB).

Just be aware that OVF can mean both the description file AND the packaging format…… =)

An OVA is a single file that consists of a TAR archive of all of the above OVF files (for VMware this is usally the .ovf and .vmdk files).
I guess you can say that the purpose of the OVA is to make life easier when packaging an appliance for portability and installation.

End of the 1st week…..

So what have I learnt after a full week in my new job?

Well….

  1. That EMC actually have quite a decent storage proposition and portfolio…… far better than any other vendor I’ve worked with…. and I’ve actually been very impressed with what I’ve seen and learnt so far.
  2. That NetApp (for all their publicity) are going about their Cluster storage in a very difficult and painful way…… whereas it’s far easier with EMC (for example Isilon).
  3. That EMC Isilon is quite an impressive product!
  4. That Networker can be a bit flakey sometimes when setting up, and isn’t the ‘easiest’ of backup products to configure and get working correctly!
  5. That EMC practically own the dedupe market with Avamar and Data Domain

From what I’ve learnt over the past week, I’m surprised at how well EMC can predict the market and how clever they are at acquiring businesses and turning them into big successes…. VMware, Avamar, DataDomain, RSA, Isilon……  What successful acquisitions have the rest of the market vendors done?

HP – well they bought Palm and killed it, 3Com and merged it with their ProCurve division, 3PAR & Lefthand since HP StorageWorks had practically been overtaken by everyone else! Autonomy – yeah that’s going well!….. tbh, Autonomy will probably come good for them, but none of the others have set the world on fire…..

Dell – EqualLogic & Compellent because they didn’t have a storage proposition, Sonicwall for security, Force10 for network and Wyse for thinclient… again, none have been market leaders or big name market players (apart from Wyse)!

NetApp & IBM – zero decent acquisitions that were game changers!

 

So having come from a background steeped with HP knowledge, I’m pretty impressed with what I’ve seen from EMC so far…… tbh, I had always viewed that when it comes to storage EMC were streets ahead of the rest of the market!

 

Yes…. I’ve pretty much been brainwashed already!