Finding Horizon View local entitlements using PowerCLI

Intro

In a previous post i mentioned that finding the entitlements for a user from the Horizon side of things can be a bit of a hassle. If only active directory groups are used its dead easy: just use the Active directory commands for those groups. If the groups are used for multiple pools and if you have assigned desktops things get a bit more complicated. For now I will only concentrate on the local pod without global entitlements.

getting that info

To get started the vmware.hv.helper module has the get-hventitlement command. As almost always a very useful one but it has some flaws. First it requires full domainname\username or username@fulldomainname.

For example

get-hventitlement -user magneet.lab\user1

or

get-hventitlement -user user1@magneet.lab

Both work but

get-hventitlement -user magneet\user1

gives this message: Get-HVEntitlement: No entitlements found with given search parameters.

At least

get-hventitlement -user user1

If you add the -type group to this command you get all group entitlements

gives an error message that the -user argument does not match the “^.+?[@\\].+?$” pattern. With this last one you at least get an error so you know where to look but not displaying any entitlements is an issue for me.

So, back to the results of these commands, I have assigned the user user1 the following rights

  • Pool04 directly and by using a group
  • directly on a single desktop in pool04.
  • Pool01 only by group.
  • Paint rds app by group
  • Calculator rds app direct
  • Wordpad rds app by both group & directly

When using the get-hventitlement without anything else it doesn’t seem to show a lot of usable things

get-hventitlement -user user1@magneet.lab

If you put this between brackets followed by a period and one of the properties a bit more info is shown.

(get-hventitlement -user user1@magneet.lab).base

Some information about the user, not very usable the session data property gives some information about current sessions (none at the moment)

With the localdata property it looks like we hit the motherload jackpot thingy

(get-hventitlement -user user1@magneet.lab).localdata

Very good, a lot of id’s so what can we do with those? For now I will put this into $entitledids.

$entitledids=(get-hventitlement -user user1@magneet.lab).localdata

I read something about get-hvinternalname when checking out the module, sounds usable.

get-help get-hvinternalname -examples

Ah, so this needs an entityid as input, a machine is an entity so let’s try it. This might need a foreach though because the output gave machines and not machine.

foreach ($Entityid in ($entitledids.machines)){get-hvinternalname $Entityid}

Damn, that’s not usable, let’s double-check with the other id types

foreach ($Entityid in ($entitledids.desktops)){get-hvinternalname $entityid}
foreach ($Entityid in ($entitledids.desktopuserentitlements)){get-hvinternalname $entityid}
foreach ($Entityid in ($entitledids.aplicationuserentitlements)){get-hvinternalname $entityid}
foreach ($Entityid in ($entitledids.applications)){get-hvinternalname $entityid}

The ones we need are readable, couple of them not but I don’t those will be missed.

The missing machine name is actually easy to solve by doing an api call:

foreach ($Entityid in ($entitledids.machines)){($services1.machine.machine_Get($Entityid)).base}

Conclusion

Because this is rather easy to use and since I didn’t have a direct use case for that I decided not to create a complete script. With get-hventitlement, get-hvinternalname and maybe an api call here or there it’s very easy to pull the information about which account or groups have what rights. To see if a user belongs to a group can easily be done with any of the multitude of scripts for that here’s a good example of those.

 

Adding manual desktops in Horizon View and assigning them using Powercli

A while ago I received a question from Geoffrey O’Brien if I knew how to add a desktop and assign it using PowerCLI. I started building this using the api’s and after a lot of hours, cussing, swearing running into weird problems I actually got it working. When I was busy writing that blog post and wanting to add this to the vmware.hv.helper module I found out that both functions had already been added back in July! I just ignored, or better, forgot about the module for a while because at first it lacked a lot of options.

Key ingredients to do this are add-hvdesktop and set-hvmachine commands. For this post I will assume that the user is already entitled to the pool. This is something that can be checked but because of some ‘things’ it will be a separate post. Please be aware that if you combine these commands in a single script that there needs to be some time for the connectionserver to actually add the desktop.

First check if the system isn’t already registered with this this pod:

get-hvmachine -machinename MACHINENAME

If the desktop is already added somewhere and you know the pool it can be removed with the api (issue logged to create remove-hvmachine here)

$services1.desktop.Desktop_RemoveMachineFromManualDesktop((get-hvpool -poolname POOLNAME).id, (get-hvmachine -machinename MACHINENAME).id)

Since the desktop can’t be found yet it can be added by:

add-hvdesktop -poolname POOLNAME -machines labw701

Did you notice the extra S in the -machines part in the command? Multiple machines can be added by separating them with a comma.

To assign the user to the machine things get a it more complicated. We need to set an advanced option for that with set-hvmachine. Why an advanced option? It seems like assigning a single machine isn’t considered an entitlement! The module has no option to grab the horizon userid for you so we need to use the api’s for that (request to add it has been made here)

$username="USERNAME"
$queryService = New-Object VMware.Hv.QueryServiceService
$defn = New-Object VMware.Hv.QueryDefinition
$defn.queryEntityType = 'ADUserOrGroupSummaryView'
$defn.filter = New-Object VMware.Hv.QueryFilterEquals -property @{'memberName'='base.name'; 'value' = $userName}
try     {
        $userid=($queryService.queryservice_create($Services1, $defn)).results[0].id
        }
