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

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!

 


 

Start using Login VSI today

Our industry-standard software is built to help you avoid problems, lower costs and improve performance. Request a Quote or get your free Trial below, and benefit from our award-winning services.

Free Price Request  Your Free Trial

 


About the company Login VSI

The company Login VSI provides end-user performance insights for virtualized desktop and server-based computing environments. Enterprise IT departments use flagship product Login VSI (for load testing) and Login PI (for continuity testing) in all phases of their virtual desktop deployment—from planning to deployment to change management—to build and safeguard a good performance, a high availability, and (as a result) a good and consistent end-user experience. For more information about Login VSI or for a free test license contact us.

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

Popular Blogs

Login VSI Blog - Ongoing Effects CPU Flaws

The Ongoing Effects of Intel CPU Flaws

The Ongoing Effects of Intel CPU Flaws Over the last year, we’ve seen many Intel CPU hardware flaws come to light and when news first broke about Meltdown & Spectre there was a lot of panic: "should we patch?", "What’s the performance impact?", "Can we still rely on this hardware?" 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
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
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
A Practical Guide To VDI Change Management, Part 3

A Practical Guide to VDI Change Management

Part 3: Change Accelerates with Windows 10 The third in an 8-part series, this practical guide to VDI Change Management gives you the low-down on the what, why and how of Windows 10 updates and changes Continue Reading
Login VSI Blog - Teaser Image - A Practical Guide to VDI Change Management - Part 2

A Practical Guide to VDI Change Management

Part 2: Why VDI is very sensitive to change The second in an 8-part series, this practical guide to VDI Change Management highlights the importance of effective Change Management. With all the complexities of VDI environments, any failure can severely impact your business. Continue Reading
Cookie Settings