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:
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
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.
Requirements and limitations:
|
||||||||||||||||||||||||||||||||||||
PLATFORM-INDEPENDENT HOSTIDS
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):
lmhostid -ptype VM -uuid is now the only supported usage of this option, generating VM_UUID.
VM_UUID is recommended instead of AMZN_IID. Both represent the AMI instance ID in the Amazon EC2 environment.
|
||||||||||||||||||||||||||||||||||||
-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":
Limitation:
|
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