Example RDS Automation

I had a use case of quickly showing off the RDS capabilities of Morpheus VDI. In my lab environment I now spin up Windows 2016/2019 RDS servers utilizing Instance types and easily add additional servers as required.

Below you will find the steps and screens I use to configure a test RDS experience. Additional concepts around VDI or user policies/GPO can be found in my previous post here:

Standard vs. RDS VDI Pools

Standard VDI pools consist of servers meant for 1:1 allocation with a user. This does not mean the server has to be dedicate to specific user (persistent pools), rather a set of users can lay temporary claim to a pool of servers (ephemeral).

RDS VDI pools are meant for multiple users connecting to the same system. This optimizes compute resources and usually allows for complex applications to be shared/presented on remote servers, rather than installed on multiple end user systems.

Instance Type

This is the structure of my custom Instance Type for provisioning the server.

Instance Type

Layout

Node Type

Tasks & Workflows

Workflow

Tasks

Here are the tasks I use in the order presented in the Workflow. Some of these are optional, but ideal for me to get a lab up and running fast.

Install-WindowsFeature Remote-Desktop-Services, RDS-RD-Server, RDS-Licensing –IncludeManagementTools


start-sleep -seconds 120

New-RDSessionDeployment -ConnectionBroker "<%=server.fqdn%>" -SessionHost "<%=server.fqdn%>"

New-RDSessionCollection -CollectionName "Windows" -SessionHost "<%=server.fqdn%>"
 
New-RDRemoteApp -CollectionName "Windows" -DisplayName "Notepad" -FilePath "C:\Windows\System32\Notepad.exe"
New-RDRemoteApp -CollectionName "Windows" -DisplayName "PowerShell" -FilePath "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
New-RDRemoteApp -CollectionName "Windows" -DisplayName "Internet Explorer" -FilePath "C:\Program Files\internet explorer\iexplore.exe"

function Disable-IEESC {
$AdminKey = "HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0
Stop-Process -Name Explorer
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green
}
Disable-IEESC

Configure the RDS Pool

Navigating to Tools > VDI Pools, I selected a RDS pool and created with the following settings. Note, I can attach Morpheus managed RDS Instances that host the applications or shared desktop system. Also, I can control the Max Session that each system can contain. This ensures performance as well as RDS license compliance.

User VDI

Heading over to the VDI persona by clicking on my User at the top right and selecting VDI I’m presented any of the VDI pools or favorited servers to console into. In the image, I’ve selected my RDS pool and see the Desktop, as well as any presented applications on the pool.

There you have it! Since Morpheus doesn’t require a thick client, I can launch my desktop directly in my browser.

2 Likes

Awesome write up @cbunge this guide will certainly help customers new to VDI

1 Like

Makes it super simple to quickly spin up RDS for working on any tickets I come across and not needing to keep a host around forever :slight_smile:

Hi @cbunge in the screenshot of adding a VDI pool, there is a lookup to search for an instance, is it mandatory for the pool to add an existing server? also the instance type and layout have scaling enabled, Would it scaling up if there are more than 5 users trying to access the catalog item and would it auto scale down the vm in the instance?

Hey @aabraham! See answers below:

Is it mandatory for the pool to add an existing server?

Yes. While you can save the pool with no server defined, the users will have no backend infrastructure to connect to. The Type ahead searches for Morpheus instances (so you must make brownfield RDS servers managed). 1 or more RDS servers can be added to increase pool capacity

Instance Type and Layout have scaling enabled. Would it scale up with additional users?

That’s mostly a habit I have in my environment. I do not have the RDS server behind a load balancer so there wouldn’t really be a value of scaling wide. Additionally, because RDS requires licensing, most RDS environments are built to their maximum size to effectively use the licensing.

In theory I could configure the pool to actually auto-scale, but that is based on CPU and Memory and the scale down (if automatic) wouldn’t take account draining the connections.

1 Like

Hi,

Two questions about this RDS configuration:

1 - Is it necessary to use active directory identity source to control rds licenses?
2 - In this example it appears that a VDI gateway (K8s) has been configured. Could you show details of the gateway for rds?

Thank you!

Hi @luciano.santos it looks like per this document, that you can have per device licensing and it covers non-AD users. The other option is having a specific AD server for VDI and hosting users via that.

As for the second question, here’s a quick diagram of how VDI with the external gateways work:

Also, details about configuring the VDI gateway can be found here.

Essentially, the gateway (which is optional, but recommended) can be a standalone or load-balanced and hosted as a VM (package on the Morpheus hub) or as a Docker or Kubernetes container.