PowerShell: XenServer Count Function

countvoncount

Intro

I’ve been hesitant to dive into XenServer PowerShell cmdlets, but there’s no rational reason to not do it. Citrix continues to make great strides in expanding and updating PowerShell for XenServer, PVS, and XenDesktop. Today, we’ll go over a function that queries an array of XenServer Poolmasters and returns the total VM count on each. The idea behind this function was to stop manually counting VM’s in XenCenter and to understand VM growth and XenServer Pool utilization.

NOTE: Thanks to The Scripting Frog for getting me most of the way there with this function.

xenservercount
The manual count of VM’s

XenServer and PowerShell?

It may seem weird to use PowerShell to perform queries of a Linux-based system, but such is the world we live in. I remember back in my day :). Apple was a joke, IBM ruled the PC market and Linux didn’t exist. Of course I still remember saving BASIC programs to a cassette deck.

th

The script will prompt for credentials which can be root or any XenServer administrator. Then you connect to each pool master in turn…

The important flags are -SetDefaultSession and -NoWarnNewCertificates. You must set the default session on each new XenServer connection, otherwise, the script will not know what pool master to query. The NoWarnNewCertificates flag prevents a prompt asking you to accept the new XenServer certificate (you can leave this out if you want this additional warning to let you know you’re connecting to a new XenServer).

Unless you can refer to your XenServers with a DNS name, you can do some quick translation to make your output more readable. I’m using a switch statement to replace the IP address with a XenServer name.

The rest is just getting all the VM’s (minus snapshots, templates, etc), counting them and putting the results into a custom PowerShell Object. Finally you disconnect from each XenServer and go to the next one.

The results…

XenServer VM Count
--------- --------
XenServerPool1 108
XenServerPool2 109

You can get this and so much more from my github.

Thanks for reading,
Alain Assaf

Advertisements

VDI Like a Pro: Announcing the State of VDI and SBC union survey 2018

vdi-like-a-pro-small

It’s that time again! No not Valentines Day! It’s time for the 2018 State of VDI/SBC Union Survey. Ruben Spruijt and Mark Plettenberg continue to drive one of the EUC industry’s largest and most valuable surveys. I encourage you to participate in this survey because it benefits all of us who deploy and manage EUC solutions.

Click here to take the VDI Like a Pro – “State of the VDI and SBC union” survey

Thanks,
Alain

Downloading Citrix App Layering (Unidesk)

unidesk_ww
Intro

About a week ago (April 3, 2017), Citrix released App Layering 4.1.0. This is the slightly rebranded Unidesk and Citrix is emphasizing (over-emphasizing based on some comments) that it…

Achieves app compatibility greater than 99.5%

I find it interesting that out of the gate, Citrix is positioning App Layering as a direct competitor/replacement for Microsoft App-V, which I believe has more success supporting many different types of applications (this is based on my years of experience with App-V and minutes spent with Unidesk 🙂 ). I always viewed Unidesk as a more comprehensive approach to delivering a fully realized, layered solution. But let’s face it, most Citrix administrators/engineers have to become application analysts/re-packagers/engineers in order to make applications work in a Citrix deployment. This blog will not dive into using App Layering, but instead will try and shine some light on actually downloading this “new” product from Citrix

Requirements

Note: The following is based on discussions with our Citrix sales engineer and the Unidesk website
  • You must be active on Select Service to use it.
  • You must have platinum licensing if you wish to run App Layering on-premises.
  • You must have a one of the following hypervisors
    • Citrix XenServer (6.5, 7.0, 7.1)
    • Microsoft Azure
    • Microsoft Hyper-V (at least 2012 R2)
    • Nutanix Acropolis
    • VMware VSphere (5.5.x, 6.0.x, 6.5.x)
  • SMB Network File Share Protocol
  • A network connection of 10GB between the Layering appliance and the file share
  • One of the following publishing platforms
    • Citrix MCS for Nutanix AHV
    • Citrix MCS for vSphere
    • Citrix MCS for XenServer
    • Citrix PVS 7.1, 7.6 – 7.9, 7.11 – 7.12 with recommended network speeds to the PVS Store of 10 GB.
    • Citrix XenApp and XenDesktop 6.5, 7.0 – 7.12
    • Microsoft Azure, with recommended network speeds to the Azure publishing location of 10 GB.
    • VMware Horizon View 6.x, 7.0.x (Note: View Persona Management is not supported with Elastic Layering)
  • A Citrix Cloud Account

How to Download

Login into your Citrix Cloud Account
unidesk1

Go down to Available Services and click Request Trial on App Layering
unidesk2

Once you receive an email from Citrix Cloud, log back into your account. Find App Layering and click Manage
unidesk3

On the App Layering screen, click Get Started
unidesk4
Install the Cloud Connector (This will be required if you do not have local resources to run the appliance).

Note: Installing the Cloud Connector will affect your existing Citrix Studio install. You will have to uninstall the Cloud Connector and Studio and then reinstall Studio if you installed the Connector accidentally or just to try it out.

unidesk5

Download the appliance
unidesk6

Install and Configure the Appliance
unidesk7
unidesk8

That’s all for now

I won’t cover the install and configuration of the appliance at this time. Hopefully, this helps shed some light on actually downloading the appliance. If you do not have Platinum Citrix licensing or Select, you can still download a trial from the Unidesk web site.

Thanks for reading,
Alain