catch   { 
        throw "Can't find $Username, exiting" 
        }

the username has to be exact samaccountname from your active directory otherwise it will not be able to find the user.

so now we do have the userid the base.user needs to be updated.

get-hvmachine -machinename MACHINENAME | set-hvmachine -key base.user -Value $userid

before:

the command:

After:

And since the user has been assigned something now it has it’s own userorgroupid as you can see and that can again be check with the api’s. First put the userorgroupid into a variable and then use that against the aduserorgroup service.

$resultuserid=(get-hvmachine -machinename MACHINENAME).base.user
($services1.AdUserOrGroup.AduserOrGroup_Get($resultuserid)).base

This is the script you can use as a base:

$username="username"
$poolname="Poolname"
$machinename="machinename"
$connectionserver="connectionservername"

$hvserver1=connect-hvserver $connectionserver
$Services1= $hvServer1.ExtensionData

$queryService = New-Object VMware.Hv.QueryServiceService
$defn = New-Object VMware.Hv.QueryDefinition
$defn.queryEntityType = 'ADUserOrGroupSummaryView'
$defn.filter = New-Object VMware.Hv.QueryFilterEquals -property @{'memberName'='base.name'; 'value' = $userName}
try     {
        $userid=($queryService.queryservice_create($Services1, $defn)).results[0].id
        }
catch   { 
        throw "Can't find $Username, exiting" 
        }

add-hvdesktop -poolname $poolname -machines $machinename

start-sleep -s 10

get-hvmachine -machinename $machinename | set-hvmachine -key base.user -Value $userid

As always the most up to date version of the script can be found on Github.

 

get-hvmachine only finds 1000 desktops

Edit: this is supposed to be fixed already in the vmware.hv.helper module so make sure you have the latest version of it. I was late in writing it out :@

A while ago I wanted to list all desktops in use from one of our Connection servers. After several tries I kept having issues in finding some of the desktops. This prompted me to do a count on the amount with

(get-hvmachine).count

and it turned out that I received only a 1000 results while I had over 1100+ in that pod. After talking to some people in the VMware Code slack it turned out that this is a limit in the query system that the View API uses. This was verified by running the query myself instead of using the module. Sadly I forgot to make screenshots when I did this and don’t have access to this environment anymore.

$hvServer1 = Connect-HVServer -Server CONNECTIONSERVER
$Services1= $hvServer1.ExtensionData
$queryService = New-Object VMware.Hv.QueryServiceService
$defn = New-Object VMware.Hv.QueryDefinition
$defn.limit= 10000
$defn.maxpagesize = 10000
$defn.queryEntityType = 'MachineNamesView'

$QueryResults = $queryService.queryservice_create($Services1, $defn)
$queryresults.count

Despite setting the maximums to 1000 or not even filling them I always ended up with 1000 max. After again going over this on Slack I decided to create a do until to pull these results with each time a maximum of 1000 results until no results are received..

$hvServer1 = Connect-HVServer -Server CONNECTIONSERVER
$Services1= $hvServer1.ExtensionData
$queryService = New-Object VMware.Hv.QueryServiceService
$offset=0
$defn = New-Object VMware.Hv.QueryDefinition
$defn.limit= 1000
$defn.maxpagesize = 1000
$defn.queryEntityType = 'MachineNamesView'
$output=@()
do{
$defn.startingoffset = $offset
$QueryResults = $queryService.queryservice_create($Services1, $defn)
if (($QueryResults.results).count -eq 1000){
$maxresults=1
}
else {
    $maxresults=0
}

$offset+=1000
$output+=$queryresults
}
until ($maxresults -eq 0)

($output.results).count

For this I did make a screenshot:

As you see it kind of stacks the results but the count is ok so I should be able to incorporate this into other scripts.

The VMware Labs flings monthly for November 2017

A couple of days late this time but here is your monthly dose of Flings! No new ones but seven flings have been updated by VMware labs this month. The Horizon Toolbox, vSphere HTML5 Web Client and the ESXi Embedded host client make their almost monthly appearances while at least two other received updates in a long time: Cross vCenter Vm Mobility – CLI and the VMFork for pyVmomi. The HCIBench and Desktop Watermark also received an update.

 


ESXi Embedded Host Client

By now we should all be using the embedded host Client unless you are forced by greater powers to run on some ancient version of ESXi.

Version 1.24.0 build 7119706 (Fling 19) – November 13, 2017

Minor features and bugfixes
  • GeneralFix failure to deploy OVF/OVA image with disks attached to multiple disk controllers
  • Address race condition when adding new Network Adapter to virtual machine
  • Allow datastore browser to browse VVOL datastores
  • Address timeout issue in datastore browser when client receives unknown datatypes from host
  • Address issue disabling autostart for a VM
  • Allow downloading of flat VMDK files in datastore browser
  • Show the correct VMware Tools version string in VM summary
  • Show pager in VM editor when VM has many hard disks
  • Support OVF properties with pre-defined values, showing dropdowns
  • Allow modifications of root user’s permissions
  • Support for selecting dependent PCI devices when enabling passthrough
  • Other minor bug fixes


vSphere HTML5 Web Client

Like always the HTML5 Web Client received multiple updates in November so the changelog is rather long.

Fling 3.29 – Build 7157335

