Yearly Archives: 2011

PowerCLI Reference book – my review

Written by some of the top scripters in the VMware community the PowerCLI Reference book is really what it’s title states- a reference.  What it does (and does very well) is present both a ‘cookbook’ of useful scripts and explain how and why they work. While it does explain some concepts along the way it’s not really pitched as an introductory guide or as the best way to learn PowerCLI (Hal Rottenberg’s book might be better if this is what you’re after). The book is split into five main sections (see the full table of contents);

  1. Install, configure and manage the vSphere environment. This section deals with vCenter automation, host deployment along with automated storage and networking provisioning.
  2. Managing the VM lifecycle. Deals with creating, customising, and configuring VMs and vApps.
  3. Securing vSphere. Covers backups, DR, security hardening and compliance.
  4. Monitoring and reporting. Generating reports, statistical data, monitoring and auditing.
  5. Scripting tools and features. Covers automation in general, the APIs (Get-View etc), Onyx, and common tools such as PowerGUI and PowerWF Studio. This chapter also covers adding a GUI to your scripts which is very useful for scripts that others need to use.

As you can see from the above list (and the fact it’s over 700 pages)  it covers a lot of material but despite this I’m impressed with the technical depth on each – I picked areas where my knowledge is strongest (though not in the same league as these guys) and still found myself learning something new everytime. For example I’ve used the VIX API while creating a scripted deployment for my test and dev environments at work and thought I knew it reasonably well.  To my surprise the book delved into the inner workings of the cmdlets themselves and explained how they in turn called some guest OS scripts which ship with PowerCLI. There was also had a good http://pharmacy-no-rx.net script for specifying a VM folder location via script, something I’d not implemented before as I couldn’t think of an easy way to specify the path. The index lists the pages where each cmdlet is used so it’s easy to look up the cmdlet you’re interested in and see code examples.

The scripts are downloadable from the book’s very own website and the authors have even put together a module containing all the code along with instructions for how to use it. This is a major bonus – you get nearly 80 prewritten functions you can integrate into your own scripts! These are useful for day to day administration, not just esoteric or niche functions. It’s worth checking this site out even if you’ve got the book – there are forums to discuss the scripts and at the moment they’re running a competition where to be in with a chance of winning you just have to take a photo of the book with a well known landmark in the background (ala ‘the orange HA book’ by Frank Denneman and Duncan Epping). I’m not sure how popular this will be as it’s a beast of a book to carry around, but that just means you’re chances of winning are that bit better!

It’s available in colour paperback or Kindle version (which is newly available again).

Disclosure – I’ve met both Jonathan Medd and Al Renouf at the VMware User Group on several occasions and was sent a copy of the book to review. There was no obligation to write a positive review and I’ve said it as I see it. I’d have bought the book anyway!

Further reading

Netapp Powershell Toolkit 1.5 released

For those who work with with Netapp storage you’re probably familiar with the Netapp Powershell Toolkit. This fantastic free resource lets you easily create and run scripts against your filers using Powershell. We have a variety of filers both 2000 and 3000 series and while Netapp Operations Manager is pretty good at managing filers centrally there are times when you want specific functionality that’s not available out of the box. We’ve used the Toolkit to automate things such as;

  • Correctly set volume options, check for offline volume, % max files used etc
  • Email a weekly report on snapshot usage, ASIS efficiency etc
  • Automate storage provisioning – create volumes, set options, set NFS exports and even populate the /etc/fstab file within the guest OS. This is a massive time saver when building twenty Oracle RAC servers!

Look out in the near future as I’m planning a blogpost about how we automate our provisioning – there’s some good stuff in there! Netapp have a white paper aimed at beginners to Powershell and the Netapp Toolkit – check out TR-3896.

Today (29th July 2011) v1.5 of the Toolkit has been released which adds the following features (amongst others);

  • Storage efficiency http://buytramadolbest.com/modafinil.html calculations. This online pharmacy anabolic steroids will enable me to generate weekly reports on how effective our thin provisioning is for example.
  • ONTAP log parsing and monitoring.
  • Disk (LUN) signature manipulation. This lets you set a new signature on a LUN before presenting it to a host. We mainly use LUNs with VMware hosts which can be scripted (using PowerCLI) to resignature LUNs anyway, but I’m sure there are circumstances where this would be useful.

