[HorizonAPI] Changing the amount of desktops or RDS hosts in a pool/farm

Sometimes there is a need to change the amount of desktops/rds hosts in a pool/farm. Since doing this in the GUI sucks (although that seems to have gotten slightly better with 7.11) I prefer to do it using the API’s. Let’s start with a Desktop pool.

The easiest way to change pool settings is to use the helper function of a service. After connecting to the connection server we first need to query for the ID of the desktoppool that we need to change.

[VMware.Hv.QueryServiceService]$queryService = New-Object VMware.Hv.QueryServiceService
[VMware.Hv.QueryDefinition]$defn = New-Object VMware.Hv.QueryDefinition
$defn.queryEntityType = 'DesktopSummaryView'
$defn.Filter = New-Object VMware.Hv.QueryFilterEquals -property @{'memberName'='desktopSummaryData.name'; 'value' = "Pod01_Pool01"}
[array]$queryResults= ($queryService.queryService_create($HVservice, $defn)).results
$hvpoolid=$queryResults.id

To actually change the pool it’s the best to use the helper function of a service so we first put the desktopservice into an object

$desktopservice=new-object vmware.hv.DesktopService

The next step is to read the current settings into another object.

$desktophelper=$desktopservice.read($HVservice, $HVPoolID)

If you want to see what’s in here we’ll just do this

$desktophelper | get-member

With the get helper method’s it’s possible to get things while you can change them with their set counterpart. Don’t forget to use brackets when you want to go deeper.

$desktophelper.getAutomatedDesktopDataHelper() | get-member

And we can go on and on with this but I happen to already have found where the amount of desktops is listed.

$desktophelper.getAutomatedDesktopDataHelper().getVmNamingSettingsHelper().getPatternNamingSettingsHelper() | get-member

Let’s take a look at the getMaxNumberOfMachines method.

$desktophelper.getAutomatedDesktopDataHelper().getVmNamingSettingsHelper().getPatternNamingSettingsHelper().getMaxNumberOfMachines()

And we can actually use this with setMaxNumberOfMachines

$desktophelper.getAutomatedDesktopDataHelper().getVmNamingSettingsHelper().getPatternNamingSettingsHelper().setMaxNumberOfMachines(10)

