Microsoft Teams Optimization with Horizon

Overview

Making a video call from a virtual desktop can be tricky. When the call is initiated in the virtual desktop, the user’s microphone and camera send the user’s voice and image to the virtual desktop. Horizon sends that data compressed, using our real-time audio-video (RTAV) feature. But the RTAV feature still sends a lot of data across the wire, and the virtual desktop has to process the data and send it out over the network to complete the call. At the same time, the virtual desktop is capturing the video feed and sending it back over the network, using the Blast display protocol, to the endpoint so that the end user can see the video feed.

Omnissa, working closely with Microsoft, supports Media Optimization for Microsoft Teams with Omnissa Horizon 8. With the supported Horizon Agent and Horizon Client versions, when a user starts a call inside the virtual desktop, a channel to the local physical device is opened and the call is started there.

Horizon Client draws over the Microsoft Teams window in the virtual desktop VM, giving users the impression that they are still in the VM, but the media is actually traveling directly between the local endpoint and the remote peer (as shown in Figure 1). The load disappears from the network, and the processing moves from the data center to the endpoint. Often the end-user experience improves as well because the data has one less hop to make. Using this mechanism, this process avoids using RTAV altogether.

The Media Optimization for Microsoft Teams feature is a boon for organizations using Microsoft Teams for audio and video calls. This document helps you plan for deploying it. The following diagram describes the flow of data between the various components of the Microsoft Teams optimization feature in Horizon.

A diagram of a computer system

Description automatically generated

Figure 1: Microsoft Teams Optimization Flow

Horizon Client Versions

Media Optimization for the new Microsoft Teams client is supported as part of Omnissa Horizon 8.4 (2111 and later). Horizon versions earlier than 8.4 have not been tested. The Media Optimization for Microsoft Teams feature is also available with Horizon Cloud on Microsoft Azure, Pod Manifest version 2298.X and later.

The Media Optimization for Microsoft Teams group policy setting must be turned on in the virtual desktop for Horizon Agent 8.7 (2209) and earlier. For Horizon Agent 8.8 (2212) and later, Media Optimization for Microsoft Teams is turned on by default when Horizon Agent is installed. 

Note: The Microsoft Teams web app (browser client) is not supported via the Teams Optimization Pack. Web browser media offload is supported with the Browser Redirection feature. See Configuring Browser Content Redirection for support details.

Minimum Supported Horizon Client Versions

Horizon supports audio, video, and screen-sharing offload to the local endpoint, providing media optimization for Microsoft Teams on VDI, RDSH remote desktops and Microsoft Teams as a published application.

Below is a list of the minimum supported versions of the Horizon client for each OS platform,

Table 1: Minimum Supported Horizon Client Versions

OS Platform

Minimum Supported Horizon Client Versions

Windows

Horizon 8.4 (2111 and later)

Mac

Horizon 8.4 (2111 and later)

Linux

Horizon 8.4 (2111 and later)

Chrome

Horizon 8.4 (2111 and later)

For a complete list of features supported on each OS platform, see the Horizon 8 documentation, Media Optimization for Microsoft Teams, which includes sections on requirements, and limitations.

Refer to Knowledgebase article MS Teams Optimization Feature Compatibility Matrix for Horizon 7 and Horizon 8 Recent Releases. (86475) for a matrix of Microsoft Teams Optimization features that are dependent on a Horizon Agent or a Horizon Client version.

For Horizon Cloud Service on Microsoft Azure (also known as Horizon Cloud Service – first-gen), see Horizon Cloud on Microsoft Azure - Support of Media Optimization for Microsoft Teams

Horizon System Requirements

This section provides links to the product documentation regarding the system requirements for both the client and the virtual desktop when using the Media Optimization for Microsoft Teams feature. For more details, see Media Optimization for Microsoft Teams.

  • Client systems – This feature is supported on Windows, Linux, and Mac operating systems that are supported for the specific version of Horizon Client installed. See the System Requirements section in the applicable Horizon Client guide or Horizon Client release notes, available at Horizon Clients Documentation.
    Note: The client system should have a 2.4 GHz or more dual core.
  • Virtual desktop systems – This feature is supported on Windows operating systems that are both supported for the specific version of Horizon Agent installed on the virtual desktop and for Windows operating systems supported by Microsoft Teams. See the “Compatibility Notes” section in the applicable Horizon 8 release notes.  For operating systems supported by Microsoft New Teams, refer to the Microsoft documentation.
    Note: The desktop system should have 2 vCPUs or more.

Note: System requirements for RTAV are different and more substantial than those for Media Optimization for Microsoft Teams. RTAV is used if Media Optimization is not turned on or if the endpoint does not support Media Optimization (fallback mode). For more information about using Microsoft Teams with RTAV, see the Horizon documentation for the appropriate version: Configuring Microsoft Teams with Real-Time Audio-Video and System Requirements for Real-Time Audio-Video.