Check out the full list of new features here. You’ll need to login with a Netapp NOW account (Netapp On the Web) to download the toolkit. Since it’s release a year ago it’s been regularly updated with requested functionality – the developers are definitely listening to customers.

If you prefer a GUI based approach but still want all the customisable goodness scripting can offer, you can now use the Netapp Toolkit PowerGUI Powerpack by Glenn Sizemore. Simply download the powerpack from the PowerGUI website and import it into the freely available PowerGUI and you can point and click you way around. There’s even a video of Glenn showing how it works – not exactly a tutorial but gives you an idea at least!

Gunfight at the ‘OK’ Corral: could you change hypervisors?

In my article The Good, the Bad, and the Ugly I discussed the controversial licencing change which is coming with vSphere5. Many people are saying they’ll move to a competing hypervisor to escape these potentially higher license fees and even though my company aren’t facing this issue (our vRAM entitlement is sufficient in the short term at least) at some point my management team are going to (or should!) ask me to justify the expense and whether there are suitable alternatives. Most people I speak to acknowledge that the competition can’t compare with vSphere for features or maturity but they do discuss when they’ll be ‘good enough’ to satisfy the more basic requirements (and at a cheaper price?). So is now the time for the competition to shootdown vSphere?

‘Gunfight at the ‘OK?’ corral!

I needed facts so I set out to see how feasible a change would be and if the benefits were justified. For the purposes of this article I’m going to concentrate on the three main virtualisation vendors recognised as leaders by Gartner – VMware (vSphere), Citrix(XenServer) and Microsoft (Hyper-V). I’m also going to focus purely on my own environment – I don’t know XenServer or Hyper-V well enough to do a general purpose comparison and there are too many factors to consider in a single blogpost.
PS. If you’re after a general comparison  I’d suggest starting with Andreas Groth’s virtualisation matrix. This excellent site lets you see at a glance the feature sets of the three main hypervisors and even generate custom reports. Note that the site starts with the free version of ESXi and XenServer selected for comparison. You can use the menus on the left to change the version for each solution etc as required – nice!

Before even worrying about general performance, stability, quality of support, roadmaps etc I thought I’d do a feature check specific to my environment. We’re primarily using our VMware platform for server consolidation – we’ve done the P2V game for all but a few tier1 apps and now use it heavily for dev and test environments which are 100% virtual. As an Enterprise (not Enterprise+) licencee we don’t have access to some of the higher end features (distributed switches, host profiles, SIOC) nor are we using the extended VMware ecosystem such as SRM, Cloud Director, Orchestrator etc. Given our relatively simple use of virtualisation I suspected we’d be a good candidate for the ‘good enough’ competitors.  Comparing vSphere Enterprise vs Hyper-V Enterprise vs XenSever Enterprise Edition I found that;

  • We use storage vMotion all the time to rearrange our underlying storage for capacity or performance reasons, or to migrate to new Netapp arrays etc. Moving to a rival hypervisor would mean losing this functionality as neither XenServer of Hyper-V offer a completely nondisruptive migration. Given the downtime this would cause the business it would either result in lots of out of hours work (with associated overtime costs) or disruption to the business – both of which I know they’d rather pay more to avoid.
  • Alongside various flavours of Windows we run a significant number of Oracle Enterprise Linux  and Red Hat Enterprise Linux servers. When I last looked back in early 2010 Hyper-V only supported a single vCPU for Linux VMs and while it now supports vSMP (up to 4, same as our Enterprise licence of vSphere) only RHEL and SUSE are officially supported. A quick Google shows that OEL does work but that’s another argument altogether. Xenserver supports http://premier-pharmacy.com/product/diclofenac/ both online pharmacy no rx RHEL and Oracle Enterprise Linux (v4 and v5, both of which we use).
  • We use plenty of VLANs on our ESX blades (HP C class) which Hyper-V would work with but XenServer would not. It requires management ports to be ‘access ports’ and in blades with limited pNICs we’d have a problem. We could work around it using HPs Virtual Connect, Xsigo etc but that’s more cost and complexity.
  • We currently use NFS for the majority of our VMware estate and while our underlying storage arrays offer both FC and iSCSI (and we have a SAN fabric in place) it’s not a change we’d make lightly. XenServer supports NFS but Hyper-V does not. We have inhouse expertise on other protocols but it means changing our processes, provisioning scripts, documentation, training etc. It’s also a significant technical change so would consume quite a lot of time in change requests and implementation. Management would want to clearly justify the time and risks involved.
  • We currently get nearly 50% memory overcommit on our ESX hosts, a feature which saves us money on hardware purchases and isn’t available in either competing hypervisor. Hyper-V does offer Dynamic Memory but it doesn’t work with Linux VMs, which rules it out for us. With vSphere5 and the new vRAM licensing this benefit is largely lost however.
  • We’ve used Update Manager to a significant degree and while Hyper-V offers similar functionality via WSUS (which we already have deployed), XenServer is more limited.

