Microsoft Teams Optimization with VMware Horizon

VMware Horizon 8
VMware Horizon 7 version 7.13
VMware Horizon Cloud Service on Microsoft Azure

Technical Overview of Media Optimization for Microsoft Teams

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. VMware 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 VMware Blast display protocol, to the endpoint so that the end user can see the video feed.

VMware, working closely with Microsoft, supports Media Optimization for Microsoft Teams with Horizon 8 (2006 and later) and Horizon 7 version 7.13. With the supported Horizon Agent and VMware 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.

Horizon Media Optimzation for Microsoft Teams workslow

Figure 1: Microsoft Teams Optimization Flow

Minimum Supported Horizon Client Versions

Horizon supports audio, video, and screen-sharing offload to the local endpoint on Windows, Mac, and Linux platforms. Below is a list of the minimum supported versions for each platform. For a complete list of features supported on each platform, see the product documentation topic for the version of Horizon that you are using.

  • Horizon 7.13 and Horizon 8 (2006 and later) – Media Optimization for Microsoft Teams on VDI desktops for Windows clients
  • Horizon 7.13 and Horizon 8.1 (2012 and later) – Media Optimization for Microsoft Teams on RDSH remote desktops and Microsoft Teams as a published application for Windows clients
  • Horizon 8.2 (2103 and later) – Media Optimization for Microsoft Teams on Mac clients
  • Horizon 8.3 (2106 and later) – Media Optimization for Microsoft Teams on Linux clients
  • Horizon 8.4 (2111 and later) – Media Optimization for Microsoft Teams on Chrome clients
  • VMware Horizon® Cloud Service™ on Microsoft Azure: Support of Media Optimization for Microsoft Teams

Note: For Horizon documentation references, we will be using Horizon 8 (2212) product documentation links throughout this guide. If you have a different version, click the link and use the Selected product version drop-down list to select your version.

Installation and Configuration of Media Optimization for Microsoft Teams

VMware supports Media Optimization for Microsoft Teams as part of Horizon 8 (2006 and later) and Horizon 7 version 7.13 and later. The Media Optimization for Microsoft Teams feature is also available with Horizon Cloud on Microsoft Azure, Pod Manifest version 2298.X and later. Microsoft also turned on the service on their side on August 11, 2020.

To take advantage of the offload capability, on the client side, you must use:

  • Horizon Client for Windows 2006 or later
  • Horizon Client for Mac 2103 or later
  • Horizon Client for Linux 2106 or later
  • Horizon Client for Chrome 2111 or 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 Redirection for support details.

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 Configuring Media Optimization for Microsoft Teams (for Horizon 8) or Configuring Media Optimization for Microsoft Teams (for Horizon 7.13).

  • Client systems – This feature is supported on all 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 https://docs.vmware.com/en/VMware-Horizon/index.html.
    Note: The client system should have a 2.4 GHz or more dual core.
  • Virtual desktop systems – This feature is supported on all Windows operating systems that are supported for the specific version of Horizon Agent installed on the virtual desktop. See the “Compatibility Notes” section in the applicable Horizon 8 release notes, available at https://docs.vmware.com/en/VMware-Horizon/index.html.
    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.

Client Installation

In 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)

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 VMware Horizon Client icon to the Applications folder.

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

In 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 is not available in the installer; 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 (Available Only in Horizon Client for Linux 2206 or Earlier)

Horizon Agent Installation and Configuration

Media Optimization for Microsoft Teams is also installed by default in the Horizon Agent. With Horizon Agent 2209 and earlier, Media Optimization is controlled with a GPO, which is not turned on by default. The GPO can be turned on using the Group Policy Editor. Navigate to Computer Configuration > Administrative Templates > VMware View Agent Configuration > VMware HTML5 Features > VMware WebRTC Redirection Features > Enable Media Optimization for Microsoft Teams.

Graphical user interface, text, application, email

Description automatically generated

Figure 5: Path in the Group Policy Editor for Turning On the Microsoft Teams Optimization Feature

