Microsoft Teams Optimization with VMware HorizonVMware 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.
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
- VMware Horizon® Cloud Service™ on Microsoft Azure:
Note: For Horizon documentation references, we will be using Horizon 8 (2106) product documentation links throughout this guide.
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, you must use Horizon Client for Windows 2006 or later, Horizon Client for Mac 2103 or later, or Horizon Client for Linux 2106 or later. The Media Optimization for Microsoft Teams group policy setting must be enabled in the virtual desktop.
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 for support details.
This section briefly lists the system requirements for both the client and the virtual desktop when using the Media Optimization for Microsoft Teams feature. For more details, see ) or (for Horizon 7.13).
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 via GPO 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: and
Client system (for OSes supported with a specific release, see the appropriate Horizon Client release notes)
- Windows 10
- Windows 7 SP1 and 8.1 (supported only with Horizon 7)
- Ubuntu 20.04
- Ubuntu 18.04
- RedHat 8.4
- RedHat 8.3
- RedHat 7.9
- macOS Mojave 10.14 or newer version of macOS
- 2.4 GHz dual core or more
Virtual desktop system
- Windows 10
- Windows 10 Enterprise multi-session (Horizon Cloud Service on Azure)
- Windows Server 2019
- Windows Server 2016
- Windows Server 2012 R2
- 2 vCPU or more
In Horizon Client for Windows, the Media Optimization for Microsoft Teams feature is installed by default. You can see the setting if you select Customize installation in the installer.
Figure 2: Microsoft Teams Optimization Feature in the Horizon Client for Windows Installation Wizard
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 the installation wizard, you can see that the Media Optimization for Microsoft Teams option is selected, as shown below.
Figure 4: Microsoft Teams Optimization Feature in the Horizon Client for Linux Installation Wizard
Horizon Agent Installation and Configuration
Media Optimization for Microsoft Teams is also installed by default in the Horizon Agent, but it is controlled with a GPO, which is not enabled by default. The GPO can be enabled 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.
Figure 5: Path in the Group Policy Editor for Enabling the Microsoft Teams Optimization Feature
Double-click to open and enable the policy.
Figure 6: Group Policy Setting for Enabling the Microsoft Teams Optimization Feature
After setting this policy, you must log out of the Horizon desktop for the GPO policy to take effect.
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
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 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, the Enable Media Optimization for Microsoft Teams GPO is enabled, 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, the Enable Media Optimization for Microsoft Teams GPO is enabled, 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, the Enable Media Optimization for Microsoft Teams GPO is not enabled. RTAV is used, and audio and video from Microsoft Teams are not offloaded to the client machine.
Before you decide to turn on the GPO for Microsoft Teams optimization, consider 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 . 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.
When deploying this feature, also take the following guidelines into account.
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 enable 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.
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 not supported on Linux or Mac clients as of Horizon Client 2016 for Mac or Linux.
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 . 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:
- For Horizon 8:
- For Horizon 7: Network Ports in VMware Horizon 7
- For Horizon Cloud Service:
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.
In certain low-powered clients, users may want to turn off software acoustic echo cancellation to reduce CPU usage. In most cases, VMware recommends using the default configuration, which is designed for optimal audio experience. But if you are having issues with echo, 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 that this configuration is only supported on Windows Clients. Turning on this GPO will have no effect on Linux and Mac clients.
On Horizon Agent, the GPO can be enabled 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. After setting this policy, you must log out of the Horizon desktop for the GPO policies to take effect.
Figure 7: Path in the Group Policy Editor for Configuring Software Acoustic Echo Cancellation
Figure 8: Group Policy Setting for Configuring Software Acoustic Echo Cancellation
This configuration can also be applied on the Horizon Client for Windows device by setting the following registry key:
HKEY_CURRENT_USER\SOFTWARE\VMware, Inc.\VMware Html5mmr\WebrtcRedir
Use one of the following settings:
- Set to 0 – Turn off software acoustic echo cancellation.
- Set to 1 – Enable software acoustic echo cancellation irrespective of whether or not acoustic echo cancellation is available in the hardware.
- Registry key not present (default) – Software acoustic echo cancellation is enabled only if hardware acoustic cancellation is not available.
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 enabled. 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.
Figure 9: Version Box for Microsoft Teams
If you do not see “VMware Media Optimized” in the banner, follow the below action items.
Launch the Registry Editor inside the VDI desktop by pressing (Windows key)+R and then type
“HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM” AgentInstallPath (REG_SZ) is present.
Figure 10: 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.
Launch Registry Editor inside the VDI desktop. Check if
“HKEY_LOCAL_MACHINE\SOFTWARE\Policies\VMware, Inc.\VMware WebRTCRedir” teamsEnabled (REG_DWORD) is set to
Figure 11: Registry Key for Enabling Microsoft Teams Optimization
If the registry key is correctly set and you do not see “VMware Media Optimized” in the banner, follow the next action item.
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 do not see “VMware Media Optimized” in the banner even after restarting Microsoft Teams, follow the next action item.
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 do not see “VMware Media Optimized” in the banner after restarting Microsoft Teams, follow the next action item.
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 .
- Open the MS Teams Diagnostics log and look for the value of
If you see
vdiMode = “2000”, it means Microsoft Teams has found a Citrix Agent registry key and will not load the VMware component.
- Remove the following registry key entry or uninstall Citrix Agent software:
- Uninstall and reinstall Microsoft Teams.
If you 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.
Figure 12: Device Settings for Microsoft Teams
If you see the local device names in the Microsoft Teams device settings, then Microsoft Teams optimization has been enabled 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.
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.
Figure 13: 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.
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.
html5server.exe also uses secure web sockets (
wss protocol) to communicate with Microsoft Teams, ensure that your
.pac file allows “
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.
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
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.
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 enabled on your VM.
Figure 14: The Most Recent html5Server Log Displaying “allow”:”true”
Note: For your convenience, the highlighted text you can search for includes the following settings:
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.
Figure 15: 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 16: 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 17: Microsoft Teams Optimization Plugin Library on the Mac Client
library is missing on your client, follow the below action item.
Go through the installation guidance for Horizon Client for Windows or Linux, as described in , and ensure that Media Optimization for Microsoft Teams check box has been selected in the Horizon Client Installation wizard. 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 If the Html5Client Log Shows Optimization Is Enabled
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
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 enabled for your session.
Figure 18: The Most Recent html5Client Log Displaying “allow”:”true”
Note: For your convenience, the highlighted text you can search for includes the following settings:
If the above settings are missing from the logs or if the logs display
"allow":"false" then Microsoft Teams optimization has not been enabled 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.
This section describes how to collect logs from the virtual desktop, the client device, and the Microsoft Teams app.
Collecting VMware Logs
Collecting Microsoft Teams Logs
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.
The following updates were made to this guide.
Description of Changes
First release of the document
Authors and Contributors
Sonia Prabhu is an R&D Manager, EUC Virtual Workspace, VMware.
The following VMware staff contributed to this document:
- Neena Razdan, Senior Product Manager, Horizon, VMware
- Karin Li, Staff Engineer, Horizon, VMware
- Nandita Deianova, Senior Technical Writer, Information Experience, VMware
- , EUC Staff Architect, EUC Mobile Marketing, VMware