login vsi company logo login vsi company logo 250x40

 

Get the best possible VDI performance, density and availability with Login VSI
Our Solutions

  • Home
  • Blog
  • Login VSI
  • Scheduling automatic Login VSI performance tests for your virtualized desktop environment

Warning

JUser: :_load: Unable to load user with ID: 21905

Scheduling automatic Login VSI performance tests for your virtualized desktop environment

Scheduling automatic Login VSI performance tests for your virtualized desktop environment

Wouldn’t it be great to exactly know the maximum capacity of your virtualized desktop environment on a week-to-week basis? Recently a customer asked us if it is possible to schedule a Login VSI load test to automatically start running during the weekends. One of the reasons for this was that the company wanted to have a performance overview of the environment every Monday morning. Although we do not recommend simulating thousands of virtual users in your live production environment, it is not only possible to schedule tests but doing so can save you time while you regularly gauge performance.

In this example, I will configure Login VSI to run every Sunday at 4:00 a.m. I’m going to do this by using a PowerShell script. This script makes sure that all the launchers are running the launcher agent and will start the test by using the LoginVSICMD tool.

First we are going to create a configuration profile for the scheduled test.

  • Open the Management Console.
  • Configure Login VSI just as you would normally do.
  • Click on Save Profile when everything is set.
  • Enter a name for this configuration profile.

scheduling automatic login vsi performance tests for your virtualized desktop environment save profile

Now we are going to create the PowerShell script for the task scheduler.

  • Create a text file with the following code:
<#
This script will:
A. Makes sure the Session Monitor is running.
B. Connect to every launcher machine (by PSremoting) and logs off every user. Then logs on with the Launcher-v4 user account
    to make sure the launcher agent is running.
C. Start the actual test. 
Usage
1. Edit the variables under "Set variables".
2. Search for this part below and enter your launcher host names.
   
    # Launcher Workflow
    $launchers = @("Launcher01","Launcher02","Launcher03")
3. Search for this line below and adjust the fileserver and domain name. \\fileserver\VSIshare\_VSI_Binaries\Connectors\RDPConnect.exe /server $launcher /user domain\Launcher-v4 /password MySecretPassword /nowarning /display 1024x768. 4. Logon to your VSI fileserver to enable client-side CredSSP to allow user credential delegation to all computers in the domain run the command: Enable-WSManCredSSP -Role client -DelegateComputer * 5. Logon to your launchers to enable the server to accept delegated credentials: Enable-PSRemoting -Force Enable-WSManCredSSP -Role Server -Force 6. Reboot both the launcher and VSI fileserver. 7. Create a Scheduled task to run this script at you prefered interval. #> # Set variables $testname = Get-Date -Format yyyy-MM-dd-HHmm $profilename = "Weekly Sunday 4AM" $vsi_share = "\\fileserver\VSIshare" # Checking if Session Monitor is running. $ProcessActive = Get-Process SessionMonitor -ErrorAction SilentlyContinue if($ProcessActive -eq $null) { # Starting the Session Monitor. Write-host "Starting the Session Monitor." $SessionMointor = Join-Path -ChildPath \_VSI_Binaries\Launcher\SessionMonitor.exe -Path $vsi_share Invoke-Expression -Command $SessionMointor } else { # Session Monitor is already running. Write-host "Session Monitor is already running." } # Start Launcher Workflow $launchers = @("Launcher01","Launcher02","Launcher03") foreach ($launcher in $launchers) { # Connect to the launcher with PowerShell Enter-PSSession -ComputerName $launcher # Log off all logged on users. try { query user /server:$launcher 2>&1 | select -skip 1 | foreach { logoff ($_ -split "\s+")[-6] /server:$launcher } } catch {} Start-Sleep -s 2 # Close the connection to the Launcher. Exit-PSSession # Start a new RDP connection to trigger the launcher logon script. \\fileserver\VSIshare\_VSI_Binaries\Connectors\RDPConnect.exe /server $launcher /user domain\Launcher-v4 /password MySecretPassword /nowarning /display 1024x768 } # End Launcher Workflow # Starting the Login VSI test. \\DC01\VSIshare\_VSI_ManagementConsole\LoginVSICMD.exe -testname $testname -profile $profilename
  • Edit the variables under Set variables.
  • Add the launcher host names to match your setup.
  • Save the file as LoginVSIscheduledStart.ps1.
  • Log on to the VSI file server.
  • Start an elevated PowerShell console.
  • Enable client-side CredSSP to allow user credential delegation to all computers in the domain. This is because we connect to the launcher machine to logoff any logged on users.
