PowerShell GUI VMware and FlashArray Storage Management Tool

Here is my storage manager for the FlashArray and VMware. Based on PowerCLI, but uses a front end GUI. Enjoy!

NOTICE THIS HAS BEEN DEPRECATED IN FAVOR OF THE POWERSHELL MODULE HERE:
https://www.codyhosterman.com/scripts-and-tools/pure-storage-powershell-vmware-module/

There are a variety of methods of managing VMware objects (VMFS volumes, VMs, VMDKs and RDMs) and the underlying snapshots to recovery or clone them. But often I get asked if I have a PowerShell (PowerCLI) script to do one or all of them. I have a bunch on my GitHub, but I decided a week or so ago to put something a bit more robust together. At first I was making it a standard interactive script, but it morphed into a GUI, using combo-boxes etc:

Continue reading “PowerShell GUI VMware and FlashArray Storage Management Tool”

FlashArray Host Group Creation PowerShell Script for VMware Clusters

New script to automatically create hosts groups on FlashArrays based on VMware ESXi clusters. This is a script I’ve had out for awhile but only recently revisited and realized it was way out of date and frankly, not very good. So I trashed most of it and re-wrote it. You can find it here:

https://github.com/codyhosterman/powercli/blob/master/createhostgroups.ps1

It is pretty self-explanatory I suppose, but it’s good to review the finer points before you run it. Continue reading “FlashArray Host Group Creation PowerShell Script for VMware Clusters”

FlashArray VMware Best Practices PowerCLI Scripts

I wrote a post recently on the updates made to the PowerCLI 6.3 R1 esxcli implementation, so the logical next step was to implement this new behavior into my PowerCLI scripts that use esxcli. I still have a few scripts to update, but my two best practice-related scripts are ready to go. The two scripts are:

  1. Script to check and set best practices. Download here:
  2. Script to just check best practices, and lists issues in a report. Download here.

While I was updating them for esxcli changes, I figured i might as well improve them too, so there are quite a few changes for both. Let’s take a look.

Continue reading “FlashArray VMware Best Practices PowerCLI Scripts”

ESXCLI updates in PowerCLI 6.3 R1

One of the changes in VMware vSphere PowerCLI 6.3 R1 was a much needed one: how the arguments are managed with esxcli commands. This was always a bit of a pain, especially for commands that have a lot of arguments. I won’t go into the detail on all of why/what of the changes here, as Alan Renouf already did that quite well here. So if you are unsure of the previous ugliness of esxcli in PowerCLI read that post before reading more here. Otherwise, continue on. I want to talk about some specific examples for storage-related commands that I use and many of our customers use quite commonly.

Continue reading “ESXCLI updates in PowerCLI 6.3 R1”

Semi-transparent failover with VMFS and Active/Passive Replication

So in a blog series that I started a few weeks back (still working on finishing it), I wrote about managing snapshots and resignaturing of VMFS volumes. One of the posts was dedicated to why I would choose resignaturing over force mounting almost all of the time.

An obvious question after that post is, well when would I want to force mount? There is a situation where i think it is a decent option. A failover situation where the recovery site is the same site as the production site, in terms of compute/vCenter. The storage is what fails over to another array. This is a situation I see increasingly common as network pipes are getting bigger.

Continue reading “Semi-transparent failover with VMFS and Active/Passive Replication”

VMFS Snapshots and the FlashArray Part I: Mounting an unresolved VMFS

This is part 1 of this 7 part series. Questions around managing VMFS snapshots have been cropping up a lot lately and I realized I didn’t have a lot of specific Pure Storage and VMware resignaturing information out there. Especially around scripting all of this and the various options to do this. So I put a long series out here about how to do all of this. Let’s start with what an unresolved VMFS is and how to mount it.

The series being:

  1. Mounting an unresolved VMFS
  2. Why not force mount?
  3. Why might a VMFS resignature operation fail?
  4. How to correlate a VMFS and a FlashArray volume
  5. How to snapshot a VMFS on the FlashArray
  6. How to mount a VMFS FlashArray snapshot
  7. Restoring a single VM from a FlashArray snapshot

Continue reading “VMFS Snapshots and the FlashArray Part I: Mounting an unresolved VMFS”

FlashArray UNMAP Script with the Pure Storage PowerShell SDK and PowerActions

I have officially decided to “retire” my UNMAP script that uses direct REST calls to find before and after capacity changes for given volumes. I am only updating the one that uses the Pure Storage PowerShell SDK from this point on–using this is much more robust, not tied to direct API versions and greatly simplifies managing the data in the script.clip_image006

I have also created a second version for use in the VMware Fling called PowerActions. This allows the script to be executed from the vSphere Web Client.

Continue reading “FlashArray UNMAP Script with the Pure Storage PowerShell SDK and PowerActions”

Querying SRM for Protected VMs with PowerCLI

I was recently asked how to query SRM for protected VMs and I decided it would make a good quick blog post. There is a great post here on using PowerCLI with SRM, but it doesn’t show the information to return per virtual machine information by default. Needs a bit more.

All it returns is a SRM-based virtual machine ID which doesn’t relate to what a user is probably looking for (a virtual machine name). So it needs a few more simple steps. The following script which can be found on my GitHub page here that does the following things:

  1. Connects to a vCenter
  2. Connects to SRM
  3. Creates a log folder with a time stamp in the name
  4. Iterates through each Protection Group
  5. Logs every virtual machine in that protection group

Continue reading “Querying SRM for Protected VMs with PowerCLI”