Start-vm-on-connect logging

It would be nice that Nerdio has it's own start vm on connect or has a way to integrate into the start-vm-on-connect of azure. This way, we ensure that the scripted actions we associated to the host-pool are being run on all sessionhosts that are being started. Now, the scripts only work if nerdio is the initiator of the VM-start.

We now run into an issue, that when a script is started by start-vm-on-connect, that the scripts aren't run that we defined in nerdio.

2

Comments (6 comments)

Avatar
Dave Stephenson
(Edited )

Welcome to the community, Alwin Dijkstra ๐Ÿ™‚!

There's another thread (Workaround For Adding FSLogix Storage Key To Credential Manager With Start On Connect - Bad Idea?) where someone had a similar question about the Start VM on Connect Feature and I added some thoughts.
I know when I talked to the Nerdio Team about it in the past, they mentioned they are limited in what they can do because, currently, Microsoft doesn't allow other tasks/commands to be injected during the "Start on Connect" action.ย  Because of that limitation, you're "stuck" deciding if you're going to get more savings from utilizing "Start on Connect" and missing-out on the Nerdio features or using Nerdio to keep a machine running 24x7/using scheduled starts/stops.

I'm guessing that's not the answer you were looking for, but hopefully it helps with the current "start on connect" issue(s) you're running into. ๐Ÿคž

1
Avatar
Jan Scholte

Hi Alwin Dijkstra

For easy deployment you can also use this template script to deploy a startup scheduled task with script content in one action. You can find the template here in the Sales Engineers Github: NMM-SE/Scripted Actions/Template-Create-Trigger_StartUp_ScheduledTask.ps1 at main ยท Get-Nerdio/NMM-SE (github.com)
Keep in mind these are no official solutions provided by Nerdio please refer to the disclaimer on the repo: Get-Nerdio/NMM-SE (github.com)

1
Avatar
Alwin Dijkstra

Hi Dave Stephenson & Jan Scholte

As you guys both suggested, I will try the scheduled task method on the Desktop image that will trigger the azure runbook automation to start the application servers.The script thath @Jan Scholte provided is really helpfull. This script allows me to just run the script via Nerdio on the desktop-image without having to login and make the scheduled-task manually and upload the azurerunbook trigger script.

I will let you guys know if this is the solution we are looking for!

1
Avatar
Jan Scholte
(Edited )

Dave Stephenson and Alwin Dijkstra I also wrote a specific version for the FSLogix Storage key add to Credential Manager: NMM-SE/Scripted Actions/New-SchTask_Add_AzFilesKey_FSLogix.ps1 at main ยท Get-Nerdio/NMM-SE (github.com)

1
Avatar
Dave Stephenson

Very cool, Jan Scholte!
Thanks for sharing those scripts. ๐Ÿ™‚

0
Avatar
Alwin Dijkstra

Hi Jan Scholte & Dave Stephenson ,I managed to get it to work!Now Application-servers are being started when the first session host is being started. Even with start-on-connect!!Also, when the last session host is being turned off, the app-servers are also shutting down. This is controlled by Nerdio itself. (Run scripts when VM shuts down in host-pool properties)

The script of Jan helped me to deploy the scheduled task quickly to all the hosts and image.

kind regards,

Alwin

1

Please sign in to leave a comment.