Clone and connect Nutanix Volume Group using PowerShell

Hardev Sangera and I held a breakout session at Nutanix .Next on Tour in London. The session was predominately to demo’s of some of the new features released with AOS5.0. During the session we demonstrated how to present iSCSI storage to a physical workload and then subsequently take a clone of that data and so it could be used to perform development activities on.

Enabling a DBA or developer ‘live like’ data to work with, which  can take hours with traditional methods.

Rather than using the Prism interface to clone the volume group and the iScsi initiator in windows to connect to it, I wrote a PowerShell Script demonstrating the use of  API and the Nutanix PowerShell CMDlets.

Disclaimer : I’m not a professional coder so don’t rip it to shreds when you read it, as there are significant improvements that could be made and it is only to serve as an example of leveraging the Nutanix API.

 

The script to disconnect and remove the Volume Group…

 

Nutanix PowerShell Cmdlets

I’ve just been preparing for a Demo at the Nutanix .Next event in London which is on the 30th March 2017 – Link to register here http://events.nutanix.com/event/?id=1470024841-579ecc89d9db5-579f887683408.

One of the things I’m doing is cloning a Volume Group Presented by Acropolis Block Services. Im doing this by PowerShell so wanted a list of the commands. Just thought I’d share the command I used to obtain it.

 

Look out for the VG Clone Script once it is complete.

Add a Folder to the Write Cache drive of Multiple PVS Targets – PowerShell

I recently needed to create a folder on the Writecache disk for the persistence of Eventlog files. Unfortunatley the customer already had around 40 XenApp hosts deployed.

I wrote a script which can be run from a machine with the Citrix Powershell commandlets installed, ie DDC. This Script lists all the Targets in the site and pipes them to the create folder command.

Ensure you have enabled the Citrix Snapins first…

And heres the code I created…