Set the License

In order to use DVT’s features, you must obtain and set the license.

The license must be passed to the application through one of the following environment variables:

  • DVT_LICENSE_FILE

  • DVTLMD_LICENSE_FILE

  • LM_LICENSE_FILE

Environment variables will be read in the order above and the first non-empty value will be used, the others will be ignored. Any variable containing only the string “FLEXLM” (case-insensitive) will be ignored.

Important

Environment variables must be set before starting the application and the application must inherit the variables (e.g. when setting the variables in a terminal the application must be started from the same terminal).

On Linux or MacOS, the environment variables can be set:

  • In the shell’s startup files .bashrc, .cshrc, .tcshrc, .zshrc

  • In the terminal used to start the application

On Windows, the environment variables can be set:

  • Using Control Panel → System → Advanced system settings → Advanced tab → Environment variables

  • In the %USERPROFILE%\.dvt\env.bat script

  • In the %DVT_HOME%\bin\env.bat script

  • In the Windows Command Prompt used to start the application

The license environment variable or setting value must contain one or more FlexLM license sources. Supported license sources are:

  • File-system path of a license file: /path/to/dvt.lic

  • License server address as port@host: 27001@licsrv

  • Three-server redundancy triad with comma (,) separated license servers: 27001@licsrv1,27001@licsrv2,30001@licsrv3

  • File-system path of a directory containing one or more license files with .lic extension: /path/to/licenses

  • Multiline string with the content of a license file surrounded by three curly brackets: {{{...}}}

Multiple license sources, with the exception of multiline string, can be specified by separating them with:

  • colon (:) on Linux/MacOS

  • semicolon (;) on Windows

  • ampersand (&) on any OS

Note

If the host part of port@host is an IPv6 address then make sure to always include the ampersand (``&``) separator before or after even if there are no more license sources.

Note

If the host part of port@host is resolved by DNS to both IPv6 and IPv4 addresses while the server is only IPv6 accessible then the application must be started with the -Djava.net.preferIPv6Addresses=true vmargs.

The license features are checked-out when a DVT project is opened. A license indicator is available in the application’s bottom-right corner, selecting it will open the license log.

Troubleshooting

Checkout Fails When the License Server Is Hosted on Windows and Accessed from WSL2

By default, WSL2 instances have the same hostname as the Windows host, and this interferes with the license checkout. To workaround this, change the hostname of the WSL2 instance:

  • Open a Windows Command Prompt and connect to the WSL2 instance.

  • In the /etc/wsl.conf file, under [network] section, set a hostname different from the Windows hostname using hostname=new-hostname option.

  • Exit WSL2 and stop the instance by running wsl --shutdown in the Windows Command Prompt.

  • Restart the WSL2 instance and verify that the hostname has changed using hostname command.

Host ID / MAC Address Changes Each Time WSL2 Instance Starts

Running the license server or using a node-locked license file inside a WSL2 instance requires a fixed MAC address. To achieve this, you must use Windows 11 22H2 or higher and enable mirrored mode networking.

  • In the %USERPROFILE%\.wslconfig file, under [wsl2] section, set the networkingMode=mirrored option.

  • Stop the WSL2 instance by running wsl --shutdown in the Windows Command Prompt.

  • Restart the WSL2 instance and verify that the ethernet adapter MAC address (ip addr show) matches the MAC address shown in Windows (ipconfig /all).