So I just posted on deploying the Pure1 VM Analytics Collector via manual methods. But how about PowerShell? Well you are in luck! I’ve built a new cmdlet to help you with this.
For background on the OVA, check out this post:
https://www.codyhosterman.com/2019/10/vm-analytics-collector-now-an-ova/
To use my cmdlet, either install the PureStorage.FlashArray.VMware PowerShell module, or update it to at least the 1.2.4.0 release.
NOTE: I have added end-to-end configuration to this, so it can not only be deployed in PowerShell but configured and managed. Check it out:
Update-Module PureStorage.FlashArray.VMware
Or for new installs:
Install-Module PureStorage.FlashArray.VMware
I’ve added a new cmdlet called Deploy-PfaAppliance. Note that I didn’t call it collector or something, because we have bigger plans for this beyond just this application 🙂
The cmdlet takes in a bunch of things. A host or cluster to deploy to. A datastore. A port group for the network. An authorization key (which you can learn about in this post). And networking information. This is either DHCP or static.
First, I need to grab the information I need:
For this ova, I will use DHCP. So the command to deploy would be:
Deploy-PfaAppliance -vmName $vmName -authorizationKey $authkey -datastore $ds -portGroup $pg -vmHost $esxi -dhcp
The cmdlet will spit out some status during the process (which can be hidden with the -silent parameter).
During you will see the deploy task in vCenter. Full process takes about 3 minutes or so, but it depends on your download speed of the OVA.
When done it will return the virtual machine object that gets created.
What is the default process? Well:
- It downloads the OVA. You can download it yourself too if you want to and pass in the download location in the -ovaLocation parameter.
- It will then confirm the download completed (by default in your temp directory) or confirm the file location you passed in exists
- Then it will configure the inputs for the OVA deploy and then deploy the OVA.
- It will deploy it to the host you said, or if you passed in a cluster it will choose one online available host
- It will then power-on the VM
- If the OVA was downloaded by the cmdlet (not by you manually) it will then delete it permanently from the temp folder.
- Then return the VM object
If you do not use DHCP you can specify the network settings manually like:
Deploy-PfaAppliance -vmName $vmName -authorizationKey $authkey -ipAddress 10.21.202.80 -netmask 255.255.255.0 -gateway 10.21.202.1 -dnsPrimary 10.21.202.10 -hostName ovatest.purecloud.com -datastore $ds -portGroup $pg -vmHost $esxi
Enjoy!!
The port group parameter didn’t seem to work with distributed port groups. I had to create a standard vswitch and port group to get it to work.
Deploy-PfaAppliance : Cannot process argument transformation on parameter ‘portGroup’. Cannot convert the “dvspg-name” value of type
“VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.DistributedPortGroupImpl” to type
“VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroup”.
Oh gross. I will fix this. Mind opening an issue here: https://github.com/PureStorage-OpenConnect/PureStorage.FlashArray.VMware/issues So I can track it. If you dont that okay, I will, just about to hop on a flight
Created. Thanks!
Fixed! thank you. Simple change, just agnosticized the parameter so the type doesnt specifically refer to only standard port groups.