Horizon Client Installation

Use the following guidance for installation of the Horizon Client on Windows, MacOS, and Linux.

Windows Client

In the Horizon Client for Windows, the Media Optimization for Microsoft Teams feature is installed by default.

With Horizon Client for Windows 2203 and earlier, you can see the setting if you select Customize Installation in the installer. For Horizon Client for Windows 2206 and later, you cannot see the setting in the installer; the feature is always installed.

Microsoft Teams Optimization Feature in the Horizon Client for Windows Installation Wizard

Figure 2: Microsoft Teams Optimization Feature in the Horizon Client for Windows Installation Wizard (Available Only in Horizon Client for Windows 2203 and earlier)

MacOS Client

In Horizon Client for Mac, Media Optimization for Microsoft Teams is installed by default. Double-click the .dmg file to open it, and drag the Horizon Client icon to the Applications folder.

Figure 3: Microsoft Teams Optimization Feature in the Horizon Client for Mac

Linux Client

In the Horizon Client for Linux, Media Optimization for Microsoft Teams is also installed by default.

If you are using Horizon Client for Linux 2206 or earlier, you can see the Media Optimization for Microsoft Teams option is selected in the installation wizard, as shown below. For Horizon Client for Linux 2209 and later, the option to not install the feature is not available; the feature is always installed.

Graphical user interface, application

Description automatically generated

Figure 4: Microsoft Teams Optimization Feature in the Horizon Client for Linux Installation Wizard (Option to not install this feature is available only in Horizon Client for Linux 2206 or Earlier)

Horizon Agent Installation and Configuration

With Horizon Agent version 2212 and later, Media Optimization is enabled by default.

During installation of Horizon Agent version 2212 and later, the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\VMware, Inc.\VMware WebRTCRedir” teamsEnabled (REG_DWORD) is automatically created and set to 1. This turns on Media Optimization by default.

Horizon Agent Version 2209 and Earlier

With Horizon Agent 2209 and earlier, Media Optimization is controlled with a GPO, which is not turned on by default.

For Horizon Agent 2209 and earlier versions, enable this using the following process:

  1. Extract the Group Policy settings files available in the Horizon-Extras bundle and apply the following setting to the RDS host(s) with either a domain group policy or a local group policy.

Computer Configuration > Administrative Templates > VMware View Agent Configuration > VMware HTML5 Features > VMware WebRTC Redirection Features > Enable Media Optimization for Microsoft Teams

  1. Double-click to open the policy, select Enabled, and click OK.

Graphical user interface, text, application, email

Description automatically generated

Figure 5: Enabling the Microsoft Teams Optimization Feature in Agent Versions 2209 and earlier using a Group Policy

After setting this policy, you must log out of the Horizon desktop for the GPO policy to take effect.

Note: If you change the Media Optimization GPO selection to Enabled or Disabled, and then back to Not Configured, Media Optimization will be turned off (the teamsEnabled registry key gets removed). 

Force Client Side WebRTC Optimization

With Horizon Agent 2212 and later, there is a Force client side WebRTC optimization check box that is available when the Enable Media Optimization for Microsoft Teams policy is set to Enabled. If Force client side WebRTC optimization is checked, Microsoft Teams Media Optimization is forced on the endpoint, and any client setting or any other admin policy (for example, the Chrome-level user policy for the Chrome client) is ignored.

If Force client side WebRTC optimization is unchecked, Windows endpoint users have the option to use or not use Microsoft Teams Optimization by configuring the Horizon Client setting called Media Optimization for WebRTC based applications. Also, any Chrome-level user policy would take effect. By default, Force client side WebRTC optimization is not selected. 

Graphical user interface, text, application

Description automatically generated

Figure 6: Group Policy Setting for Configuring  the Microsoft Teams Optimization Feature with Horizon Agent 2212 and Later

Microsoft Teams Client Installation

To install the new Microsoft Teams Client on the Horizon Agent machine, refer to the guidance provided on the Microsoft website, at https://learn.microsoft.com/en-us/microsoftteams/new-teams-vdi-requirements-deploy.

The instructions below summarize those instructions.

Windows Desktop Installation

To install the new Teams app into a Horizon 8 Windows desktop golden image, use the teamsbootstrapper.exe utility provided by Microsoft for VDI environments.  At a high level, use the following steps:

  1. Install the Teams Client
  2. Disable Autoupdate

Install Teams Client

  1. Download the bootstrapper.exe utility.
  2. Download the Teams MSIX installation file.
  3. Open a Command Prompt as an Administrator
  4. Run the following command, modifying the path to match the location of where you downloaded the files to.