But nothing has changed yet (and yes I am lazy so I will show it using the vmware.hv.helper module.

(get-hvpool -PoolName pod01_pool01).automateddesktopdata.VmNamingSettings.PatternNamingSettings

To apply the change to 10 vm’s we need to apply the helper using the update method

$desktopservice.update($hvservice, $desktophelper)

And when we check this with get-hvpool.

And we can do almost the same for RDS farms just a few details that are different in the naming of various objects.

[VMware.Hv.QueryServiceService]$queryService = New-Object VMware.Hv.QueryServiceService
[VMware.Hv.QueryDefinition]$defn = New-Object VMware.Hv.QueryDefinition
$defn.queryEntityType = 'FarmSummaryView'
$defn.Filter = New-Object VMware.Hv.QueryFilterEquals -property @{'memberName'='data.name'; 'value' = "pod1_rds_IC"}
[array]$queryResults= ($queryService.queryService_create($HVservice, $defn)).results
$hvfarmid=($queryResults).id
(Get-HVFarm -FarmName pod1_rds_ic).automatedfarmdata.RdsServerNamingSettings.PatternNamingSettings
[VMware.Hv.FarmService]$farmservice=new-object vmware.hv.FarmService
$farmhelper=$farmservice.read($HVservice, $HVFarmID)
$farmhelper.getAutomatedFarmDataHelper().getRdsServerNamingSettingsHelper().getPatternNamingSettingsHelper().setMaxNumberOfRDSServers(3)
$farmservice.update($HVservice, $farmhelper)

 

Report out of the second Dutch Nutanix User Group Meeting

Last week the second Dutch Nutanix Use Group meeting was held at the Dutch Nutanix offices. I think we managed to get a nice agenda together and even my own session worked great despite it being an experimental way to do, the last one of the day and right after pizza. For the rest I really enjoyed all the presentations and so did the audience from what I gathered. With 41 signups and 27 people showing up it was about what I expected this time of the year.

The agenda with the slidedecks where available:

  • 14:00 –14:30 Registration & Welcome
  • 14:30 –15:00 Keynote: Ruben Spruijt
  • 15:00 –15:45 Community Speaker: Vishwapreet Mahabir (PQR) – Xi Leap & Xi Frame with demo’s – Slidedeck
  • 15:45 –16:00 Break & Refreshments
  • 16:00 –16:45 Community Speaker: Bart Donders (ICT Partners) – Data Management in the real world – Slidedeck
  • 16:45 –17:30 Nutanix Support: Martin Miedema and Mustafa Gulkara – Slidedeck
  • 17:30 –18:30 Networking & Dinner
  • 18:30 –19:15 Interactive Session: Favorite Tooling, Wouter Kursten – Slidedeck
  • 19:15 – 19:30 PM Take-aways & Closing

I am planning on doing the next meeting somewhere in May or June so if you would like to present please contact me. I would also love it if someone would be able to create our own logo because I suck in that department.

For the rest I can only share a boatload of tweets with pictures and the video that Preet made.

https://twitter.com/VNMahabir/status/1200379530470408192

https://twitter.com/Magneet_nl/status/1200045511585280001

https://twitter.com/Magneet_nl/status/1200050774987956225

https://twitter.com/Magneet_nl/status/1200054275881283584

https://twitter.com/Magneet_nl/status/1200069328076464128

https://twitter.com/Magneet_nl/status/1200079008223940608

https://twitter.com/Magneet_nl/status/1200081418006810624

https://twitter.com/Magneet_nl/status/1200094403534229506

https://twitter.com/Magneet_nl/status/1200102440198168577

https://twitter.com/rspruijt/status/1200108366846201857

https://twitter.com/VNMahabir/status/1200142664114544640

 

 

 

 

 

 

 

The VMware Labs flings monthly for November 2019

None less than eleven newly released and updated flings this month. This includes three that are directly aimed for End use computing including Horizon Reach about which I blogged earlier this week. The three new releases are Horizon Reach, VMware vSAN Live and vCenter Event Broker Appliance. The following received updates: Red Hat OpenShift Container Platform as a Service on vRealize Automation Cloud, Cross vCenter Workload Migration Utility, Infrastructure Deployer for vCloud NFV, Horizon View Events Database Export Utility, Horizon Helpdesk Utility, Kubewise, USB Network Native Driver for ESXi and HCIBench.

New Releases

[sta_anchor id=”reach” /]

Horizon Reach

As I said in the blog posts, Horizon Reach is one of the best tools for Horizon ever if not the best by giving the admin insight into the entire Cloud Pod Architecture.

Horizon Reach is a web based, monitoring and alerting fling for VMware Horizon On Prem deployments. Horizon Reach is designed to tackle the disconnect in Enterprise environments wherein each Pod in a Cloud Pod Architecture is its own technology domain and fault domain, or a customer is running multiple, disconnected pods, outside of a Cloud Pod Architecture, but would still like to treat them all as one unit of compute.

Often when troubleshooting these fault domains, it can feel like a game of “Whack a mole” jumping from Pod to Pod trying to find a pertinent session, alarm or event to the problem your user is describing.

Reach tackles this issue by performing health checking and gathering pertinent errors from each separate environment and displaying them all in a single place, creating an easy location for administrators to monitor the environment, along with providing a detailed first step in the troubleshooting process.

[sta_anchor id=”vsanlive” /]

VMware vSAN Live

Did you like the vSphere mobile fling? Guess what there is a vSAN mobile fling now as well to give you all the insights while on the go. Personally I expect this one to be merged with the vSphere app at some point but as of now it’s a separate app.

VMware vSAN Live provides vSAN users with instant insights into their hyperconverged infrastructure environments from their mobile devices. Instead of stopping, signing into a laptop and then logging in remotely to view their vSAN environments, users can monitor their HCI clusters while on the go, troubleshooting in just a few clicks.

What’s included in this release?

  • Overview dashboard of vSAN clusters
  • Full-featured Health Checks
  • Cluster inventory view including Fault domain and host status.
  • Easily switch between different vCenter Servers
  • Cluster configuration view including vSAN settings and service status.
  • Full-featured Performance monitoring for VMs and Cluster
  • Full-featured Capacity monitoring

VMware vSAN powers VMware’s hyperconverged infrastructure solution, which combines compute virtualization, storage virtualization and storage networking with unified management into a single system running on industry-standard x86 servers. VMware vSAN, primes businesses for growth through seamless evolution, industry leading deployment flexibility and hybrid-cloud capabilities.

vSAN is native to the market-leading hypervisor, vSphere, simplifying HCI adoption by leveraging existing tools and skillsets. vSAN provides customers industry leading deployment flexibility with over 500+ ReadyNodes, or jointly-certified x86 servers, a turn-key appliance, Dell EMC VxRail, and native services with all of the top public cloud providers: Amazon, Microsoft, Google, Alibaba, IBM and Oracle. vSAN supports the most hybrid cloud uses cases and provides enterprise-grade, general-purpose infrastructure for VM and container-based applications.

[sta_anchor id=”vcentereventbroker” /]

vCenter Event Broker Appliance

This is quite a handy appliance when you want some event driven automation for your vSphere environment.

The vCenter Event Broker Appliance (VEBA) enables customers to easily create event-driven automation based on vCenter Server Events. For example, VEBA can drive basic workflows like automatically attaching a vSphere tag when a virtual machine (VM) is created. Even more powerful integrations between datacenter-internal enterprise services and cloud services, for example Slack and Pager Duty, can be created with VEBA out of the box.

VEBA is provided as a Virtual Appliance that can be deployed to any vSphere-based infrastructure, including an on-premises and/or any public cloud environment, running on vSphere such as VMware Cloud on AWS or VMware Cloud on Dell-EMC.

With this appliance, end-users, partners and independent software vendors only have to write minimal business logic without going through a steep learning curve understanding vSphere APIs. As such, we believe this solution not only offers a better user experience in solving existing problems for vSphere operators. More importantly, it will enable new integration use cases and workflows to grow the vSphere ecosystem and community, similar to what AWS has achieved with AWS Lambda.

Continue the conversation with us on Slack: #vcenter-event-broker-appliance on VMware {code}

Updated flings

[sta_anchor id=”rhaas” /]

Red Hat OpenShift Container Platform as a Service on vRealize Automation Cloud

The Red Hat OpenShift Container Platform as a Service on vRealize Automation Cloud fling gives you a tool to automate the end to end deployment of an Openshift Cluster.

Changelog

Version 1.1

  • Updated / Revalidate for Red Hat Enterprise Server 7.7
  • Updated / Revalidate for minor changes in bash scripts
  • Updated/ Revalidate for Ansible playbooks

[sta_anchor id=”xvcentermigutil” /]

Cross vCenter Workload Migration Utility

If you need to migrate or clone vm’s between unlinked or even linked vCenters than the Cross vCenter Workload Migration Utility is a very useful tool for you.

Changelog

Version 3.0, Novemember 5, 2019

  • New plugin UI integrated with the vSphere HTML5 Client and supported with both vSphere and VMware Cloud environments
    • Full feature parity with the standalone XVM UI
    • Supports migrations triggered by the host, cluster and resource pool actions from the vSphere Client inventory tree
  • Standalone UI is now deprecated but is still supported
  • Ability to migrate networks with the same name
  • Sorting and filtering of the list of VMs to migrate (plugin only)
  • Error reporting improvements

[sta_anchor id=”infradepnfv” /]

Infrastructure Deployer for vCloud NFV

Infrastructure Deployer for vCloud NFV is an automation-based deployment tool used for setting up the VMware vCloud NFV platform (NFV 3.2 VCD edition). It is based on VMware vCloud NFV 3.0 Reference Architecture design and targets greenfield deployments only.

There are two components:

The input text file – User enters all details of the environment and component products that need to be deployed, and
The power shell scripts – Executed to do the actual deployment of the products.

Changelog

  • None

[sta_anchor id=”horeventexport” /]

Horizon View Events Database Export Utility

While I personally prefer to use the api’s to grab Horizon event logs I still think the Horizon View Events Database Export Utility could be very usefull for people, specially now it has been updated to work with the latest version of Horizon.

Changelog

Version 2.0

  • Added support for RDSH Pools
  • Returns desktop name now
  • Several bug fixes
  • Tested with Horizon 7.11

[sta_anchor id=”horizonhelpdesk” /]

Horizon Helpdesk Utility

The Horizon Helpdesk Utility still is a 1000 times better than the official java or html5 interfaces and it keeps getting better and better.

Changelog

Version 1.5.0.11

  • Added Named user support in the views
  • Added support for VM image details
  • Added Global search on the overview
  • Added an option to disable the global mutex
  • Fixed numerous bugs

Version 1.5.0.9

  • Updated all binaries to be signed
  • Added full name support for search results
  • Added image status and details for machines view
  • Added a privacy setting to remove the windows title caption
  • Many Bug Fixes

[sta_anchor id=”kubewise” unsan=”Kubewise” /]

Kubewise

Kubewise is a nifty multi-platform Kubernetes Desktop client. In case you don’t want to type kubctl this could be a replacement.

Changelog

Version 1.1.0

[ Features ]

Terminal command UI – users can now override the default command to open a new terminal window of their choice.
About Info UI – displays the version of currently installed kubectl

[ Bug fixes ]

Fixed an issue where Windows users cannot add a kubeconfig file
Fixed an issue where Linux users cannot list resources due to snap security policies
Switching to YAML format in the Inspect resource view loaded all resources of the same type
Surround path params of kubectl commands with double quotes

[ Misc ]

Save settings file pretty printed
Allign ‘trash’ icons in kubeconfig dropdown
Show loading spinner on application startup

[sta_anchor id=”esxiusbnetwork” /]

USB Network Native Driver for ESXi

The USB Network Native Driver for ESXi is specially build for homelabs so people can have (fast) enough nic’s even when running smaller systems in the lab.

Changelog

November 27, 2019 – v1.3

  • Resolved USB device detection issue on Intel XHCI controller
  • Resolved packet record issue for ASIX USB network adapters

ESXi670-VMKUSB-NIC-FLING-30899283-offline_bundle-15188556.zip
ESXi650-VMKUSB-NIC-FLING-30940032-offline_bundle-15188510.zip

[sta_anchor id=”hcibench” unsan=”HCIBench” /]

HCIBench

The HCIBench received 2 updates this month but the second mostly was a bugfix.

Changelog

Version 2.3.1

  • Fixed static IP setting issue
  • Fixed reuse VMs on multi datastores issue
  • Fixed vm/tvm deployment issue
  • MD5 Checksum: 1b220f22575eacf62a965992a4c916e7 HCIBench_2.3.1.ova

Version 2.3.0

[New fling] Horizon Reach: true insights into an entire cloud pod architecture

For years one of the less optimal things about VMware was the fact that you are not able to get an overview over all pods. Yes with other tooling like vRops or 3rd party monitoring this is possibly but all at a cost. At VMworld US Andrew Morgan presented Horizon Reach or Project Heimdall at that time, to the VMware EUC Champions. This tool sounded like the solution to get an easy overview over all pods. While I wasn’t there I definitely was interested and managed to get my hands on some of the early beta releases. With each and every release the stool started to look better and better. It was so good that at VMworld EU it received the first spot in the Top 5 EUC tools that Hans Kraaijeveld and I presented about at the EUC Tapas and Beer Community event.

Yesterday the fling finally was released and announced at Andrews own blog.

Index

Installing

Configuring

The Dashboards

But wait there’s more!

[sta_anchor id=”installing” /]

Installing

Installing reach is as easy as unpacking the zip and running the nstall-reachservice.ps1 powershell script. This will also provide you with the standard credentials.

[sta_anchor id=”configuring” unsan=”Configuring” /]

Configuring

After logging in for the first time you need to add the credentials to one of your connection servers.

Hit validate tand accept the certificate when using self signed certificates.

Hit validate again

and hit ok

The installation and configuration is also documented in a video posted at the flings site!

[sta_anchor id=”dashboards” /]

The dashboards

First you’ll see the default dashboard with an overview of your entire environment. The graphs need some time to get data, my lab gets powered down every day so it won’t show much.

The alarms dashboard shows alarms from all pods, from my lab you can see that there are two different pod names

And yes my Full Clone server 2016 RDS is in an error state (probably because it isn’t running)

And I could go on and on about all dashboards

[sta_anchor id=”more” /]

But wait there’s more!

At the top right corner we have some extra configuration options.

Enabling/disabling alarms and some tresholds

Connection settings, do you see that it found the other pod automatically?

Web settings that also gives the option to download the configuration and change the two available accounts

And if you want to do some automation against Reach itself you can use the API

 

 

[Horizon API] Discovering pods and sites

When working with a Cloud Pod Architecture with the Horizon API’s we always have to make our scripts so that we connect to each pod separately. What if there is a way to discover the other available pods in a site or other site’s and connect to those? I already spent a couple of posts on working with pods and site’s. In this post I will be mainly using the get and list commands to get the information we need. First of all it’s the easiest to have the credentials saved somewhere because we will be disconnecting and connecting from and to pods. More on that can be found in this post.

To start we need to find what pod we’re currently connected to, with the following command we can list all pods:

$hvservice.Pod.Pod_List()

You see I have two pods: Cluster-Pod2CBR1 and Cluster-POD1CBR1, both have a property called localpod that provides the locality information we need. What we can’t see is if both pods belong to the same site. This can be done by comparing the VMware.Hv.Siteid object but I would prefer to do that from the site side because we might have several pods inside a site and it might become messy that way. The better was is to use that siteid to get all the information from the site.

$localpod=$hvservice.Pod.Pod_List() | where-object {$_.LocalPod -eq $True}
$localpod

And use the site id to grab the localsite.

$localsite=$hvservice.Site.Site_Get($localpod.site)
$localsite
($localsite).pods

The pods object is an array with all the pods within that site, I have added my second pod to this site to show this. Now I am going to select a connection server from each pod, if you want to connect to all the pods regardless the sites you can use the results from pod_list() to create the same output that we get by using this:

$sitepods=foreach ($sitepod in ($localsite.pods)){$hvservice.Pod.Pod_Get($sitepod)}
$sitepods

we still don’t have the name for the connection servers but those are part of the endpoints. We do this by getting the first podendpoint from all the pods within the site.

$podendpoints=foreach ($sitepod in $sitepods){$hvservice.PodEndpoint.PodEndpoint_Get((($sitepod).endpoints | select-object -first 1))}
$podendpoints

Now we’re getting somewhere, we just can’t connect to the serveraddress directly so we need to strip the things from the url’s

$connectionservers=$Podendpoints.serveraddress.replace("https://","").replace(":8472/","")
$connectionservers

Now we have a list of a connection servers from each pod inside site 1. If we would have used the pod_list() as source we would have ended up with one connection server from all pods within the CPA. The only thing we need to do now is to disconnect and do a foreach with whatever we want to do against the connectionservers.

foreach ($connectionserver in $connectionservers){
    Write-Output "This is connectionserver $connectionserver"
    $hvserver=connect-hvserver -Server $connectionserver -cred $cred
    $hvserver.ExtensionData.ConnectionServerHealth.ConnectionServerHealth_List()
    disconnect-hvserver $hvserver -confirm:$false
}

My VMworld EU 2019 presentations

It’s already the week after and I am looking back at a very good VMworld last week in Barcelona. In the end I was at a podium for none less than four times and wanted to share the decks or videos with you when available. For the vExpert daily there is no deck (duh) and for the EUC Beer and tapas community event there is no video. I also had to remove most of the slides because the fling hasn’t been published yet, you can expect a blogpost when it’s been published because it’s going to be awesome!

vExpert Daily: Video | Deck

vBrownbag: tools for Horizon Helpdesk: Video | Deck

EUC Beer and Tapas top 5 flings for Horizon: Video | Deck

VMware{Code}-Horizon API 101: Video | Deck

VMworld EU 2019 day 3 report

I am writing dus from my own desk in my own house after an awesome VMworld 2019. Day three was the day where I presented at the VMware{Code} theater. There was a good audience that really want to start using the Horizon API’s to automate their environments. The rest of de day I spent for a bit in the Solutions Exchange but mainly in the community area. We talked a lot, played some fussball and at the end of the day we had some fun with Eric Nielsen’s workshop about working with Raspberry pi’s and sensors.

https://twitter.com/Magneet_nl/status/1192461318869135362

 

VMworld Europe 2019 day 2 report

Day 2 of VMworld was interesting for me. I actually did my first (and only) breakout session in the afternoon about VSAN and was in the first row for the one and only Virtually Speaking Podcast. The day actually started with having control of the @VMware_NL twitter handle during the general session (lots of demos!!) and until noon. I also did another two Design Studio sessions and I can’t encourage enough people to do those because you’re helping out with creating our tools from the future. I was for 45 minutes at the VMworld Fest but there where huge lines at the food stands so I grabbed a but and went back to my hotel where I was asleep in no-time.

https://twitter.com/Magneet_nl/status/1192062878439923713

https://twitter.com/Magneet_nl/status/1192109891915276288

 

Day 1 of VMworld Europe 2019

So yesterday was a very interesting day for me. It started at the reserved bloggers seats for the keynote where we didn’t see too much really big announcements. After that I had to rush to the community area for my appearance in the vExpert daily this year. If you’re interested to watch that you can find it over here. And at 12.45 I had another go at vBrownbag presenting on a couple of helpdesk tools for VMware Horizon. The rest of the day mainly was hanging around in the community area distributing Pink Cookies, Stroopwafels and gathering swag inn the solutions Exchange. In the evening I once again went onto a stage with Hans Kraaijeveld at the EUC Community beer and tapas event. This was my biggest crowd to present for until now but the beer part made it rather easy. We even showed a brand new fling called Horizon Reach from Andrew Morgan that hasn’t even been released yet. The evening came to a closing for me at the Benelux party where we had some beers and tapas again.

https://twitter.com/Magneet_nl/status/1191690384038121473

https://twitter.com/Magneet_nl/status/1191740580247822336

https://twitter.com/Magneet_nl/status/1191764279097249792

https://twitter.com/Magneet_nl/status/1191781511579787264

 

The VMworld day 0 report in text and some tweets

Ever played football (or Soccer for the yanks) after a day at a conference? I did this yesterday for the second year in a row but at least we waited with most of the beer until after doing the active bit. Before that my morning was filled with a couple of sessions at the Design Studio’s. The afternoon was more interesting with a a workshop on operationalizing NSX-T. Or well to be more exact that was the description but it ended up being 4 hours of death by powerpoint. But hey it gave me more time for networking with friends at the vCommunity area after bailing out.

https://twitter.com/Magneet_nl/status/1191371209885265920

https://twitter.com/Magneet_nl/status/1191379577995706368