New Features

  • Configure traffic filtering and marking rules on distributed port groups
  • Export and import distributed switches and distributed port groups

Improvements

  • Configure the policies of distributed port groups inside the New Distributed Port Group wizard

Bug Fixes

  • Fixed an error when trying to edit the settings of VMs with failed installation or update of the VM tools
Fling 3.28 – Build 7110681

New Features

  • Configure advanced CPU Identification Mask
  • Select PVRDMA adapter type for a VM network

Improvements

  • Thanks to the fling users who gave the steps to replace the certificates for FAMI UI running at port 5490, added these instructions to v4 of “Create a new certificate for a HTML5 client fling” document

Bug Fixes

  • Licensing views should be visible for 6.0 VC/PSCs
Fling 3.27 – Build 7055108

New Features

  • Popout the Datastore File browser
  • License Details
  • View License VC assets (Read-only)

Improvements

  • Set license name in the Add License workflow

Known Issues

  • License UI might not work against 6.0 VCs, in particular Windows VCs/PSCs.
  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.


VMFork for pyVmomi

This fling has been around for a while and if you ever wanted to fork your VM’s without having to study PowerCLi then this one is for you. It has a warning that it only supports vSphere 6.0 and 6.5 and no newer releases but hey there are none yet so please use it if you like.

Changelog

Version 1.0.3

  • Fixed a bug that prevented CreateChildSpec from being referenced in versions of 6.5 of pyVmomi
  • Updated the requirement to include pyVmomi 6.5 only, up from 6.0, due to a dependency issue

Version 1.0.2

  • Bug fixes & Improvements


Desktop Watermark

Want to make sure screenshots will show that it is your Image being used then the Desktop Watermark fling can be the tool of choice. It can be used for auditing or exhibition purposes or any other way you like. And yes that type in the changelog is a straight copy/paste from the site.

Changelog

Build 1027

Addition

  • Password protection for the configuration & uninstllation


Cross vCenter VM Mobility – CLI

Ever needed to migrate or clones VM’s form one vCenter to the other while there they are not linked? then the Cross vCenter VM Mobility – CLI might be a good tool in your toolbox.

Changelog

Version 1.4

  • While migrating multiple vms with destination network option, only one vm used to get migrated.This issue has been fixed.


HCIBench

Need to benchmark a Hyperconverged Infrastructure? VDbench is one of the tools to use and VMware labs create the HCIBench to automate this tool. It received a couple of updates since my last post about it.

Changelog

Version 1.6.5.1

  • Enhanced IP segment selection
  • Set open file limit to 4096
  • Updated vm-tools to the latest version
  • Bug fixes

Version 1.6.5

  • Enhanced 95th percentile calculation.
  • Added Curve and Multi Run calculation.
  • Added SSH Service validation.
  • Replaced DHCP Service with Static IP Service.
  • Added IP conflict check.
  • Fixed bunch of bugs.
  • Change the default client VM RAM from 4GB to 8GB


Horizon Toolbox

Being an EUC guy myself this is one of my favorites. The Horizon Toolbox adds some very good tools for servicedesk and operations employees.

Changelog

2017 Nov 30

  • Add a new “Export” button to the clients table

 

Updated and new VMware Labs Flings for Oktober 2017

“Listen very carefully; I shall say this only once.”

Even after years this for me is one of the best quotes from any comedy series. Allo Allo always was so much fun to watch even though it looks pregistoric these days in video quality. For the people who don’t know Allo Allo please check out Michell from the resistance saying it herself over here. This months version of this post has two new flings and two updated ones. As almost always the vSphere HTML5 Web Client makes an appearance with the Horizon Toolbox as secondant, as you can see they have dropped the version number for the toolbox. New ones are the Blockchain on vSphere and the Desktop Watermark.

[sta_anchor id=”new” unsan=”New” /]

New Flings

[sta_anchor id=”watermark” unsan=”Watermark” /]

Desktop Watermark

Desktop Watermark is a Windows native application that adds a watermark to a desktop for Virtual Desktop Infrastructure (VDI) auditing or exhibition purposes. A watermark has the ability to be visible or invisible. Invisible watermarks, seen in the screenshot, can be revealed by a tool bundled in the Fling. The tool should be configured by an administrator and enforced on the end user’s desktop.

Changelog
Build 1019
Issue Fixes
  • Windows 10 – Installation failure on some machine with domain account
  • Issue fix – Windows 10 – During uninstallation the service is not automatically stopped

[sta_anchor id=”blockchain” unsan=”Blockchain” /]

Blockchain on vSphere

Blockchain is an emerging technology which has been gaining traction globally throughout the past few years. Industries like finance, logistics, and IoT are actively working on research and pilot projects using blockchain.

Fabric is a sub project under Hyperledger (a LinuxFoundation project), it is probably the most mature blockchain solution available now for business use cases.

The mission of Blockchain on vSphere is to provide an end-to-end blockchain solution, from IaaS, to Blockchain platform and Blockchain applications. It allows organizations to quickly collaborate and evaluate the new business models and processes by using the decentralized blockchain technology.

By using BoV, blockchain developers can quickly set up an environment to build and test their blockchain applications.

Changelog

Not yet

[sta_anchor id=”updated” unsan=”Updated” /]

Updated Flings