.\teamsbootstrapper.exe -p -o "c:\path\to\ MSTeams-x64.msix"

Replace C:\path\to\MSTeams-x64.msix with the actual path to the downloaded MSIX file.

Disable Autoupdate

To prevent new Teams client from auto updating, use the following registry key on the virtual machine. Only new Team client builds higher than 23306.3314.2555.9628 in VDI can process this registry key.

  1. Open regedit, and navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
  2. Right-click and create a New Key called Teams
  3. Select the Teams key, right-click and add a new DWORD (32-bit) Value
  4. Edit the new Value and change:
    1. Value name = disableAutoUpdate
    2. Value data = 1

Windows Server Installation

As the Microsoft Store is not available on Server OS, the process to install the new Teams client is slightly different. This uses DISM to install the client, which requires Microsoft Edge WebView2 to be installed and sideloading to non-store apps to be enabled.

At a high level, use the following steps:

  1. Install Microsoft Edge WebView2
  2. Enable Side-loading of Microsoft Store Apps
  3. Install the Teams Client
  4. Disable Autoupdate
  5. Add Microsoft New Teams as a Hosted Application
  6. Optional: Outlook Presence Integration with New Teams in Windows Server

Note: Horizon Agent version 2312.1 or later is required to support the publishing of a store app in Horizon.

Install Microsoft Edge WebView2

The Microsoft Edge WebView2 framework is required in Windows Server and Windows 10/11 Multi-User environments. The minimum version required is: 90.0.818.66. Learn more: Enterprise management of WebView2 Runtimes.

  1. Download and install Microsoft Edge WebView2 as an Administrator.

Enable Side-loading of Microsoft Store Apps

As the Teams client is not being downloaded from the Microsoft store, we need to enable side-loading of store apps to be able to install it. If desired, this can be turned off again after installation is completed.

  1. Open the Local Group Policy Editor (gpedit.msc) and navigate to:

Computer Configuration > Administrative Templates > Windows Components > App Package Deployment > Allow all trusted apps to install

  1. Double-click to open the policy, select Enabled, and click OK.

A screenshot of a computer

Description automatically generated

Figure 8: Enable Side-loading of Microsoft Store Apps

Install the Teams Client

With the system prepared, you can now install the new Teams client

  1. Download the Teams MSIX installation file.
  2. Open a Command Prompt as an Administrator and run:

Dism /Online /Add-ProvisionedAppxPackage /PackagePath:"c:\path\to\ MSTeams-x64.msix" /SkipLicense

Replace C:\path\to\MSTeams-x64.msix with the actual path to the downloaded MSIX file.

  1. After installing, you can verify the Teams client installation using the following command:

DISM /Online /Get-ProvisionedAppxPackages

Look through the output for an MSTeams entry to confirm it's correctly installed. Record the PackageName for reference.

Disable Autoupdate

To prevent new Teams client from auto updating, use the following registry key on the virtual machine. Only new Team client builds higher than 23306.3314.2555.9628 can process this registry key.

  1. Open regedit, and navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
  2. Right-click and create a New Key called Teams
  3. Select the Teams key, right-click and add a new DWORD (32-bit) Value
  4. Edit the new Value and change:
    1. Value name = disableAutoUpdate
    2. Value data = 1

Add Microsoft New Teams as a Hosted Application

To configure Microsoft New Teams as a hosted (published) applications, a policy needs to be enabled that allows Microsoft Store Apps (also known as UWP) to be scanned and launched on RDSH farms (for operating system versions that supports Microsoft Store Applications). When enabled, store apps can be used as Hosted Apps from RDSH farms.

Apply the following setting to the RDS host(s) with either a local group policy, or a domain group policy. Be conscious that if your golden image is not domain joined, that a domain group policy will not be applied. In that case, apply this setting using the Local Group Policy Editor.

  1. Extract the Group Policy template files available in the Horizon-Extras bundle and copy to the C:\Windows\PolicyDefinitions folder on either the golden image, or on a domain controller depending on what policy type you are using.
  2. Depending on how you are applying the policy, open either the Local Group Policy Editor (gpedit.msc) or the domain Group Policy Management console, and navigate to:

Computer Configuration > Administrative Templates > VMware View Agent Configuration > Unity Touch and Hosted Apps > Enable UWP support on RDSH platforms

  1. Double-click to open the policy, select Enabled, and click OK.

 

Figure 9: Configure the Group Policy to UWP Apps on the RDSH Farm

  1. Restart the Horizon View Agent service (wsnm) or restart RDSH server to have the GPO take effect.
  2. The New Teams UWP app should now be available when publishing a new Application Pool in the Horizon Administrator Console, using the Add from Installed Applications selection.

Outlook Presence Integration with New Teams in Windows Server (Optional)