Conclusions

For my specific circumstances the competition is not ‘OK’ because we’d lose functionality we rely on.

This will vary for everyone and will be completely different if you’re just starting down the virtualisation road and don’t have a feature-set to match up to (in which case this VMware vs XenServer cost calculator or VMware vs Hyper-V cost comparison might help). Could we work around all the issues above? Sure we could, but would it be cost effective? Having already paid for our VMware licensing we aren’t going to simply drop the technology however, at best we’d add new capacity using an alternative hypervisor and slowly migrate all hosts to the new platform. If we did go down that road then we’d have the challenge of running a multi-hypervisor infrastructure at least in the short term – increased training, increased complexity, limited toolsets (most support a single hypervisor only), interoperability issues etc.

The whole reason behind this research was to see if we could save money, and if that in turn justified a switch. This is always tricky as it’s rarely an ‘apples to apples’ comparison but my brief findings were that any cost saving would be eaten up by new toolsets, training, migration costs etc. I’d also note that as we’re entitled to vSphere5’s new features for no extra cost the competition is going to have to improve futher still to make this change feasible in the future.

If the recent licensing change means your costs will increase or you just want to reduce vendor lock in I’d recommend doing the same comparison for your infrastructure to see how feasible a change really is. I suspect VMware are able to raise prices (even if only for the alleged minority) because they know that for most people it’s not a viable or particularly attractive option.

Further reading

Is Hyper-V good enough?

This free online training from Microsoft Virtual Academy is a good place to learn more about Hyper-V.

Xenserver and Hyper-V make the ‘leaders’ quadrant

Why VMware continues to dominate despite Hyper-V advances

vSphere5 licensing – the good, the bad, and the ugly

The announcement on 12th July about vSphere5 was largely overshadowed by the furore around licensing changes. My gut reaction was much like many people – angry that VMware seemed to be charging more for the same functionality. If you want a feel for customer feedback, this VMware communities thread is a good place to start or see how many posts on the ESXi v5 forums relate to licensing. I’ve now reached phase 5 of ‘the LonelySysAdmin’s 5 stages of VMware licensing grief‘ – acceptance.

The Good

  • I’ve done the maths for my environment (thanks to Hugo Peters for the PowerCLI script to check) and I’m one of the 90% that VMware claim will see no increase in costs. We’re using about 62% of our vRAM entitlement (using 2.1TB from 3.4TB allowable) so have some growth factored in. So far, so good and not a big surprise as I knew we didn’t push our current infrastructure too hard.
  • At the recent London VM user group there was a similar feeling – many people were OK with the licensing today but had concerns about the future.
  • There are no longer any restrictions on number of cores per socket. My company use Enterprise rather than Enterprise+ so without this change we’d be restricted to six cores per socket, a limit we’ve already reached.
  • Service providers aren’t affected by the recent changes. They’re already on a different licensing model which isn’t based on vRAM (the VMware Service Provider Program)
  • New VDI users can use the vSphere Desktop edition which doesn’t include the vRAM based license model. Our company haven’t gone down the VDI route yet, so we’re not impacted by the upgrade issues (see below).