Enable-WSManCredSSP -Role client -DelegateComputer *
  • Reboot the VSI file server.
  • Logon to every launcher machine.
  • Start an elevated PowerShell console.
  • Enable the server to accept delegated credentials:
Enable-PSRemoting –Force
Enable-WSManCredSSP -Role Server –Force
  • Reboot the Launcher machines.
  • Logon to the VSI file server.
  • Open the Task Scheduler
  • Create a new task. In this example I’ll call mine Login VSI weekly – Sunday 4am.
  • You can choose run whether user is logged or not. If you are going to test run the task in this case it runs in the background. To check if it is working it might be easier to set it to Run only when user is logged on.
  • Create a new trigger for this task.

scheduling automatic login vsi performance tests for your virtualized desktop environment new trigger

  • Then create an action. The argument is pointing to the PowerShell script you saved in a previous step.

scheduling automatic login vsi performance tests for your virtualized desktop environment edit action

  • Hit OK and manually kick off the task to see if everything works!

Conclusion

As you can see, it’s pretty straightforward to automatically schedule a Login VSI test with this Powershell script. Just configure it once and you’re good to go. Enjoy your weekend while Login VSI is automatically simulating thousands of virtual users for you. To your VSImax!

About the author

Tags: How-to, Login VSI, Load Testing, Support, Scripts

Popular Blogs

Login VSI Blog Article - Microsoft Windows 10 Default FTA Associations - Teaser Image

Windows 10 Default File Type Associations and Login VSI

When Login VSI 4.1 was released, the majority of desktops were running Windows 7 and life was easy. We’d set the default filetype for an application and it would simply work. Continue Reading
Login VSI - Press Release - IGEL - Login VSI Partner to Optimize End User Computing Experience Image

[Press Release] IGEL Partners with Login VSI to Optimize the End User Computing Experience

Login PI enables organizations to better protect the performance and availability of their IGEL OS-powered virtual desktop environments Continue Reading
Login VSI - Blog - Login PI Blog Teaser Image - Windows Virtual Desktop: How To Monitor User Experience With Login PI

Windows Virtual Desktop – How to Monitor User Experience?

Microsoft has just announced the public preview of their new Windows Virtual Desktop (WVD) offering at Microsoft Ignite on Tour in Amsterdam today. For those of you who’ve not followed the rumors or the private beta, here’s the outline... Continue Reading
Login VSI Blog - Teaser Image - A Practical Guide to VDI Change Management - Part 1

A Practical Guide to VDI Change Management

Part 1: IT Change Management in general The first in an 8-part series, this practical guide to VDI Change Management will guide you through the transformation of the IT department from a back-end function into a core competency for every modern organization. Continue Reading
Investigating Online Application Performance with Login PI

Investigating Online Application Performance with Login PI

As many companies do, we use a CRM system. Recently, I have been getting complaints about our cloud CRM system, Microsoft Dynamics, being slow. I tried to investigate this by shadowing one of our users to see what was wrong. Continue Reading
Login VSI Blog - How-To Update, Protect Against RIDL, Fallout MDS Vulnerability

How-To: Update, Protect Against RIDL, Fallout MDS Vulnerability

RIDL & Fallout MDS vulnerabilities, impact on VDI performance & actions to take. FAQs we’re receiving & updates on performance tests executed to patch flaws Intel calls “Microarchitectural Data Sampling (M.D.S.)” aka: Rogue In-Flight Data Load (RIDL), Fallout, ZombieLoad & Store-to-Leak Forwarding. Continue Reading
Cookie Settings