Double-click to open and turn on the policy.

Enable Media Optimization for Microsoft Teams policy setting

Figure 6: Group Policy Setting for Turning On the Microsoft Teams Optimization Feature with Horizon Agent 2209 and Earlier

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

With installation of Horizon Agent 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.  The GPO does not need to be set.

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). 

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 7: Group Policy Setting for Turning On the Microsoft Teams Optimization Feature with Horizon Agent 2212 and Later

Important: The order of installation of Horizon Agent and Microsoft Teams is important. Horizon Agent must be installed before Microsoft Teams. If the order is reversed, then on first run, Microsoft Teams does not detect Horizon Agent and caches an environment value that indicates the feature is running on an unsupported remote desktop. This results in Microsoft Teams never supporting the Media Optimization feature unless the cache is deleted.

To avoid this issue, be sure to install Horizon Agent before you install Microsoft Teams. Then, on first run, Microsoft Teams detects Horizon Agent and caches the correct environment value, which verifies that the feature is running on a supported remote desktop.

Microsoft Teams Installation

After Horizon Agent is successfully installed, install Microsoft Teams on the Horizon Agent machine. Follow the instructions provided on the Microsoft website, at https://docs.microsoft.com/en-us/microsoftteams/teams-for-vdi.

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 8: Calls and Sharing Setting with Option to Turn On Media Optimization for WebRTC Based Applications (Available with Horizon Client for Windows 2209 and Later)

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 (Horizon Client 2006 or later for Windows, Horizon Client 2103 or later for Mac, or Horizon Client 2106 or later for Linux) 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. In the top-right corner of the Microsoft Teams interface, click the three dots near the user icon and navigate to About > Version to see a banner under the user icon describing the Microsoft Teams version and pairing modes:

  • 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. 
  • 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. 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:

    Your device doesn’t support VMware Optimization. Audio and video quality may be reduced. Talk to your IT admin.
  • 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. For the latest supported features list, see the Microsoft document Teams for Virtualized Desktop Infrastructure. You can also try running Microsoft Teams from within a Chrome browser, which will give you an idea of the available functionality.
  • 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.

Additional Considerations

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

Supported Horizon Client for Windows Versions

For beta testing, VMware built support for Microsoft Teams into the Horizon Client for Windows versions 5.3, 5.4, 5.4.1, 5.4.2, and 5.4.3. If you turn on the optimization GPO in the virtual desktop, these clients, although not officially supported, will begin implementing offload. The bugs we found in these clients during beta testing are fixed in Horizon Client for Windows version 2006 or later (for Horizon 8) or Horizon Client for Windows 5.5 or later (for Horizon 7.13 or later), which is officially supported. VMware strongly recommends using the officially supported versions.

Supported Horizon Client for Mac and Linux Versions

For beta testing, VMware published the Horizon Client 2012 beta installer for Mac (via the beta portal) that supports optimization. VMware recommends that you use the officially supported version, Horizon Client 2103 or later for Mac, to get the latest functionality and bug fixes for the Mac client.

Similarly, VMware published a beta version of Horizon Client 2103 for Linux that supports optimization (via the beta portal). VMware recommends using the officially supported version, Horizon Client 2106 or later for Linux, to get the latest functionality and bug fixes for the Linux client.

Note: Screen sharing when Microsoft Teams is published as an application is supported as of Horizon Client for Mac 2203 and as of Horizon Client for Linux 2206.

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 Action 5: Check for a Conflicting Agent Installation of this guide for more details.

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, VMware 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. To turn off software acoustic echo cancellation, set to Disabled. To use the software acoustic echo cancelation 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 9: Path in the Group Policy Editor for Configuring Software Acoustic Echo Cancellation

Graphical user interface, text, application

Description automatically generated

Figure 10: 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. Set Configure CPU overuse threshold to Enabled and enter a value less than 85 (for example, 40). After setting this policy, you must log out of the Horizon desktop for the GPO policies to take effect. 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 11: 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.

