]

Solution

  • Horizon

Type

  • Document

Level

  • Intermediate

Category

  • Operational Tutorial
  • Technical Overview

Product

  • Horizon
  • Horizon Cloud Service

OS/Platform

  • Windows 10

Phase

  • Deploy

Use-Case

  • Windows Delivery

Microsoft Teams Optimization with VMware Horizon

VMware Horizon 8 VMware Horizon Cloud Service on Microsoft Azure

Introduction

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

VMware, working closely with Microsoft, is releasing Media Optimization for Microsoft Teams with Horizon 8 (2006). With the 2006 Horizon Agent and Horizon Client for Windows, when a user starts a call inside the virtual desktop, we open a channel to the local physical device and start the call there. The Microsoft Teams window draws over the Microsoft Teams window in the virtual desktop VM, giving users the impression that they are still in the VM, but the data is actually going directly from the local endpoint to the Internet. 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.

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.

Microsoft Teams Optimization Overview

Making audio and video calls from a Horizon virtual desktop can tax your server and network.

Horizon Media Optimzation for Microsoft Teams workslow

Figure 1: Microsoft Teams Optimization Flow

With the initial launch, Horizon is supporting audio, video, and screen-sharing offload to the local endpoint. We are supporting Windows endpoints running the Horizon Client for Windows and virtual desktops (not remote RDSH-published applications).

Installation and Configuration of Media Optimization for Microsoft Teams

VMware supports Microsoft Teams as part of Horizon 8 (2006 or later). The Media Optimization for Microsoft Teams feature is also available with Horizon Cloud on Microsoft Azure, Pod Manifest version 2298.X or later. Microsoft also turned on the service on their side on August 11, 2020. To take advantage of the offload capability, you must use the Horizon Client for Windows 2006 or later, and you must use a GPO to set a policy in the virtual desktop.

System Requirements

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 Configuring Media Optimization for Microsoft Teams.

Note: System Requirements for RTAV are more substantial than those for Media Optimization for Microsoft Teams. We use RTAV if optimization is not turned on via GPO or if the endpoint cannot run optimized and is in fallback mode. For more information, see Configuring Microsoft Teams with Real-Time Audio-Video and  System Requirements for Real-Time Audio-Video.

Client system

  • Windows 10
  • 2.4 GHz dual core

Virtual desktop system

  • Windows 10
  • 2 vCPU

Client and Agent Installation

In Horizon Client for Windows, the Microsoft Teams optimization feature is installed by default. You can see the setting if you select Customize installation in the installer.

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

The code in the Horizon Agent is also installed by default, but it is controlled with a GPO, which is not enabled by default. The GPO can be enabled using the Group Policy Editor by navigating to Computer Configuration > Administrative Templates > VMware View Agent Configuration > VMware HTML5 Features > VMware WebRTC Redirection Features > Enable Media Optimization for Microsoft Teams. After setting this policy, you must log off from the Horizon desktop for the GPO policy to take effect.

The Group Policy Editor lets you set a policy to Enable Media Optimization for Microsoft Teams

Figure 3: Path in the Group Policy Editor for Enabling the Microsoft Teams Optimization Feature

Enable Media Optimization for Microsoft Teams policy setting

Figure 4: Group Policy Setting for Enabling the Microsoft Teams Optimization Feature

Pairing Modes

As described in the Introduction, 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 Horizon Client for Windows version 2006, or newer, 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 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 have been 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. Audio and video from Microsoft Teams is 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 connection via VMware. Audio and video quality may be reduced.
  • No optimization – If the banner does not show VMware text in the message, the Enable Media Optimization for Microsoft Teams GPO is not enabled. Audio and video from Microsoft Teams is 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. To check the latest supported list, go to 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 latest Windows clients, how many of your users are running Linux, macOS, or some other OS? Can you be sure that your Windows endpoints are running the latest version of Horizon Client for Windows?
  • If you decide that the benefits of optimization are worth having some users running in fallback mode, you should plan on resourcing your VMs to run either in optimized mode or in fallback mode. See the requirements below.

Configuring Software Acoustic Echo Cancellation

In certain low-powered thin 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, this setting can be configured by using a GPO on the Horizon Agent or by setting a registry key on the Horizon Client.

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 off from the Horizon desktop for the GPO policies to take effect.

Use the Group Policy Editor to turn off Enable software acoustic echo cancellation for Media Optimization for Microsoft Teams

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