For Outlook to properly display presence status, the steps outlined in the following Microsoft documentation are required on the golden image.

https://learn.microsoft.com/en-us/microsoftteams/new-teams-vdi-requirements-deploy#outlook-presence-integration-with-new-teams-in-windows-server-2019

Packaging the Teams Client with App Volumes

As the new Teams client uses an MSIX package, it is not possible to capture in App Volumes using the standard packaging procedure. Instead, the App Volumes tools can be used to capture the new Teams client.

Use the process outlined in the following knowledgebase article: Capturing new teams as a package in App Volumes 4.x (6000003)

Dynamic Environment Manager

Omnissa Dynamic Environment Manager (DEM) can be used to retain user configuration, as well as create shortcuts to make user access easier and more consistent.

Configuration Template

Review the guidance in the Omnissa Community Configuration Template for Teams 2.1. This includes recommendations for folders to include and exclude.

https://community.omnissa.com/forums/topic/179-microsoft-teams-21

Shortcut

You may want to create a shortcut on the desktop for the Teams client. See Configure Shortcuts for instructions on how to create shortcuts using Dynamic Environment Manager.

In the DEM console, create a new shortcut and define the target as:

%localappdata%\Microsoft\WindowsApps\MSTeams_8wekyb3d8bbwe\ms-teams.exe

Media Optimization Configuration

Horizon Client Media Optimization for WebRTC Based Applications Option

With Horizon Client for Windows 2209 and later, Media Optimization for WebRTC based applications can be turned off in the Horizon Client Calls and Sharing settings. This setting is on by default. It is recommended to leave this setting on to improve the overall media experience. If this setting is off, Media Optimization will not be used, Microsoft Teams will be used in fallback mode (as described in the next section, Pairing Modes), which means that RTAV will be used.

Note that if the administrator has the Force client side WebRTC Optimization GPO policy turned on, this Horizon Client setting will have no effect.

Graphical user interface, application

Description automatically generated

Figure 10: Calls and Sharing Setting with Option to Turn On Media Optimization for WebRTC Based Applications

Pairing Modes

As described in the overview of this guide, there are significant advantages to running Microsoft Teams in optimized mode. However, as you are planning your implementation, keep in mind that end users who are not running supported Horizon Client versions will not be able to take advantage of this feature.

They will not, however, go back to running the full client in the virtual desktop because the GPO (or teamsEnabled registry key) has set Microsoft Teams to offload audio and video to the client. Those users will instead run in fallback mode. Fallback mode has all the functional limitations of WebRTC (Web Real-Time Communication) but is still pushing all the data to the virtual desktop over RTAV.

  • A user can check if Microsoft Teams is running in optimized mode, fallback mode, or natively (no optimization) in the virtual desktop. See Check If Microsoft Teams Launched in Optimized Mode for instructions.
  • In the About Teams view, below the Teams version number, it will say VMware Media Optimized, VMware Media Not Connected, or not show any text about VMware.

VMware Media Optimized

  • If the banner shows VMware Media Optimized, Media Optimization for Microsoft Teams is turned on (either by the GPO or the teamsEnabled registry key).
  • Microsoft Teams is running in the virtual desktop, and audio and video are offloaded to the client machine. 

VMware Media Not Connected (Fallback)

  • If the banner shows VMware Media Not Connected, then Microsoft Teams is running in fallback mode.
  • In this mode, Media Optimization for Microsoft Teams is turned on, and Microsoft Teams has tried to start in optimized mode, but the version of Horizon Client being used does not support Microsoft Teams optimization or Horizon Client setting Media Optimization for WebRTC based applications is disabled.
  • In Fallback mode, RTAV is used, and audio and video from Microsoft Teams are not offloaded to the client machine. Fallback mode has the same limitations as optimized mode.
  • When you make a call in fallback mode, you see a warning message on the call:

Couldn’t connect to your device for multimedia optimization. Audio and video quality may be reduced, and your default microphone and speaker might have changed. Please try to restart the Teams app, or contact your Help Desk.

Or

Your device doesn’t support VMware Optimization. Audio and video quality may be reduced. Talk to your IT admin.

No VMware text (No optimization)

  • If the banner does not show VMware text in the message, Media Optimization for Microsoft Teams is not turned on.
  • RTAV is used, and audio and video from Microsoft Teams are not offloaded to the client machine.