Troubleshooting

To troubleshoot, start by checking whether Microsoft Teams launched in optimized mode and whether the correct local client device names are being picked up. If so, you can check whether the Microsoft Teams redirection plugin has been installed and check the logs to verify that optimization has been turned on. Procedures for these tasks are described in the following sections:

Step 1: Check If Microsoft Teams Launched in Optimized Mode

In Microsoft Teams, click the ellipsis points (…) next to your profile picture at the top, and select About > Version. This shows you a banner at the top of the app that will say, “VMware Media Optimized,” indicating that Microsoft Teams has launched in optimized mode.

VMware Media Optimized in the Microsofdt Teams About box

Figure 12: Version Box for Microsoft Teams

If you see “VMware Media Optimized” in the banner, proceed to Step 2: Check If the Microsoft Teams Device Settings Show the Local Device Names from the Client.

If you do not see “VMware Media Optimized” in the banner, follow the below action items.


Action 1: Check If the VM Agent Registry Key Is Set Correctly

Launch the Registry Editor inside the VDI desktop by pressing (Windows key)+R and then type regedit.
Check if “HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM” AgentInstallPath (REG_SZ) is present.

AgentInstallPath Registry key for Horizon Agent

Figure 13: Registry Key for the Horizon Agent Installation Path

If the registry key is not set, contact VMware for further assistance.

If the registry key is correctly set, continue to the next action item.

Action 2: Check If the teamsEnabled Registry Key Is Set Correctly

Launch Registry Editor inside the VDI desktop. Check if “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\VMware, Inc.\VMware WebRTCRedir” teamsEnabled (REG_DWORD) is set to 1.

TeamsEnabled Registry key in Horizon Agent

Figure 14: 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, as described in Horizon Agent Installation and Configuration. Also note that you need to log out of the Horizon desktop for the 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.

If the registry key is correctly set and you do not see “VMware Media Optimized” in the banner, follow the next action item.

Action 3: Restart the Microsoft Teams Application

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

If you see “VMware Media Optimized” in the banner after restarting Microsoft Teams, proceed to Step 2: Check If the Microsoft Teams Device Settings Show the Local Device Names from the Client.

If you do not see “VMware Media Optimized” in the banner even after restarting Microsoft Teams, follow the next action item.

Action 4: Delete the Microsoft Teams Folder and Restart

Quit the Microsoft Teams application. Open File Explorer, and delete the folder %APPDATA%\Microsoft\Teams and then restart Microsoft Teams. This will force Microsoft Teams to reload its cache, which may have contained outdated values related to the environment.

If you see “VMware Media Optimized” in the banner after restart, proceed to Step 2: Check If the Microsoft Teams Device Settings Show the Local Device Names from the Client.

If you do not see “VMware Media Optimized” in the banner after restarting Microsoft Teams, follow the next action item.

Action 5: Check for a 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 MS Teams Diagnostics 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 VMware 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.

Action 6: Check That the Virtual Desktop hosts File Contains “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.

If you see “VMware Media Optimized” in the banner after performing the above action items, proceed to Step 2: Check If the Microsoft Teams Device Settings Show the Local Device Names from the Client.

If you still do not see “VMware Media Optimized” in the banner after performing the above action items, contact Microsoft for further assistance.

Step 2: Check If the Microsoft Teams Device Settings Show the Local Device Names from the Client

In Microsoft Teams, click the ellipsis points (…) next to your profile picture at the top, and then select Settings and go to the Devices section. Under Audio devices, you should see the local headset names in the Speakers and Microphone drop-down lists. You should not see “Virtual DevTap” or “VDI” in the label.

Microsoft Teams Device settings should display the names of audio devices from the client

Figure 15: Device Settings for Microsoft Teams

If you see the local device names in the Microsoft Teams device settings, then Microsoft Teams optimization has been turned on in your environment.

If you do not see the local device names and, instead, you see “Virtual DevTap” or “VDI” in the device list, follow the below action items.

