Much Love for PowerShell and PowerCLI at VMworld

This year was my 7th time attending VMware’s mega conference, VMworld, and each year has a different attitude, feeling, and set of takeaways. My first few times attending were mostly focused on new or improved features to the core hypervisor, along with products that were being introduced to the ecosystem such as Horizon and vCloud. Most of the conversations I listened into were about compute, storage, and network maximums being raised; limitations being diminished or removed; and how we could cram more virtual machines onto a piece of hardware.

Recently, the conference has been trying to figure out how to serve hundreds of thousands of operationally-focused engineers in a world that is ever evolving into cloud, serverless (Functions as a Service), and infrastructure as code. The introduction of VMware {code} is a great start, as was the inclusion of a DevOps area in last year’s show. I think it’s enough to get engineers aware of different worlds and perspectives without alienating the core audience. The introduction of a hackathon was a nice touch; I only wish I had the time to attend.

One really strong trend that caught my eye was how dominate automation topics were in the content catalog. Specifically around PowerShell and PowerCLI. These have made it into the show in the past, but mostly as side pieces. I felt like this year, VMworld had a strong showing for Microsoft’s automation framework. Especially since the two sessions I submitted (which focus on PowerShell) were both accepted and both ended up making the Top 10 Sessions list. In fact, “Enforcing a vSphere Cluster Design with PowerCLI Automation – INF8036” filled the largest room at the show and “Getting Started with PowerShell and PowerCLI for Your VMware Environment – INF8038” was repeated twice! Mind blown.

Presenting with the infamous Duncan Epping. A bucket list item.
Presenting with the infamous Duncan Epping. A bucket list item.

Greater Trends

What does this all mean? While I’m certainly flattered that so many folks wanted to hear about automation-centric topics, I think it underlines a greater trend towards both automation and infrastructure as code. The Vester project, featured in the INF8036 session, is all about abstraction of a vSphere environment into code. This includes validation and, more importantly to me, remediation of drift. It’s not enough to simply state that an environment differs from a declarative configuration – something must be done about it. Up until now, we’ve relied on human hands to fix things. But, why?

While it’s difficult to take a giant leap from managing a virtualized infrastructure to running functions in a cloud, it’s much less so to take smaller steps from manually configuring things to trusting a little bit of code to do it. This was the main crux behind my desire to present on PowerShell – it’s an incredibly easy way to get started with some really difficult topics. I’m less concerned about learning a tool, specifically, than I am learning an idea. Once you’re able to conceptualize a world where the truth of infrastructure lives outside of the actual infrastructure, IT starts to get really, really interesting again. There are a million ways to do this – Vester is just an easy way, not necessarily the best way.

On top of all this, PowerShell is now available in Mac OS X and Linux as an open source project. While I don’t really use either of these platforms, it’s great news. Much like how I can use Python on my Windows machine, others can now use PowerShell on theirs (if they desire). But it doesn’t stop there – during “The Power Hour: Deep Dive, DevOps, and New Features of PowerCLI – INF8092” the duo of Alan Renouf and Luc Dekens demonstrated the use of PowerCLI within these platforms, along with a commitment to completely re-write PowerCLI to be a full module (parts of it are still snapins). This is important, because snapins are legacy code that have no real future. It also means that we will soon be able to just grab a copy of PowerCLI (and other modules) directly from something like the Docker Hub for on-demand scripting. No more logging into MyVMware and running through a thick installer required. Groovy, right?

A sincere thank you to everyone who attended my sessions!
A sincere thank you to everyone who attended my sessions!

Next Steps

This is a tough one. There’s a lot of talented folks out there and I think they are largely over worked. How does one get started? I’d suggest taking the time to automate really simple things – the low hanging fruit – using PowerCLI. This will build confidence and gain valuable experience by way of practice. It’s also kinda fun to write a little bit of code into a script and see it do things for you.

In INF8038, I showed a code snipet that did a simple task – it checked the state of the DRS Automation Level. If it didn’t match a defined variable, we also wrote a bit of code to fix it. If you missed it, check out the video for INF8038. A “homework assignment” that was given was to do the same for other configuration values such as High Availability.

Other ideas:

  • Assign a customization specification to a cloned VM
  • Get the total amount of RAM and CPU available in a cluster
  • Report on a list of VMs based on an attribute or tag value

I believe that once you gain these valuable skills, and start working with declarative configuration techniques, you’ll have much less friction starting to work with other tools like vSphereDSC, Ansible, and even vRealize Automation. And once the entire suite of PowerCLI functions are baked into a module, there’s a brave new world of possibilities open before us all.