Starting with Horizon Agent 2212, Media Optimization is turned on by default. You might consider turning Media Optimization off after reviewing the following:

  • Are any of the existing limitations of running Microsoft Teams on WebRTC blockers for your environment? Microsoft is continuously adding features.
  • If you have full-clone persistent desktops, can you apply the GPO to only those users who will be able to run in optimized mode?
  • If your end users do not fall neatly into a group that can run the supported versions of Horizon Clients on Windows, Linux, or Mac platforms, how many of your users are running older versions or some other unsupported OS? Can you be sure that your endpoints are running the latest version of Horizon Client for Windows, Linux, or Mac platforms?
  • If you decide that the benefits of optimization are worth having some users running in fallback mode, plan on resourcing your VMs to run either in optimized mode or in fallback mode. See the requirements below.

Optional Configuration Settings for Echo for Low-Powered Windows Clients

To reduce CPU usage for certain low-powered clients, users may want to use a non-default acoustic echo cancellation algorithm that uses less CPU or turn off software acoustic echo cancellation. In most cases, Omnissa recommends using the default configuration, which is designed for optimal audio experience. But if you are trying to reduce client CPU consumption, software acoustic echo cancellation can be configured by using a GPO on the Horizon Agent or by setting a registry key on the Horizon Client.

Note: This configuration is supported only on Windows Clients. This GPO will have no effect on Linux and Mac clients. This option is available with Horizon 2111 and later.

On Horizon Agent, the GPO can be configured by navigating to Computer Configuration > Administrative Templates > VMware View Agent Configuration > VMware HTML5 Features > VMware WebRTC Redirection Features > Enable software acoustic echo cancellation for Media Optimization for Microsoft Teams. 4

  • To turn off software acoustic echo cancellation, set to Disabled.
  • To use the software acoustic echo cancellation algorithm that uses less CPU, set to Enabled and uncheck Use recommended AEC algorithm.

After setting this policy, you must log out of the Horizon desktop for the GPO policies to take effect.

Graphical user interface, text, application, Word

Description automatically generated

Figure 11: Path in the Group Policy Editor for Configuring Software Acoustic Echo Cancellation

Graphical user interface, text, application

Description automatically generated

Figure 12: Group Policy Setting for Configuring Software Acoustic Echo Cancellation with Horizon 2111 and later

This configuration can also be applied on the Horizon Client for Windows 2111 or later device by setting the following registry key:

HKEY_CURRENT_USER\SOFTWARE\VMware, Inc.\VMware Html5mmr\WebrtcRedir
enableAEC (REG_DWORD)

Use one of the following settings:

  • Set to 0 – Turn off software acoustic echo cancellation.
  • Set to 1 – Turn on software acoustic echo cancellation irrespective of whether or not acoustic echo cancellation is available in the hardware.
  • Set to 2 – Turn on non-default software acoustic echo cancellation algorithm, which uses less CPU but compromises audio quality.
  • Registry key not present (default) – Software acoustic echo cancellation is turned on only if hardware acoustic cancellation is not available.

Optional Configuration Setting for Reducing CPU Usage with Video and Screenshares for Low-Powered Clients

To reduce CPU usage for certain low-powered clients, users can reduce their sent video resolution and screenshare framerate. CPU usage for video processing is estimated and if it is greater than the set threshold, sent video resolution and screenshare framerate will automatically be reduced.

On Horizon Agent 2106 and later, the GPO can be configured by navigating to Computer Configuration > Administrative Templates > VMware View Agent Configuration > VMware HTML5 Features > Vmware WebRTC Redirection Features > Configure CPU overuse threshold.

  1. Set Configure CPU overuse threshold to Enabled and enter a value less than 85 (for example, 40).
  2. After setting this policy, you must log out of the Horizon desktop for the GPO policies to take effect.
  3. Establish a video call and assess the client’s CPU and the video resolution as seen by the peer.

Adjust the CPU threshold value to your needs. With a lower value, you can lower CPU consumption at the expense of reducing the sent image resolution and screenshare FPS. Note that it may take several seconds for video resolution and screenshare FPS to adjust.

Graphical user interface, text, application

Description automatically generated

Figure 13: Group Policy Setting for Configuring CPU Overuse Threshold with Horizon Agent 2106 or Later

To get more details, you can turn on increased media logs by setting the following registry key to 1:

HKEY_CURRENT_USER\SOFTWARE\VMware, Inc.\VMware Html5mmr\WebrtcRedir
html5mmr.log.webrtc.sharedlib.media

With the increased media logs, the html5client logs will show:

  • When the resolution was limited; for example, “Limit resolution to 764 x 428”
  • When the screenshare was limited; for example, “webrtc [Run] wait 87 fps=8..."

Html5client logs can be found in %TEMP%\vmware-<username>. Look for the log file vmware-html5Client-*.log.

Additional Considerations

When deploying this feature, also take the following guidelines into account.

Network Ports and Firewalls

Microsoft Teams requires that the following ports be open on the client side: TCP ports 80 and 443, and UDP ports 3478 through 3481. For more information, see the Microsoft Teams documentation topic Prepare your organization’s network for Microsoft Teams. The ports described on that page are required to be opened on the client device.