Action 1: Check If html5Server Is 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 16: 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 VMware for further assistance.

If you see that html5server.exe is running in the VM, then follow the next action item.

Action 2: Check the Proxy Bypass List If Using a Proxy on the 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.

If you did not configure a proxy on your remote desktop or have included “view-localhost” in the bypass list, follow the next action item.

Action 3: Exclude the HTML5Server Registry Key from User Profile Management Software

If you use a user profile management software such as VMware 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.

If you do not have any user profile management software installed or have excluded the above-mentioned registry key from the list, follow the next action item.

Action 4: Check the html5Server Logs in the Virtual Desktop

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

On your VM, open File Explorer, and navigate to C:\Windows\TEMP\vmware-SYSTEM. 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.

Figure 17: 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"]

If the above settings are missing from the logs or if the logs display "allow:false" then Microsoft Teams optimization has not been turned on in your environment. Proceed to Step 3: Check If the Microsoft Teams Redirection Plugin Is Present on Horizon Client.

Step 3: Check If the Microsoft Teams Redirection Plugin Is Present on Horizon Client

On a Windows client, open File Explorer, navigate to C:\Program Files (x86)\VMware\VMware Horizon View Client\x64, and verify that webrtc_sharedlib.dll is present.

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

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

On a Linux Client, check that libwebrtc_sharedlib.so is present in the  “/usr/lib/vmware/view/vdpService/webrtcRedir” folder and it has the correct permissions.

 

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

On a Mac client, open the Finder and check that libwebrtc_sharedlib.dylib is present under the “/Applications/VMware Horizon Client With Teams Optimization.app/Contents/Library/pcoip/vchan_plugins/vdpservice folder.

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

If the webrtc_sharedlib library is present on your client, proceed Step 4: Check That Media Optimization Is Turned On in Horizon Client Calls and Sharing Settings.

If the webrtc_sharedlib library is missing on your client, follow the below action item.

Action: Install Horizon Client with Microsoft Teams

Go through the installation guidance for Horizon Client for Windows or Linux, as described in Client Installation, and ensure that Media Optimization for Microsoft Teams check box has been selected in the Horizon Client Installation wizard (available with Horizon Client for Windows 2203 and earlier or Horizon Client for Linux 2206 or earlier) . If the webrtc_sharedlib library is still missing on your client, contact VMware for further assistance.

For the Mac platform, ensure that you have the supported version of Horizon Client installed.

If you have the supported versions installed and have selected the right configuration for Media Optimization for Microsoft Teams, contact VMware support.

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

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 Figure 8 above.

Action: Turn on Media Optimization for WebRTC Based Applications

Turn on Media Optimization for WebRTC based applications and reconnect to the desktop.

Step 5: Check If the Html5Client Log Shows Optimization Is Turned On

On a Windows client, open File Explorer and navigate to the folder %TEMP%\vmware-<username>. 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 21: 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"]

If the above settings are missing from the logs or if the logs display "allow":"false" then Microsoft Teams optimization has not been turned on in your environment. Contact VMware for further assistance.

Troubleshooting by 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.

Collecting Logs

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

Collecting VMware Logs

Collect VMware logs from the remote desktop and the client machine by following the instructions in the VMware Knowledge Base article Collecting VMware 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.

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 VMware Horizon 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

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

Kristina De Nike is a Product Line Manager, EUC Virtual Workspace, VMware.

Sonia Prabhu is an R&D Manager, EUC Virtual Workspace, VMware.

Karin Li, is a Staff Engineer, Horizon, VMware.

The following VMware staff contributed to this document:

  • Neena Razdan, Senior Product Manager, Horizon, VMware
  • Nandita Deianova, Senior Technical Writer, Information Experience, VMware
  • Chris Halstead, EUC Staff Architect, EUC Mobile Marketing, VMware

To comment on this paper, contact VMware End-User-Computing Technical Marketing at euc_tech_content_feedback@vmware.com.


Filter Tags

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