配置虚拟桌面支持

  • 版本 :2022.1 及更高版本

虚拟桌面支持是 Tableau Desktop 10.5 及更高版本以及 Tableau Prep Builder 2018.2.1 及更高版本的一项可选功能,使您能够针对非持久性虚拟桌面或定期重置映像的计算机优化 Tableau 安装。

从版本 2020.1 开始,可以将虚拟桌面配置为基于登录名的许可证管理(无需产品密钥)。这是在未向最终用户颁发产品密钥时实现 Tableau Desktop 虚拟部署的首选方法,通常也是必需的方法。有关详细信息,请参阅使用基于登录名的许可证管理激活 Tableau(链接在新窗口中打开).

启用虚拟桌面支持后,Tableau 许可证或基于登录名的许可证管理许可证租约将在预定时间后自动返回。这意味着您不需要手动刷新或停用产品密钥。Tableau 与托管服务通信的要求意味着您必须定期连接到互联网。

使用虚拟桌面时,每当您启动适用于 Tableau DesktopTableau Prep Builder 的新 VM 时,您都可能会收到一条错误消息,指出您的许可证信息已更改。此错误会强制重新启动,然后要求您再次注册 Tableau Desktop。发生此错误的原因是 ATR 服务发送与许可证缓存不匹配的新令牌。

若要防止发生这种情况,可以在 Windows 上的安装程序中使用 and 选项。例如:SYNCHRONOUSLICENSECHECKSILENTLYREGISTERUSER

tableau-setup-std-tableau-2020 SYNCHRONOUSLICENSECHECK="true" SILENTLYREGISTERUSER="true" ATRREQUESTEDDURATIONSECONDS=14400

tableauDesktop-64bit-2020-1-0.exe /quiet /norestart ACCEPTEULA=1 ATRREQUESTEDDURATIONSECONDS=14400 ACTIVATIONSERVER=http://

如果没有虚拟桌面支持,激活的 Tableau 许可证或基于登录名的许可证管理许可证租约将一直处于使用状态,直到许可证被停用或租约到期。这意味着,对于频繁回收的虚拟机 (VM) 和定期重置映像的计算机,您可能永远没有机会在重新创建系统之前停用许可证,并且许可证激活仍然有效,从而导致最大的激活错误。

虚拟桌面支持的工作原理

启用虚拟桌面支持后,Tableau Desktop 或 Tableau Prep Builder 会定期联系 Tableau 托管的运行授权 (ATR) 服务,以验证 Tableau 是否有权根据其许可证运行。当虚拟桌面配置为同时使用基于登录名的许可证管理时,Tableau OnlineTableau Server 将充当 ATR 服务的代理,以验证 Tableau 是否有权使用有效的 Tableau OnlineTableau Server Creator 用户运行。

ATR 服务验证许可证或用户是否为有效的 Creator 用户,以及授权窗口的长度。只要此通信成功,Tableau 就会运行而不会对用户产生任何影响。下图显示了客户端和许可组件之间的通信过程。

虚拟桌面支持和 ATR 服务,无需基于登录名的许可证管理

  1. Tableau DesktopTableau Prep Builder 會聯絡 ATR 服務,以驗證 Tableau DesktopTableau Prep Builder 是否被授權執行。

  2. ATR 服务与 Tableau 许可服务联系以验证许可证是否有效。

  3. ATR 服务确定授权运行窗口的长度。

  4. 如果有效,ATR 服务允许您使用 Tableau DesktopTableau Prep Builder

使用 Tableau Online 进行基于登录名的许可证管理

Login-based license management with Tableau Server

  1. You install Tableau Desktop or Tableau Prep Builder and select Activate with your credentials. You sign into your Tableau Online or Tableau Server site.

  2. Tableau Online or Tableau Server verifies that you are a Creator. If not, you get an error. If yes, Tableau Online or Tableau Server communicates with the ATR service.

  3. The ATR service returns an ATR lease to Tableau Online or Tableau Server.

  4. Tableau Online or Tableau Server provides an ATR lease to Tableau Desktop or Tableau Prep Builder to finalize activation.

Requested duration

By default, an instance of Tableau Desktop or Tableau Prep Builder is given a 14 day authorization window during which it is authorized to run. This means that after the initial authorization, you could use Tableau without any network connection for 14 days before the activation expired. The authorization checks are attempted regularly, and each time a check is successful, the authorization window is reset to its full length. This happens without any impact to you, unless there have been no successful checks and the window is nearing its expiration, in which case a warning message lets you know that you need to connect Tableau to the network so the authorization can be confirmed. The 14 day default is typically not a good value for deploying virtual desktop where you receive a new VM with every use. For more information, see Requested duration settings.