[sta_anchor id=”toolbox” unsan=”Toolbox” /]

Horizon Toolbox

Good old Horizon toolbox as said dropped its version number but continues to give you some features that the regular View Admin doesn’t have. Auditing on client versions, snapshots, usage and others are the great additions this tool gives.

Changelog

2017 Oct 12

  • Auditing – Clients are enhanced
  • Horizon 7.3.1 is supported
  • Some bugs are fixed

[sta_anchor id=”webclient” /]

vSphere HTML5 Web Client

What do I need to say about this one? Just update you’re existing version and enjoy this almost perfect vSphere client.

Changelog
Fling 3.26 – Build 6984758

New Features

  • License Products Details
  • Add New License action

Improvements

  • Enhanced the performance of the Datastore File Browser

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.
Fling 3.25 – Build 6929189

New Features

  • Edit the properties and policies of distributed ports
  • Licenses list
  • License Products list (Read-only)
  • Rename and Remove License action
  • You can now deploy VM from a VM template by choosing New VM wizard > Deploy from template > Data center tab

Improvements

  • Rescan storage action is done in parallel when is executed on Cluster or Datacenter level
  • Replication groups can be managed through Edit VM Storage Policy action
  • Showing the number of pending upload sessions and size uploaded in Datastore File Browser

Bug Fixes

  • Template icon missing issue is resolved
  • After creating some Tags or accessing the Content Library and leaving the H5 client idle, the UI starts to spin and fails to display requested info. The following error starts to appear constantly: “The query execution timed out because of a back-end data adapter ‘com.vmware.vise.data.adapters.core.DataServiceCoreAdapter’”. This bug is fixed in this release and the time out error should no longer appear.

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.
Fling 3.24 – Build 6862396

New Features

  • Ability to customize all network properties, incl. default gateways, when applying GOS customization spec to a VM (during cloning or customizing GOS on existing VM)
  • Add NVMe controller for an existing VM or for a new VM

Improvements

  • Enhanced Compatibility details view in VM provisioning wizards

Known Issues

  • Fling appliances pointed to vCenter 6.5 seems to have timeout issues. These issues are being investigated and are not related to fling itself. In some cases, restart the Fling Appliance could solve this problem
  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.

Removing faulty Horizon desktops using PowerCLI

So last week there where a couple of posts on vmtn about people wanting to automatically removing or refreshing faulty Horizon desktops. With faulty I mean desktops in Agent Unreachable or in error state or whatever status are available. Since this was something i had been investigating anyway I decided to make a script for it that had separate menu’s for the status the desktop needs to be and to pick the desktop to be deleted. The latter part can be rebuild to do all those desktops at once  in case something breaks pretty badly during a recompose of the pool.

The largest part of the script is for creating the menu’s. Since the amount of returned desktops is variable and names differ it’s not possible to use a static menu. Instead I have used a menu structure created by Roman Gelman and that can be found inside this script on github. The part that gets things done i have listed below. The $spec array doesn’t need to be created but it is required in the API call to remove the desktop, Powershell assumes everything true by default when it’s empty but it just has to be called otherwise you will get a big fat red error. To remove multiple desktops at once machine_deletemachines needs to be used with an array filled with desktop id’s and $spec.

$spec = New-Object VMware.Hv.machinedeletespec
$spec.deleteFromDisk=$TRUE

$desktops=@()
$desktops=get-hvmachine -state $targetstate
$selectdesktop=@()
foreach ($desktop in $desktops){
    $selectdesktop+= New-Object PSObject -Property @{"Name" = $desktop.base.name
    "ID" = $desktop.id;
    }
}

$selectdesktop=write-menu -menu ($desktops.base.name) -header "Select the desktop you want to remove"
$removedesktop=$desktops | where {$_.base.name -eq $selectdesktop}


try {
	$services1.machine.machine_delete($removedesktop.id, $spec)
	#$services1.machine.machine_reset($removedesktop.id, $spec)	
	write-host "$selectdesktop will be marked for deletion" -ForegroundColor Green
}
catch {
	write-host "Error deleting $selectdesktop" -ForegroundColor Red
}

As always the complete script can be found at Github where it will also be updated. This is how it looks in the end:

Update

After the comment below I decided to create the script to delete all desktops in a certain state. It’s a variation of the script above, just a bit shorter. Again it can be found on Github. Please be aware that due to a limitation in get-hvmachine both these scripts will only handle 1000 desktops at a time. It is safe to just repeat the script to do the rest.

https://github.com/Magneet/Various_Scripts/blob/master/remove_faulty_VDI_desktop.ps1

https://github.com/Magneet/Various_Scripts/blob/master/remove_multiple_faulty_VDI_desktops.ps1

New and updated VMware flings for September 2017

Intro

No WWE quotes,clips or sounds this month. So here I am reporting from couch central that there have been three updated flings in September. One steady name in this monthly post has been the vSphere HTML5 Web client but don’t underestimate the VMware OS Optimization Tool that is been in here a couple of times already as well. A new name is the Horizon Migration Tool, while it’s been there for quite some time it doesn’t get a lot of updates but it gets them and that’s awesome.

New Flings

None, nada, nothing, you can’t expect to have a new one every month do you?

Updated Flings

[sta_anchor id=”horizonmigrationtool” unsan=”Horizon_Migration_Tool”]Horizon Migration Tool[/sta_anchor]