Note: The usual Horizon ports are also required, as detailed in the following documents:

Some organizations might require that the process name of the Teams Optimization Pack be added to a firewall allowlist, to allow communication to the Microsoft Teams Cloud server. The process name is vmware-remotemks.exe on the client machine.

Incompatibility with Citrix Agent

For Media Optimization for Microsoft Teams to work properly, Citrix Agent should not be installed. This is a Microsoft restriction. See the section Issue4: There is a Conflicting Agent Installation of this guide for more details.

Troubleshooting

To troubleshoot, first check whether Microsoft Teams launched in optimized mode. Also, check the configuration on the Horizon Agent and the Horizon Client Device as described in the following sections.

Procedures for these common troubleshooting steps are described in the following sections:

  1. Check and Troubleshoot Microsoft Teams Optimized Mode (separate section below).
  2. Microsoft Teams Redirection Plugin Is Not Present on Horizon Client
  3. Check That Media Optimization Is Turned On in Horizon Client Calls and Sharing Settings
  4. Use the Logs to Confirm Optimization Is Turned On
  5. Comparing with the Microsoft Teams Web App
  6. Collect Logs

Microsoft Teams Redirection Plugin Is Not Present on Horizon Client

For the Windows client:

  1. Open File Explorer
  2. Navigate to C:\Program Files (x86)\Vmware\Vmware Horizon View Client\x64
  3. Verify that webrtc_sharedlib.dll is present.

the Microsoft Teams redirection plugin webrtc_sharedlib.dll installed on the client

Figure 20: Microsoft Teams Optimization Plugin DLL on the Windows Client

For the Linux Client,

  1. Check that libwebrtc_sharedlib.so is present in the  “/usr/lib/vmware/view/vdpService/webrtcRedir” folder and it has the correct permissions.

Figure 21: Microsoft Teams Optimization Plugin Library on the Linux Client

For the Mac client:

  1. Open Finder
  2. Navigate to the following folder, “/Applications/Vmware Horizon Client With Teams Optimization.app/Contents/Library/pcoip/vchan_plugins/vdpservice
  3. Check that libwebrtc_sharedlib.dylib is present.

Figure 22: Microsoft Teams Optimization Plugin Library on the Mac Client

If the webrtc_sharedlib library is missing on your client, confirm that you are using a version of Horizon Client that supports Media Optimization.

If you are using a version of Horizon Client that supports Media Optimization and the webrtc_sharedlib library is missing on your client, uninistall and reinstall Horizon Client.  When installing and if using Horizon Client for Windows 2203 and earlier or Horizon Client for Linux 2206 or earlier, ensure that Media Optimization for Microsoft Teams check box has been selected in the Horizon Client Installation.  Refer to the installation guidance for Horizon Client for Windows or Linux, as described in Horizon Client Installation.  With recent client releases, Media Optimization for Microsoft Teams is always installed.

If the webrtc_sharedlib library is still missing on your client, contact Omnissa for further assistance.

Check That Media Optimization Is Turned On in Horizon Client Calls and Sharing Settings

This issue would only occur with Horizon Client for Windows 2209 or later. With Horizon Client 2209 or later, open the Horizon Client Calls and Sharing settings and confirm that Media Optimization for WebRTC based applications is turned on.  See Horizon Client Media Optimization for WebRTC Based Applications Option.

Figure 15: Media Optimization for WebRTC based applications

If Media Optimization for WebRTC based applications is not on, turn it on and reconnect to the desktop.

Use the Logs to Confirm Optimization Is Turned On

You can confirm if optimization is turned on by examining the Html5Server logs on the Horizon Agent Desktop and in the Horizon5Client logs on the Horizon Client device.

Html5Server Log on the Horizon Agent Desktop

Important: For the following step, you need to have administrator privileges on your virtual desktop operating system.

  1. On your VM, open File Explorer,
  2. Navigate to C:\Windows\TEMP\vmware-SYSTEM.
  3. Look for the log file vmware-html5Server-extra-*-*.log with the latest timestamp.

If you see the below highlighted section, then Microsoft Teams optimization has been turned on for your VM.

A screen shot of a computer code

Description automatically generated

Figure 19: The Most Recent html5Server Log Displaying “allow”:”true”

Note: For your convenience, the highlighted text you can search for includes the following settings:

“command”:”createInstanceDone”
“featuresSupported”:[“video”,”screenshare”,”multimonitorscreenshare”]

Html5Client Log on the Horizon Client Device

On a Windows client,

  1. Open File Explorer
  2. Navigate to the folder %TEMP%\vmware-<username>.
  3. Look for the log file vmware-html5Client-*.log with the latest timestamp.

