Prerequisites for VMware VDI Monitoring

Prerequisites for VMware VDI Monitoring

Site24x7 monitors VMware Horizon as a part of VMware virtual desktop infrastructure (VDI) monitoring

Site24x7 collects VMware VDI metrics using Windows On-Premise Poller via the PowerShell scriptlets available in VMware, known as the VMware PowerCLI Module.

Prerequisites

  1. PowerShell major version 5 and above. Open powershell.exe in the machine, and use $PSVersionTable.PSVersion to determine the engine version.
  2. Enable the VMware PowerCLI Module in PowerShell for monitoring purposes. 
  3. Install the Site24x7 On-Premise Poller on a Windows machine with access to the VMware View Connection Servers.

Enabling the VMware PowerCLI Module in PowerShell

From a computer with an internet connection, open PowerShell (preferably as an administrator) and execute the following commands:
Find-Module -Name VMware.PowerCLI
Install-Module -Name VMware.PowerCLI -Scope CurrentUser
Get-Command -Module *VMWare*
Install-Module -Name VMware.PowerCLI -Scope CurrentUser

Resolve a PowerShell script error during VMware VDI onboarding

While adding a VMware VDI monitor using the Site24x7 PowerShell onboarding script,  you may face errors related to Connect-HVServer cmdlet or missing Horizon modules. To fix such errors, follow these steps:

1. Install VMware PowerCLI module: Open PowerShell as an administrator and execute the following command:
Install-Module -Name VMware.PowerCLI -Scope CurrentUser -AllowClobber
    During installation, you may be prompted to trust the repository. Type A (Yes to All) and press Enter to continue.
    You should see the installation progress in a blue background at the top of the PowerShell window.

2. Set execution policy: Ensure that PowerShell is allowed to run local scripts by executing:
Set-ExecutionPolicy RemoteSigned
     Confirm the policy change when prompted.

3. Verify installed modules: Check which VMware modules are currently installed:
Get-InstalledModule -Name VMware.*
     Look for the VMware.VimAutomation.HorizonView module in the list. If the HorizonView module is not listed, install it using:
Install-Module -Name VMware.VimAutomation.HorizonView -Scope CurrentUser -AllowClobber
      Again, you may be prompted to trust the repository. Type A (Yes to All), then press Enter to continue, noting the installation progress in a blue background at the top of the PowerShell window.

4. Validate cmdlet availability: Ensure the environment is ready by executing the following command:
Get-Command Connect-HVServer -Verbose
     If the Connect-HVServer cmdlet appears in the output without errors, the PowerShell environment is correctly configured for VMware Horizon.