The Horizon Migration Tool has been created to help companies migrate from Citrix to Horizon View.

Changelog

Version 3.0.0

  • Supports Citirx to Horizon 7.2 migration
  • Added Citrix PVS Desktop pool migration to Horizon 7.2
  • Added Citrix Dedicate MCS Desktop Pool migraiton to Horizon 7.2 as manual pool, linked-clone pool or instant clone pool
  • Fixed Bug: XenApp applications with customerized path includes spaces will migrate properly.

[sta_anchor id=”osot”]VMware OS Optimization Tool[/sta_anchor]

Like I said before the VMware OS Optimization Tool  is THE tool to use when you want (and you need to!) optimize any Golden Image. No matter if it’s build for VDI,RDS or even physical desktops this is THE go to tool for that.

Changelog

September 20, 2017

  • Supports new mode for optimization item: display-only
  • Supports more easy information retrieval. For example, installed product version, service current status

[sta_anchor id=”html5webclient”]vSPhere HTML5 Web Client[/sta_anchor]

Clearly the vSphere HTML5 Web Client is getting a lot of updates. In the August version of this post the newest was 3.20 while we’re at 3.23 at the moment. I will give all updates, fixes and known issues since then.

Changelog
Fling 3.23 – Build 6682372

New Features

  • Download folder from the File Browser

Improvements

  • DRS groups can be filtered by member.
  • Replication group are shown on the VM Storage Policy portlet

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.
Fling 3.22 – Build 6613965

New Features

  • The list of software packages installed on a host can be viewed (for ESXi version 6.5)
  • Edit Video Card information for a VM

Bug Fixes

  • Fixed few bugs related to snapshots

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.
Fling 3.21 – Build 6555866

New Features

  • Create and edit VM customization specifications with custom network configurations
  • Edit/Clone Storage Policy Component
  • Datastore capability sets (Datastore > Configure > Capability sets)
  • Create, edit and delete Link Aggregation Groups on Distributed Switches

Improvements

  • Confirmation on logout when there is upload file task in progress
  • Quick filter is introduced in the network selection dialog at Edit VM Settings > Network Adapter > Browse. It replaces the per-column filtering.
  • Enable/disable IPv6 on ESXi hosts.
  • Shares information is now available on Resource Allocation views for clusters and resource pools.
  • ESXi hardware health: when deployed against 6.5 vCenter, timestamps for sensor readings are displayed.

Bug Fixes

  • Cluster > Monitor > vSphere HA > Heartbeat now displays the actual set of datastores used by HA (used to display only the user-configured datastores)

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.

Horizon view vCheck : Pool Overview plugin

So one of the things still missing in the Horizon View vCheck was a plugin that simply gives an overview of all Pools with their status. In short what I am talking about is a translation from this view:

Although this sounds easy there where a lot of challenges for this one. First of all there are three separate pool types: Automated,Manual and RDS and all of them have subtypes like VIEW_COMPOSER,VIRTUAL_CENTER,FULL_CLONES,INSTANT_CLONE_ENGINE,UNMANAGED or RDS and not all of these subtypes are available for all pool types. This gives a lot of options that need to be separated for the pool types. Also the VIRTUAL_CENTER subtype is used for both manually added desktops that reside on a vSphere environment and for an automatic pool creating full clones. The FULL_CLONES subtype I haven’t been able to create in my lab yet.

Further outputs like true, false or any of the subtypes above weren’t clear enough for me to use as output. For this I learned a new trick in my book called switch.

switch ($source)
		{
			VIRTUAL_CENTER {$sourceoutput="vCenter Managed Desktop"}
			FULL_CLONES {$sourceoutput="Full Clones"}
			VIEW_COMPOSER {$sourceoutput="Linked Clones"}
			INSTANT_CLONE_ENGINE {$sourceoutput="Instant Clones"}
			UNMANAGED {$sourceoutput="Non-vCenter Desktops"}
			RDS {$sourceoutput="RDS Desktops"}
			{$_ -eq "VIRTUAL_CENTER" -AND $pool.type -eq "Automated"} {$sourceoutput="Full Clones"}
			{$_ -eq "VIRTUAL_CENTER" -AND $pool.type -eq "MANUAL"} {$sourceoutput="Manually Added vCenter Managed Desktops"}
			default {$sourceoutput="No Source data available"}
		}

Some documentation for the switch command can be found here but what it in short does is match the variable u use as input and sets or gives some output based on that. Also it can do a comparison as in above example so I was able to distinguish between Full Clones and Manually Added vCenter Managed Desktops. One thing to be aware of is that it will go trough the complete list. At first I had the two lines with the comparison in it at the top but that got overwritten since below it VIRTUAL_CENTER was recognized and the $sourceoutput would be based on that.