On a Linux client, the log file can be found under /tmp/vmware-<username>.

On a Mac client, the log file can be found under ~/Library/Logs/VMware.

If you see the below highlighted section in the logs, then Microsoft Teams optimization has been correctly turned on for your session.

Figure 23: The Most Recent html5Client Log Displaying “allow”:”true”

Note: For your convenience, the highlighted text you can search for includes the following settings:

"command":"createInstanceDone"
"featuresSupported":["video","screenshare","multimonitorscreenshare"]

Comparing with the Microsoft Teams Web App

If Microsoft Teams on VDI is optimized and you are running into generic issues, or if you find that features are missing, check if you see the same behavior when using the Microsoft Teams web client. The Media Optimization for Microsoft Teams solution on VDI is based on the Microsoft Teams web client, which leverages WebRTC technology.

If you see the same behavior on the web client, or if you find that a feature is missing, contact Microsoft for further assistance.

Collect Logs

This section describes how to collect logs from the virtual desktop, the client device, and the Microsoft Teams app.

Collecting Horizon Logs

Collect Horizon logs from the remote desktop and the client machine by following the instructions in the Knowledge Base article Collecting Horizon View (vdm) log bundles (1017939).

Collecting Microsoft Teams Logs

Collect Microsoft Teams logs by clicking on the Microsoft Teams application inside the desktop, and using the keyboard shortcut Ctrl+Alt+Shift+1. For more information, refer to https://docs.microsoft.com/en-us/microsoftteams/log-files.

Check and Troubleshoot Microsoft Teams Optimized Mode

One of the first troubleshooting steps is to determine if Microsoft Teams is in optimized mode. Use the process below to check if Microsoft Teams launched in optimized mode, and the subsequent sections to troubleshoot possible issues.

Check If Microsoft Teams Launched in Optimized Mode

Use the Microsoft Teams client to determine if it is in optimized mode or not.

  1. In the top-right corner of the Microsoft Teams interface, click the three dots near the user icon
  2. Navigate to Settings.
  3. At the bottom of the pop out Settings menu, click on About Teams
  4. In the About Teams view, below the Teams version number, it should say VMware Media Optimized, indicating that Microsoft Teams has launched in optimized mode. 

Note: It may take a few seconds for new Teams to detect the configuration and display the text.

A screenshot of a computer

Description automatically generated

Figure 14: Version Box for Microsoft Teams

If you do not see VMware Media Optimized, review the common issues below that covers possible desktop configuration causes of Microsoft Teams to not be in Optimized Mode.

teamsEnabled Registry Key Is Not Set Correctly

Launch registry editor (regedit) inside the VDI desktop and check the value of the following key.

“HKEY_LOCAL_MACHINE\SOFTWARE\Policies\VMware, Inc.\Vmware WebRTCRedir” teamsEnabled (REG_DWORD) is set to 1.

TeamsEnabled Registry key in Horizon Agent

Figure 16: Registry Key for Turning on Microsoft Teams Optimization

If the registry key is not set and you are using Horizon Agent 2209 or earlier, follow the installation guidance for Horizon Agent to enable the Media Optimization for Microsoft Teams GPO, as described in Horizon Agent Installation and Configuration. Also note that you need to log out of the Horizon desktop for GPO policies to be applied.

If the registry key is not set and you are using Horizon Agent 2212 or later, uninstall Horizon Agent and reinstall. The teamsEnabled registry key should be added when Horizon Agent is installed. If the registry key still is not set, contact VMware support.

Microsoft Teams Application May Not Have the Correct Settings

In the virtual desktop, restart Microsoft Teams to ensure that the correct settings have been applied by the Microsoft Teams client. Issues have been seen in Microsoft Teams where incorrect flags get applied. Restarting Teams ensures that the correct flags are pulled in and applied.

Microsoft Teams Has Incorrect Settings Stored in Cache

To clear the Microsoft Teams cache,

  1. Quit the Microsoft Teams application.
  2. Open File Explorer
  3. Delete the folder %localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams
  4. Restart Microsoft Teams.

This will force Microsoft Teams to reload its cache, which may have contained outdated values related to the environment.

Conflicting Agent Installation

To ensure that Microsoft is not detecting a conflicting Citrix Agent installation on the desktop, review the Microsoft logs. Instructions for collecting Microsoft logs are provided in the Microsoft documentation topic Configure log files for monitoring and troubleshooting in Teams.

  1. Open the summary.txt log and look for the value of vdiMode.

    If you see vdiMode = “2000”, it means Microsoft Teams has found a Citrix Agent registry key and will not load the Horizon component.
  2. Remove the following registry key entry or uninstall Citrix Agent software:

    “HKEY_LOCAL_MACHINE\Software\Citrix\PortICA”
  3. Uninstall and reinstall Microsoft Teams.