The length of the authorization window is determined by the value of the requested duration. By default, the requested duration is 14 days (1,209,600 seconds), but you can configure this to fit your environment depending on how often a user will be receiving a new VM or if the Tableau Desktop is of a persistent nature.

Note: If you use both Tableau Desktop and Tableau Prep Builder, setting the requested duration for Tableau Desktop also sets this same duration for Tableau Prep Builder and vice-versa.

Requested duration settings

You set the requested duration in seconds. The minimum requested duration you can set is 4 hours (14,400 seconds) and the maximum is six months (15,552,000 seconds). Use the following guidelines to determine how to set the requested duration setting for your users:

  • For most non-shared computers, especially those that are sometimes offline for several weeks at a time, set the requested duration to three to six months (7,776,000 – 15,552,000 seconds). A longer duration will allow the user to continue to use Tableau for an extended time without an internet connection.

  • For computers that are reimaged approximately once per month, set the requested duration to 30 days (2,592,000 seconds).

  • For virtual desktops that are recycled nightly, set the requested duration to the minimum of 4 hours (14,400 seconds). This will allow you to reuse your product keys each morning and eliminate the need to remember to deactivate them each evening before the virtual desktops are recycled.

Virtual machines and product keys

The benefit of using virtual desktop support is that for environments that regularly recycle their VMs, you can set a duration short enough to expire the license activation before the desktop is reused. This means that you do not use up all your activations. You will still need to enter the product key to run Tableau after the desktop is recycled. Login-based license management can improve the end-user experience in this scenario by requesting a sign in to Tableau Online or Tableau Server to activate Tableau Desktop or Tableau Prep Builder instead of entering a product key.

Note: When using virtual desktop with subscription licenses, you cannot refresh your product keys. To renew a subscription or make licensing changes, you must identify the new product key in the Tableau Customer Portal and activate it.

How to use virtual desktop support

Virtual desktop support is an opt-in feature if you're not using login-based license management, so you need to enable the feature in order to use it (it is disabled by default). If you're using login-based license management, see Activate Tableau using Login-based License Management(Link opens in a new window). The ways to enable virtual desktop when not using login-based license management depend on whether you are running Tableau on Windows or on the Mac:

On Windows you can enable and configure virtual desktop support:

  • At installation of Tableau Desktop and Tableau Prep Builder using command line install switches to enable virtual desktop support and specify a requested duration.

  • After installation, by editing the Windows registry to enable virtual desktop support and specify a requested duration.

On a Mac you can enable and configure virtual desktop support:

  • After installation of Tableau Desktop and Tableau Prep Builder using commands.sudo defaults write

Tableau Desktop and Tableau Prep Builder on Windows

There are three methods for setting the virtual desktop flags:

Enable virtual desktop support at install

Run the installer file from the computer's command line as an administrator, and include the switch if login-based license management is not being used (version 2019.4 and earlier, or manually disabled). The switch is not needed if login-based license management is configured on Tableau Desktop. To use a duration length other than the default of 14 days, include the switch. If you need to extract the .msi files, follow the instructions to Extract and run the Windows (MSI) installer ..exeATRENABLEDATRENABLEDATRREQUESTEDDURATIONSECONDS

You must run the command from the directory where the file is located or specify a full path to the location of the file on the computer. Do not run the setup program from a shared directory on your network. Instead, download the file to a directory on the computer where you're installing..exe.exe.exe

The has a minimum setting of 4 hours (14,400 seconds). The following example shows the Windows installer command that enables automatic license deactivation and set the duration to 12 hours (43,200 seconds):ATRREQUESTEDDURATIONSECONDS

tableauDesktop-64bit-2019-1-0.exe /quiet /norestart ACCEPTEULA=1 ATRENABLED=1 ATRREQUESTEDDURATIONSECONDS=43200

or

tableauPrepBuilder-64bit-2019-1-2.exe /quiet /norestart ACCEPTEULA=1 ATRENABLED=1 ATRREQUESTEDDURATIONSECONDS=43200

When creating a primary image for a large virtual deployment, the above settings are appropriate and no product key activation should be completed. When using a new VM, each end user will enter the product key or sign in to Tableau Desktop or Tableau Prep Builder if login-based license management is enabled.

Enable virtual desktop support by editing the registry