The Automated and Manual pools use a very similar set of code, the biggest difference is that one gets the data from the AutomatedDesktopData propertywhile the other gets it from the manualdesktopdata property.

	if ($pool.type -eq "Automated"){
		$Automaticassignment=$pool.AutomatedDesktopData.UserAssignment.AutomaticAssignment
		switch ($Automaticassignment)
		{
			$TRUE {$Automaticassignmentoutput="Automatic"}
			$FALSE {$Automaticassignmentoutput="Manual"}
			default {$Automaticassignmentoutput="No Assignment Status Available"}
		}
		$Pooloverview+=New-Object PSObject -Property @{"Name" = $pool.base.name;
			"Displayname" = $pool.base.DisplayName;
			"Description" = $pool.base.Description;
			"Status" = $poolstatusoutput;
			"Provisioning" = $ProvisioningStatusoutput;
			"Type" = $pool.type;
			"Source" = $sourceoutput;
			"User_Assignment" = $pool.AutomatedDesktopData.UserAssignment.userassignment;
			"Assignment_Type" = $Automaticassignmentoutput;
			}
		}
	elseif ($pool.type -eq "MANUAL"){
		$Automaticassignment= $pool.manualdesktopdata.UserAssignment.AutomaticAssignment
		switch ($Automaticassignment)
		{
			$TRUE {$Automaticassignmentoutput="Automatic"}
			$FALSE {$Automaticassignmentoutput="Manual"}
			default {$Automaticassignmentoutput="No Assignment Status Available"}
		}
		$Pooloverview+=New-Object PSObject -Property @{"Name" = $pool.base.name;
		"Displayname" = $pool.base.DisplayName;
		"Description" = $pool.base.Description;
		"Status" = $poolstatusoutput;
		"Provisioning" = $ProvisioningStatusoutput;
		"Type" = $pool.type;
		"Source" = $sourceoutput;
		"User_Assignment" = $pool.manualdesktopdata.UserAssignment.UserAssignment;
		"Assignment_Type" = $Automaticassignmentoutput;
			}
		}

The RDS block gives a totally different view though. The information had to be pulled from the farms that are the backend for the desktops.

	elseif ($pool.type -eq "RDS"){
		$source=($services1.farm.farm_get($pool.rdsdesktopdata.farm)).source
		$ProvisioningStatus=($services1.farm.farm_get($pool.rdsdesktopdata.farm)).automatedfarmdata.VirtualCenterProvisioningSettings.enableprovisioning
		switch ($source)
		{
			VIEW_COMPOSER {$sourceoutput="Linked Clones RDS Hosts"}
			INSTANT_CLONE_ENGINE {$sourceoutput="Instant Clones RDS Hosts"}
			default {$sourceoutput="Manually Added RDS Hosts"}
		}

		switch ($ProvisioningStatus)
		{
			$True {$ProvisioningStatusoutput="Enabled"}
			$False {$ProvisioningStatusoutput="Disabled"}
			default {$ProvisioningStatusoutput="N/A"}
		}

		$Pooloverview+=New-Object PSObject -Property @{"Name" = $pool.base.name;
		"Displayname" = $pool.base.DisplayName;
		"Description" = $pool.base.Description;
		"Status" = $poolstatusoutput;
		"Provisioning" = $ProvisioningStatusoutput;
		"Type" = ($services1.farm.farm_get($pool.rdsdesktopdata.farm)).type;
		"Source" = $sourceoutput;
		"User_Assignment" = "N/A";
		"Assignment_Type" = "N/A";
			}
		}

And when done I ended up with the following script. As usual it might get some improvements or I need to squash some bug so better check the latest version on Github.

# Start of Settings
# End of Settings