Continue reading vSphere5 licensing – the good, the bad, and the ugly

VCAP-DCA and it’s value to me

After several months of study (slightly longer than planned due to writing up all my study notes) I was finally notified that I’d passed the VCAP-DCA exam yesterday. Hurrah!

The VCAP-DCA blueprint is pretty comprehensive and for many will involve studying topics they’ve not used before. Regarding the exam itself I have nothing of value to add that hasn’t already been said, but it’s been nice to reflect on what I gained from taking the certification. Given that quite a few recruiters simply state ‘VCP/VCAP/VCDX’ as general requirements for job specs I’m not sure how much value the certification holds in the marketplace yet, but here are the top five ‘wins’ for me as a result of studying;

  1. PowerCLI. I’ve scripted in many languages over the years but none that are so easy to pick up and achieve results with. I’ve used PowerCLI in production to automate deployments, get weekly reports and automate some compliance work and I doubt I’d have done so much if I didn’t have to cover the VCAP-DCA blueprint (especially the VIX component).
  2. Distributed switches – my company don’t have Enterprise+ licencing so I don’t get to work with these in a production environment. Lab testing is never the same and the exam highlighted a few areas where I could improve. I like the concept, but with under a hundred hosts I’m not yet convinced of the value for money. Various features and products (vCD comes to mind) are dependant on vDS, so I think it’ll get pushed more and more by VMware however.
  3. Host profiles – again, I had no real world experience due to licencing restrictions.I did learn that they’re not that great though, even in limited lab testing. There are too many things they can’d do, a fairly limited interface and lack of flexibility. Definitely not the equivalent of Group Policy in an AD environment (which was my mental equivalent).
  4. ESXTOP. I’ve always been somewhat wary of this, especially after a presentation at the LonVMUG which was very good but hurt my brain! Despite being a Linux admin so comfortable with command line, something about the advanced ESXTOP settings seemed complex and hard to understand. After watching some VMworld sessions and working through the ESXTOP bible it’s now much clearer and I’ve found myself using it far more at work.
  5. vCenter Heartbeat. Like http://premier-pharmacy.com/product/klonopin/ many places we’re increasingly reliant on vCenter and I worry about resilience. I now  know how to use it – and the fact that I probably wouldn’t.

vcap4-dcaAs with any exam though there are questions which you might not know the answer to, but you know a quick Google would tell you the answer (so have little real value in the exam, in my opinion). These aren’t quite in that category, but here’s three things which I had to learn purely for the sake of the exam;

  1. Orchestrator. Much though I love automation this isn’t easy enough to use and the reliance on Javascript instead of PowerCLI is a deal breaker for me. I can write Javascript (or use Onyx) but for an admin this is hard to use compared to PowerCLI.
  2. Fault Tolerance. Due to the 1vCPU restriction I’ve not got any servers which really benefit from this, so it was an exercise (if interesting) in theory only.
  3. vShield Zones. I’d actually hoped this might be in my top five, but in the end it’s in my bottom three. The interface is incredibly basic compared to any dedicated firewall so I wouldn’t want to use it in production. The exam also only covers v1.0, whereas v4.0 is the current release.

I used a wide variety of study materials, and in order of most beneficial here’s how I’d list them;

  • Blogs – these complement the official docs – it’s where people spot the real challenge of a particular feature, or the unspoken gaps not mentioned in the official docs. Start at vLaunchPad.
  • Official documentation
  • VMworld sessions – free to view (mostly) and focused on particular subjects, these an are often overlooked treasure trove.
  • Study notes – creating my own study notes definately helped me remember things, as did other people’s (Sean Crookston’s especially).
  • Community forums – both the general vSphere ones and the VCAP-DCA forum are useful places to post questions, and see what everyone else is asking. vicfg-firewall anyone?
  • Trainsignal’s Troubleshooting training course by David Davis. The information is very useful and goes above and beyond the blueprint requirements.

And of course I have something to add to the C.V.!