Virtual Desktop hosts File Is Missing “view-localhost”

During Horizon Agent Installation, 127.0.0.1 view-localhost is added to the hosts file. If the entry gets removed or if the hosts file gets overwritten, Microsoft Teams cannot communicate with html5server and as a result, Microsoft Teams will be in fallback mode.

Html5sever logs may show:

2022-07-05T15:54:45.050Z In(05) html5mmrServer SOCKET getaddrinfo failed for host view-localhost: No such host is known.
2022-07-05T15:54:45.050Z In(05) html5mmrServer SOCKET Could not resolve listener socket address.
2022-07-05T15:54:45.050Z In(05) html5mmrServer [0x000014BC][WebSocketServerImpl::StartServer] this = 0x256BE1EEAA0 Failed to listen to the socket.
2022-07-05T15:54:45.050Z In(05) html5mmrServer [0x000014BC] = Failed to start server.

This issue can sometimes occur with nested mode (Horizon Client installed on same VM as Horizon Agent).  When Horizon Client is uninstalled, 127.0.0.1 view-localhost is removed from the hosts file.

If 127.0.0.1 view-localhost is missing from your hosts file, add it.

html5Server Is Not Running

In an active Horizon session to the Horizon Agent VM, start the Task Manager window in the virtual desktop. Check if html5Server.exe is listed on the Details tab of the Task Manager.

html5Server.exe running as shown in the Task Manager

Figure 18: Task Manager Showing That html5Server.exe Is Running

If you do not see html5server.exe listed in the Task Manager, restart the VM and try again. If you still do not see html5server.exe running after the restart, contact Omnissa for further assistance.

If Using a Proxy on the Remote Desktop, Need “view-localhost” in Proxy Bypass List

This Issue would only occur if you have an Internet proxy configured on your remote desktop.  If you have an Internet proxy configured on your remote desktop you will need to add “view-localhost” in the proxy bypass list. Similarly, if you are using a .pac file, the .pac file should allow direct access to “view-localhost” and bypass the proxy. Otherwise, html5server will not work as expected.

Because html5server.exe also uses secure web sockets (wss protocol) to communicate with Microsoft Teams, ensure that your .pac file allows “wss://” traffic.

HTML5Server Registry Key is Included in User Profile Management Software Configuration

This issue would only occur if you are using user profile management software. If you use a user profile management software such as Dynamic Environment Manager or FSLogix, ensure that you have excluded the below registry key from profile management. This is an internal registry key used by html5Server.exe. Backing up and restoring the registry key may result in erroneous behavior.

HKEY_CURRENT_USER\Software\Vmware, Inc.\HTML5 Redirection Server

Symptoms of this condition may include seeing fallback mode on fresh login, and then optimized mode after disconnect or reconnect.

Summary and Additional Resources

The improved end-user experience, decreased load on the data center, and decrease in network traffic make Media Optimization for Microsoft Teams a compelling feature. A thoughtful rollout plan will keep users productive.

Additional Resources

See the Microsoft Documentation for details about Microsoft Teams installation, performance considerations, and feature limitations.

See the Horizon 8 Documentation for details about supported features and limitations.

See the Microsoft Live Events and Meetings documentation for a list of meetings and live events sub-features supported in VDI.

Changelog

The following updates were made to this guide.

Date

Description of Changes

2024-08-07

2024-07-31

  • Completely rewritten and reorganized for the new Microsoft Teams client
  • Updated for Omnissa docs, KB, and Tech Zone links.

2023-02-17

  • Added information about Horizon Client for Chrome.
  • Updated sections with version-specific information.
  • Added information about the Horizon Client Media Optimization for WebRTC based applications option.
  • Added the new section “Optional Configuration Setting for Reducing CPU Usage with Video and Screenshares for Low-Powered Clients.”
  • Added new troubleshooting steps.

2021-07-15

  • Added information about Horizon Client on Mac and Linux platforms.
  • Updated “Additional Considerations.”
  • Added new troubleshooting steps.

2020-12-22

  • Added information about required ports.
  • Added information about Horizon 7 version 7.13 support.

2020‑09-23

First release of the document

Authors and Contributors

Karen Li, Member of Technical Staff, Omnissa.

Graeme Gordon, Senior Staff Architect, Omnissa.

Kristina De Nike, Product Management, Omnissa.

Sonia Prabhu, Member of Technical Staff, Omnissa.

The following people contributed to this document:

Feedback

Your feedback is valuable. To comment on this paper, either use the feedback button or contact us at tech_content_feedback@omnissa.com.


Filter Tags

Horizon Horizon Horizon Cloud Service Document Operational Tutorial Technical Overview Intermediate Win10 and Windows Desktop Deploy Windows Delivery