$Pooloverview=@()
foreach ($pool in $pools){
	$poolstatus=$pool.DesktopSettings.Enabled 
	$ProvisioningStatus=$pool.AutomatedDesktopData.VirtualCenterProvisioningSettings.enableprovisioning
	$source=$pool.source
	switch ($poolstatus)
		{
			$True {$poolstatusoutput="Enabled"}
			$False {$poolstatusoutput="Disabled"}
			default {$poolstatusoutput="No Pool Status available"}
		}

	switch ($ProvisioningStatus)
		{
			$True {$ProvisioningStatusoutput="Enabled"}
			$False {$ProvisioningStatusoutput="Disabled"}
			default {$ProvisioningStatusoutput="No Pool Provisioning Status available"}
		}

	switch ($source)
		{
			VIRTUAL_CENTER {$sourceoutput="vCenter Managed Desktop"}
			FULL_CLONES {$sourceoutput="Full Clones"}
			VIEW_COMPOSER {$sourceoutput="Linked Clones"}
			INSTANT_CLONE_ENGINE {$sourceoutput="Instant Clones"}
			UNMANAGED {$sourceoutput="Non-vCenter Desktops"}
			RDS {$sourceoutput="RDS Desktops"}
			{$_ -eq "VIRTUAL_CENTER" -AND $pool.type -eq "Automated"} {$sourceoutput="Full Clones"}
			{$_ -eq "VIRTUAL_CENTER" -AND $pool.type -eq "MANUAL"} {$sourceoutput="Manually Added vCenter Managed Desktops"}
			default {$sourceoutput="No Source data available"}
		}

	if ($pool.type -eq "Automated"){
		$Automaticassignment=$pool.AutomatedDesktopData.UserAssignment.AutomaticAssignment
		switch ($Automaticassignment)
		{
			$TRUE {$Automaticassignmentoutput="Automatic"}
			$FALSE {$Automaticassignmentoutput="Manual"}
			default {$Automaticassignmentoutput="No Assignment Status Available"}
		}
		$Pooloverview+=New-Object PSObject -Property @{"Name" = $pool.base.name;
			"Displayname" = $pool.base.DisplayName;
			"Description" = $pool.base.Description;
			"Status" = $poolstatusoutput;
			"Provisioning" = $ProvisioningStatusoutput;
			"Type" = $pool.type;
			"Source" = $sourceoutput;
			"User_Assignment" = $pool.AutomatedDesktopData.UserAssignment.userassignment;
			"Assignment_Type" = $Automaticassignmentoutput;
			}
		}

	elseif ($pool.type -eq "MANUAL"){
		$Automaticassignment= $pool.manualdesktopdata.UserAssignment.AutomaticAssignment
		switch ($Automaticassignment)
		{
			$TRUE {$Automaticassignmentoutput="Automatic"}
			$FALSE {$Automaticassignmentoutput="Manual"}
			default {$Automaticassignmentoutput="No Assignment Status Available"}
		}
		$Pooloverview+=New-Object PSObject -Property @{"Name" = $pool.base.name;
		"Displayname" = $pool.base.DisplayName;
		"Description" = $pool.base.Description;
		"Status" = $poolstatusoutput;
		"Provisioning" = $ProvisioningStatusoutput;
		"Type" = $pool.type;
		"Source" = $sourceoutput;
		"User_Assignment" = $pool.manualdesktopdata.UserAssignment.UserAssignment;
		"Assignment_Type" = $Automaticassignmentoutput;
			}
		}	

	elseif ($pool.type -eq "RDS"){
		$source=($services1.farm.farm_get($pool.rdsdesktopdata.farm)).source
		$ProvisioningStatus=($services1.farm.farm_get($pool.rdsdesktopdata.farm)).automatedfarmdata.VirtualCenterProvisioningSettings.enableprovisioning
		switch ($source)
		{
			VIEW_COMPOSER {$sourceoutput="Linked Clones RDS Hosts"}
			INSTANT_CLONE_ENGINE {$sourceoutput="Instant Clones RDS Hosts"}
			default {$sourceoutput="Manually Added RDS Hosts"}
		}

		switch ($ProvisioningStatus)
		{
			$True {$ProvisioningStatusoutput="Enabled"}
			$False {$ProvisioningStatusoutput="Disabled"}
			default {$ProvisioningStatusoutput="N/A"}
		}

		$Pooloverview+=New-Object PSObject -Property @{"Name" = $pool.base.name;
		"Displayname" = $pool.base.DisplayName;
		"Description" = $pool.base.Description;
		"Status" = $poolstatusoutput;
		"Provisioning" = $ProvisioningStatusoutput;
		"Type" = ($services1.farm.farm_get($pool.rdsdesktopdata.farm)).type;
		"Source" = $sourceoutput;
		"User_Assignment" = "N/A";
		"Assignment_Type" = "N/A";
			}
		}
}

$Pooloverview | select Name,Displayname,Description,Status,Provisioning,Type,Source,User_Assignment,Assignment_Type
$Title = "Overview of all Pools"
$Header = "Overview of all Pools"
$Comments = "Gives an overview of the general status of all pools"
$Display = "Table"
$Author = "Wouter Kursten"
$PluginVersion = 0.1
$PluginCategory = "View"

And a screenshot of the result:

VMworld EU 2017 Day 3

Day three, the last one, was a short day for me this year. I had an appointment with the VMware Design studio at 8am but the gates didn’t open until 8 as well and I had to drop my suitcase first so I rescheduled it to 9.15 while talking to the guy that I would have the session with! After this I decided to go to the vmtn area to finish up my powerpoint for the vBrownbag I would be doing by noon. I kept changing and changing stuf and somehow managed to remove the one slide you need when generating output: the output itself. Also during the presentation I never got into a good flow so I wasn’t happy with the end result. After this there where some rumors about horrible queues at the airport so I scrambled to get there but in the end the line to drop off my suitcase took longer then security.

New and updated VMware flings for August 2017

Intro