If Tableau Desktop or Tableau Prep Builder is already installed, you can still enable virtual desktop support by editing the Windows registry to add an entry for . To change the default duration a license activation is authorized for, you can add an entry for .ATREnabledATRREQUESTEDDURATIONSECONDS

  1. As an administrator on the computer running Tableau Desktop or Tableau Prep Builder, make a backup of the registry file before you make any changes to it.

  2. Edit the registry, and in , create a new hive named with these values:HKEY_LOCAL_MACHINE\SOFTWARE\TableauATR

    The illustration below shows what the hive looks like in the registry editor.ATR

    • Name: Add a DWORD (32-bit) value named . ATRRequestedDurationSeconds

    • Data: Add a number of seconds the duration should last. For example, add to set a duration of 12 hours.43200

    • Name: Add a DWORD (32-bit) value named . ATREnabled

    • Data: Add .1

  3. Restart Tableau so that the changes take effect.

Enable virtual desktop support by using the atr tool

If Tableau Desktop or Tableau Prep Builder is already installed, you can still enable virtual desktop support from the Windows command prompt. The atrdiag.exe program resides in the \bin directory for Windows and is a tool specific to the virtual desktop and login-based license management settings. The atrdiag.exe program can report on the values selected, change virtual desktop configuration settings, and initially configure virtual desktop. If Tableau Technical Support is needed, providing the output from the atr tool is often helpful.

Note: Tableau Prep Builder must be installed on the same computer with Tableau Desktop in order to use atrdiag.exe with Tableau Prep Builder.

  1. Sign in on the computer running Tableau Desktop as an administrator.

  2. At a command prompt, navigate to the directory where Tableau Desktop is installed:

    cd C:\Program Files\Tableau\

  3. At a command prompt, enable the ATR service:

    atrdiag.exe -enableATRFeature

  4. Set the duration, in seconds, that the license activation is authorized for. (For example, use 43200 to set a duration of 12 hours.)

    atrdiag.exe -setDuration 43200

  5. Restart Tableau so that the changes take effect.

Disable virtual desktop support by using the atr tool

If you no longer want to use the virtual desktop support feature, you can disable it.

  1. Shut down Tableau Desktop on the computer where you want to disable virtual desktop support.

  2. Open the Windows Command Prompt as an administrator, and then navigate to the directory where Tableau Desktop is installed:

    cd C:\Program Files\Tableau\

  3. At a command prompt, run the following command to turn off the ATR service:

    atrdiag.exe -disableATRFeature

  4. At a command prompt, run the following command:

    atrdiag.exe -deleteAllATRs

  5. Start Tableau Desktop.

  6. On the License Has Changed dialog, click Exit.

  7. Restart Tableau so that the changes take effect.

  8. On the Help menu, click Manage Product Keys to see if you can deactivate the product key.

Tableau Desktop and Tableau Prep Builder on Mac

Enable by updating the preference file

To enable virtual desktop support on the Mac, run the following commands in a terminal window and then install or restart Tableau Desktop or Tableau Prep Builder:

sudo defaults write /Library/Preferences/com.tableau.ATR ATREnabled "1"

sudo defaults write /Library/Preferences/com.tableau.ATR ATRRequestedDurationSeconds -string "43200"

Troubleshoot virtual desktop

If you encounter issues when configuring or using virtual desktop, you can collect diagnostic information about the computer that is running Tableau Prep Builder or Tableau Desktop using the virtual desktop diagnostic tool (atrdiag).

You can verify that virtual desktop is enabled and view the value set for the requested duration seconds in use for Tableau Desktop activation. The TTL Start and TTL End values reflect the current lease being used on the virtual machine (VM) running Tableau Desktop. The commands provided below will capture the state of your virtual desktop support installation, regardless of whether you have installed Tableau Desktop or Tableau Prep Builder.

Collect virtual desktop diagnostics on Windows

  1. Open a Command Prompt as an administrator.

  2. Navigate to the Tableau binaries () directory, using the following command: \bin

    cd Program Files\Tableau\Tableau

    For example:

    cd Program Files\Tableau\Tableau 2022.1\bin

  3. Run the following command:

    atrdiag.exe

    To optionally save the output to a file:

    atrdiag.exe > AtrOutput.txt

在 Mac 上收集虚拟桌面诊断信息

  1. 打开“终端”应用。

  2. 使用以下命令导航到包含 atrdiag 工具的目录:

    cd "/Applications/Tableau Desktop

    例如:

    cd "/Applications/Tableau Desktop 2022.1.app/Contents/MacOS"

  3. 运行以下命令:

    ./atrdiag

    要选择将输出保存到文件:

    ./atrdiag > AtrOutput.txt

若要了解有关解决 Tableau Desktop 安装问题的详细信息,请参阅对 Tableau Desktop 或 Tableau Prep Builder 安装进行故障排除