Automating Citrix PVS on Nutanix AHV with PoSH

PoSHWith the current announcement of running Citrix XenDesktop on Nutanix Acropolis Hypervisor I was really exited to start playing around with the options the Nutanix platform gives us to automate a lot of processes. Currently Nutanix provides a couple of ways to automate, one of them being good ol’ PoSH.

When we look at the current ways to interact with the Nutanix environment we basically can define 3 ways of doing so in a programmatically way:

  • REST API
  • CLI – ACLI & NCLI
  • Scripting interfaces (PoSH)

Both the scripting interfaces as the CLI follow the REST API, the REST API will be able to provide the full feature set of the Prism UI. This is important to understand as it will enable automation frameworks like Puppet, Chef, vRealize, etc to automate and orchestrate workflows within Nutanix.

Luckily Citrix PVS comes with PoSH as well, although the current implementation of the Citrix PVS PoSH cmdlets can be somewhat challenging I’ve been told that there will be a lot of focus on this in the newer release of PVS, which is available in TP. That being said, if you combine those two the easy to follow steps are as following:

  1. Create a target VM following your specifications
  2. Provide this target VM to our Image Service
  3. Run the provided script, it will search the image service for available images and it will clone the VM according to your needs.
  4. The script will then create a Target VM within the PVS console according to the naming scheme you have provided and it will fetch the MAC address from the VM and add it to the PVS console.

Although this is not fully integrated it gives you an idea of the capacities this platform has and how we can make things easier if we automate tasks.

The script:

 

Of course you’ll need to change the cluster IP and the PVS server IP from AAA.BBB.CCC.DDD and some other variables to your own environment but the rest should work out of the box. I realise that the script itself could be enhanced to be more flexible but this is more like a demonstration of the possibilities when we start combining PoSH cmdlets.

Special thanks goes out to Pankaj Sinha who helped out with some Q&A on the script.

The following two tabs change content below.

Kees Baggerman

Kees Baggerman is a Staff Solutions Architect for End User Computing at Nutanix. Kees has driven numerous Microsoft and Citrix, and RES infrastructures functional/technical designs, migrations, implementations engagements over the years.

One comment

  1. […] looking to unleash Citrix PVS on AHV today you’ll have to revert back to something like Automating Citrix PVS on Nutanix AHV with PoSH or Ryan’s scripting wizard PVS and AHV powershell wizard or use the MCS plugin to […]

Leave a Reply