lmhostid

The lmhostid utility returns the hostid of the current platform. Invoked without any arguments, lmhostid displays the default hostid type for the current platform. Otherwise, the hostid corresponding to the requested type is displayed, if supported on the current platform.

Obtaining any TPM, virtualization, or cloud-licensing hostid requires that the FlexNet Licensing Service be installed.

Usage

lmhostid [-n] [-utf8] [-ptype argument] [hostid_type] [-container_id] [-flexid -dtype]

Where:

lmhostid Argument Usage

Argument

Description

-n

Only the hostid, itself, is returned as a string, which is appropriate to use with HOSTID= in the license file. Header text is suppressed.

hostid_type

One of the following hostid types. If not specified, the default hostid for the current platform is displayed. See Hostids for Supported Platforms for a list of the default types.

PLATFORM-DEPENDENT HOSTIDS

‑ether—Ethernet address.

Note:In Windows, Linux, and OS X platforms, this command returns all available addresses (active and inactive). For Windows and Linux platforms, these addresses include both teamed and non-teamed Ethernet interfaces. In general for teamed interfaces, the unique address for the team-bonding virtual adapter is returned. On Linux platforms, a separate (but same) virtual-adapter address is returned for each interface in the team. On Windows platforms, a single instance of the virtual-adapter address is returned for all teamed interfaces.

‑string—String id.
-vsn—Volume serial number (Windows platforms only).
-flexid— USB FLEXID identification. This is applicable only for those platforms that support FlexNet ID dongles. See Obtaining System Hostids for a complete list.
-long—32-bit hostid.
-uuid—UUID binding value. Used with the -ptype command line option, shown under ‑ptype below. Only permitted with platform types (ptype) VM or AMZN.
-tpm_id1—TPM (Trusted Platform Module) ID.

Requirements and limitations:

Windows platforms only.
Supported version: TPM 2.0.
FlexNet Licensing Service must be running to obtain this hostid.
Only supported on the SERVER line.
Supported as a served node-locked hostid from FlexNet Publisher version 11.15.0 onwards.

hostid_type (continued)

PLATFORM-INDEPENDENT HOSTIDS

-user—Current user name. Note that user names that contain spaces, for example ‘test user’ cannot be used in the Options file. Use the first word of the user name, for example ‘test’, in the Options file.
-display—Current display name. On Windows, it is the system name or, in the case of a terminal server environment, the terminal server client name. On UNIX, it is in the form /dev/ttyxx or the X-Display name.
-hostname—Current host name.
-hostdomain—Current host domain.
-internet—IP address of the machine in the format of the machine’s protocol (IPv4 or IPv6). In a dual-stack environment, you can use the -v4 or -v6 switch to obtain the version-specific IP address (see the next bulleted items).
-v4—Use with -internet to obtain the IPv4 address.
-v6—Use with -internet to obtain the IPv6 address.

Tip: Both -v4 and -v6 are optional; using just -internet fetches the default IP address (usually IPv4).

Tip:(Windows only) If a Windows machine is connected to a VPN, lmhostid -internet returns the virtual adapter IP address. To ensure that this command returns the physical adapter IP address during checkouts, perform this workaround: Run regedit, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Linkage, locate the Bind parameter, and edit the adapter order so that the physical adapter is listed first. Run ipconfig/registerdns to put the edit into effect.

-utf8

The hostid is output as a UTF-8 encoded string rather than an ASCII string. If your hostid contains characters other than ASCII A through Z, a through z, or 0 through 9, use this option with lmhostid. To view a correct representation of the resulting hostid, use a utility, such as Notepad, that can display UTF-8 encoded strings.

-ptype

(License-server binding in virtual environments only) Indicates the platform type. This option must be used in conjunction with a valid hostid binding type (see hostid_type (continued)).

‑ptype requires one of the following arguments, which then prefixes the generated hostid appropriately (as described):

VM—Supported for Xen, VMware, Oracle VirtualBox, Hyper-V, Parallels, QEMU-KVM, Google Compute, Microsoft Azure, and Amazon EC2.

lmhostid -ptype VM -uuid is now the only supported usage of this option, generating VM_UUID.

AMZN—For the Elastic IP address, AMI instance ID, or AMI template ID in the Amazon EC2 environment. Prefixes hostid with AMZN_.

VM_UUID is recommended instead of AMZN_IID. Both represent the AMI instance ID in the Amazon EC2 environment.

PHY—Physical machine only. Prefixes hostid with PHY_.

-container_id

Extracts Docker ContainerID.

-flexid -dtype

Displays the flexid and type information of the dongle. The-flexid fetches the flexid and -dtype the type information. -dtype is an optional parameter. The following is an example for output from lmhostid:

lmhostid - Copyright (c) 1989-2021 Flexera. All Rights Reserved.

The FlexNet host ID of this machine is "FLEXID=9-3ebc66c0:Type=HASPHL,Pro,Pro"

Here in the above output, "FLEXID=9-3ebc66c0:Type=HASPHL,Pro,Pro":

FLEXID=9-3ebc66c0 represents the flexid of the dongle.
Type=HASPHL,Pro,Pro represents the dongle type information.
Type=Value consists of three parts. They are configuration, key_model, and key_type information, such as Type=configuration,key_model,key_type.
The delimeter between the flexid and type is colon( : ) and between Type parameters is comma( , ).

Limitation:

SafeNet dongle only.
Not tested for hasp4 dongles since FlexNet Publisher 11.17.2.

The following are examples of output from lmhostid:

lmhostid - Copyright (c) 1989-2021 Flexera Software LLC. All Rights Reserved.

The FlexNet host ID of this machine is ""00ff5018c189 0019d244e9fc 0016cfdaf65d 001558809422 005056c00001 005056c00008""

Only use ONE from the list of hostids.

 

lmhostid -ptype VM -uuid

lmhostid - Copyright (c) 1989-2021 Flexera Software LLC. All Rights Reserved.

The FlexNet host ID of this machine is "VM_UUID=0011223344556677889911bbccddeeff"

 

To get Docker container ID:

 

lmhostid.exe -container_id

lmhostid - Copyright (c) 1989-2021 Flexera. All Rights Reserved.

The FlexNet host ID of this machine is "CONTAINER_ID=FF93BE61850C"

 

Note:Some limitations exist with hostid reporting on virtual devices:

Ethernet hostids on Windows platforms—From lmutil version 11.6.1 onwards, only the hostids of physical ethernet adapters are reported. Devices identified as virtual ethernet adapters are not reported as these identities are not permanent.
Physical (bare metal) hostids on virtual machines—When run from a virtual machine, lmhostid cannot return hostids for the physical machine that hosts the virtual machine. To obtain hostids for the physical machine, lmhostid must be run from the host OS.

See Also