(For those of you who ever watch or used to watch WWE think: New Age Outlaws. For those who never did watch this from about 1:40.

Ladies and gentlemen, boys and girls, nerds of all ages. Retouw.nl proudly brings to you, the monthly  VMware Labs updated Fliiiiings. The new, the updated change logs and all.

“And if you ain’t down with that I got two words for ya: read it!”

This month we had two new flings and six updated including a dinosaur that I even forgot it existed!

New Flings

vRealize Operations Export tool

Ever felt the need to export all of that vRops data because you don’t trust the recommendations it makes for you? This is your chance to do just that. The vRealize Operations Export Tool actually is an Open Source Fling and can be found on Github. If you want to know more about the VMware Open Source initiative visiting this site might be usefull.

Changelog

No changelog yet.

DRS Dump Insight

While DRS Lens already gives you some insight in why DRS actions might be happening the DRS Dump Insight actually uses drmdump files created on vCenter and analyses why a DRS action really happened or not and you can also run what-if scenarios to see what would happen if a threshold had been breached.

Changelog

Again no changelog yet.

Updated flings

Like I said 6 updated flings and let’s start with the Dinosaur you (like me) might have forgotten.

Visual Esxtop

WHAT? Yes Visual Esxtop has been updated! Duncan wrote about this over four years ago and I believe it might actually be older then that. The name says enough, this shows you the output from ESXtop in a graphical way and since I can never ever describe it better then Duncan head over there to read about it!

Changelog

I could copy the only changelog item but since that mentions vSphere 5.5 I think this might be an old one 🙂

ESXi Embedded Host Client

The ESXi Embedded Host client is in the GA product since 6.x but there’s still lab updates being released. Some very nice fixes have been implemented.

Changelog

Version 1.23.0 build 6360286 (Fling 18) – August 16, 2017

Minor features and bugfixes

  • General
    • Display the VM List in the Host autostart settings
    • Fix role selection in IE 11
    • Correct partition info portlet
    • Better handling of unknown partition types
    • Fix issue with fractional cores per socket in VM settings
    • Several wizard fixes
    • Remove persistent warning when importing VMs that include a floppy drive
    • Fix hidden selection when using the ‘select all’ checkbox in a filtered VM list
    • Handle OVAs with a missing description field
    • Available NICs display correctly
    • Default VMFS to the most recent version when formatting
    • Security fixes

VMware OS Optimization Tool

This is THE go to application if it comes to building golden images for VDI or SBC environments. If it is Horizon or Citrix if you don’t optimize you will fail!

Changelog

August 2, 2017

  • New Template: App Volumes Packaging Machine – This template is intended to be used by Application Packagers who are responsible for creating AppStacks and should only be used on the ‘Packaging machine’.

vSphere HTML5 Web Client

The HTML5 client  got a couple of updates with heaps of new features and bugfixes.

Changelog

Fling 3.20 – Build 6433743

New Features

  • Installed I/O Filters for Cluster and Host
  • Create and configure network resource pools in Network I/O Control v3

Bug Fixes

  • Fixed exception when navigating to VM summary page and configuring VM overrides: “Could not fetch query binding: com.vmware.vsphere.client.clusterui.model.services.VmFailureResponsesData”

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.

Fling 3.19 – Build 6365405

New Features

  • Add host and client USB device to a VM
  • Add USB controller
  • Assign License action on VC/Cluster/Host
  • Edit/Clone VM Storage Policy
  • Edit Storage Policies of a VM (Actions > VM Policies > Edit VM Storage Policies…)
  • Storage Policy components view
  • Create/Delete Storage Policy components
  • Related VM Templates view for a Storage Policy
  • Mount VVOL datastore action
  • VVOL Capability Profiles Capacity portlet
  • Create and edit VM customization specifications (without custom network configurations)
  • Configure per disk option on Select storage page when cloning VM/template
  • Host lists can be sorted by consumed CPU and memory
  • Monitoring DRS memory utilization for clusters allows switching between active and consumed memory for the charts
  • Updated UI of the compatibility issues dialog in the migrate wizard – ability to sort the compatibility by VM, host or compatibility issue

Bug Fixes

  • The list of physical network adapters didn’t render correctly for some ESX hosts and an error message was appearing on the top of the page
  • Setting the DRS advanced option “PercentIdleMBInMemDemand” through the advanced settings now works for any value

Known Issues

  • If you see error in the vSphere Client (HTML5) similar to this – ‘getHostIsAssignLicenseActionAvailable’, then you can resolve this error by following below steps:
    • If vSphere Client (HTML5) Fling appliance is pointed to a vCenter Server Appliance (VCSA), then you should reregister the fling appliance by logging in to FAMI UI (or by running the config-ui CLI). Refer the instructions document to follow the steps for configuring Fling appliance for VCSA.
    • If vSphere Client (HTML5) Fling appliance is pointed to a Windows vCenter Server, then reregister by downloading latest server-configure.bat from the Download section of this website. Refer the instructions document to follow the steps for configuring Fling appliance for Windows vCenter Server.
  • If you see this error when you click on the VM – “Could not fetch query binding: com.vmware.vsphere.client.clusterui.model.services.VmFailureResponsesData cause: java.lang.RuntimeException: Could not fetch query binding: com.vmware.vsphere.client.clusterui.model.services.VmVmcpSupportData”, collaps the HA portlet in the VM summary. We are working on fixing this.

HCIBench

HCIBench is a tool to test your hyperconverged infrastructure. No vSan required, any HCI is good as long as it runs vSphere.

Changelog

Version Version 1.6.3

  • Enhanced vSANPerformanceDiagnose function call
  • Enhanced port 443 validation
  • Enhanced results calculation
  • Added host maintenance mode validation
  • Added deployment validation

Horizon Toolbox

This one came out at the very last moment of August. Some bugs have been fixed and a couple of old features that had been removed have been re-added but have been marked deprecated.

Changelog

2017-Aug-31 Horizon Toolbox 7.2.1

Bugs fixed

  • Auditing – Export CSV failed
  • Console Access – Some vCenter versions were not supported. Now, almost all vCenter versions after 5.5 are supported.
  • Console Access – “Parent VMs” show all VMs. Now only the VMs which are (or ready to be) parent VMs are shown.
  • Installation sometimes failed due to Tomcat error. Now, the installation should be successful every time if the Connection Server is good.

New Features

  • Console Access – “Problem VMs” show the VMs with View Agent, but in abnormal status like “error”, “unavailable” or others.

The following features are added back since some customers strongly require these features, but they are marked as “deprecated”, since we suggest using the production features in Horizon or VIDM.

  • Management- Remote Assistance
  • Management- Device Access Filter