Enable software acoustic echo cancellation for Media Optimization for Microsoft Teams should be turned off in low-powered thin clients

Figure 6: Group Policy Setting for Configuring Software Acoustic Echo Cancellation

This configuration can also be applied on the Horizon Client 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 – 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.

Additional Considerations

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, which is officially supported and which VMware recommends using.

Troubleshooting

To troubleshoot, start by using the Microsoft Teams app to check 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, select Avatar > About > Version. You should see “VMware Media Optimized” inside the banner if Microsoft Teams has launched in optimized mode.

VMware Media Optimized in the Microsofdt Teams About box

Figure 7: 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 Devices Name 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 +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 8: 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 GPO 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 9: Registry Key for Enabling Microsoft Teams Optimization

If the registry key is not set, follow the installation guidance for Horizon Agent, as described in Client and Agent Installation. Also note that you need to log out of the Horizon desktop for the GPO policies to be applied.

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 Client

In the virtual desktop, restart Microsoft Teams to ensure that the correct settings have been applied by the Microsoft Teams client. For the Microsoft Technology Adoption Program (TAP), the optimization flags are applied by Microsoft Teams on the second load, so that you must restart Microsoft Teams without signing out.

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

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

Action 4: Delete the Microsoft Teams Folder and Restart

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

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

If you do not see “VMware Media Optimized” 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, select Avatar > 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 10: Device Settings for Microsoft Teams

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

If you do not see the local device name and, instead, you see “Virtual DevTap” or “VDI” in the device list, then 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 11: 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 html5Server Logs in the Virtual Desktop

Important: For the following step, you need to have administrator privileges on your in the 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.

html5Server log showing that optimization is enabled

Figure 12: 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 the logs display "allow:false" then Microsoft Teams optimization has not been enabled 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 your 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 13: Microsoft Teams Redirection Plugin DLL on the Client

If webrtc_sharedlib.dll is present on your client, proceed to Step 4: Check If the Html5Client Log Shows Optimization Is Enabled.

If webrtc_sharedlib.dll 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, as described in Client and Agent Installation, and ensure that the Media Optimization for Microsoft Teams check box has been selected. If webrtc_sharedlib.dll is still missing, then contact VMware for further assistance.

Step 4: Check If the Html5Client Log Shows Optimization Is Enabled

On your client endpoint, open File Explorer and navigate to the folder %TEMP%\vmware-<username>. Look for the log file vmware-html5Client-*.log with the latest timestamp. If you see the below highlighted section in the logs, then Microsoft Teams optimization has been correctly enabled for your session.

the html5Client log showing that optimization is enabled.

Figure 14: 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 the logs display "allow":"false" then Microsoft Teams optimization has not been enabled on your environment. Contact VMware 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

In virtual desktop operating system, collect the DCT support logs by following these steps:

  1. Open cmd.exe as an Administrator.
  2. Use the following command to change directories:

    cd “C:\Program Files\VMware\VMware View\Agent\DCT”

    If the above directory does not exist, navigate to the below directory with the following command:

    cd “C:\Program Files\VMware\Horizon Agents\Horizon Agent\DCT”
  3. Run support.bat, and after the script is finished running, you should find a ZIP file in the folder vdm-sdct on the Desktop. Send the ZIP file to your VMware contact person for further debugging.

On your client device, collect the DCT support logs by following these steps:

  1. Open cmd.exe as an Administrator.
  2. Use one of the following commands to change directories, as appropriate:

    (For x64) cd “C:\Program Files (x86)\VMware\VMware Horizon View Client\DCT”

    (For x86) cd “C:\Program Files\VMware\VMware Horizon View Client\DCT”
  3. Run support.bat, and after the script finishes running, you should find a ZIP file in the folder vdmsdct on the Desktop. Send the ZIP file to your VMware contact person for further debugging.

Collecting Microsoft Teams Logs

Collect Microsoft Teams logs by 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 makes Media Optimization for Microsoft Teams a compelling feature. A thoughtful rollout plan will keep users productive.

Additional Resources

Microsoft Documentation

VMware Horizon Documentation

Changelog

The following updates were made to this guide.

Date

Description of Changes

2020‑09-23

  • First release of the document

About the Author 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.

The following VMware staff contributed to this document.

  • 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
  • Intermediate
  • Operational Tutorial
  • Technical Overview
  • Document
  • Horizon
  • Horizon Cloud Service
  • Windows 10
  • Deploy
  • Windows Delivery