osimages hostplatforms

This command retrieves information about the host platforms, and deploys operating-system images to the host platforms as a job.

Syntax

osimages hostplatforms  -h

osimages hostplatforms -o <settings_JSON> [-v <filter>]

Options

{-h | --help}
Displays the syntax and brief usage information for this command.
{-o | --osimages_dict} <settings_JSON>
Deploys an operating system image to a host platform using the specified OS deployment settings, in JSON format.
Parameters Required / Optional Type Description
adusername Optional String (Windows only) User name for the Active Directory domain that is specified in the windowsDomain field
Note: This parameter is required if you want a Windows operating system to join an Active Directory domain.
adpassword Optional String (Windows only) Password for the Active Directory user name
Note: This parameter is required if you want a Windows operating system to join an Active Directory domain.
configFileId Required if selectedImage includes a custom configuration-settings file; otherwise ignored. String ID of the custom configuration-settings file to use for this OS deployment
licenseKey Optional String License key to be used for Microsoft Windows or VMware ESXi. If you do not have a license key, you can set this field to null.
networkSettings Required Object Information about network settings
  dns1 Optional String Preferred DNS server for the host server to be used after the operating system is deployed
  dns2 Optional String Alternative DNS server for the host server to be used after the operating system is deployed
  gateway Required if using static IP addresses.

Optional if using DHCP.

String Gateway of the host server to be used after the operating system is deployed. This is used when the network setting is set to static in the Global OS deployment settings.
Tip: To determine the IP mode, use osimages globalsettings.
  hostname Optional String Hostname for the host server. If a hostname is not specified, a default hostname is assigned.
  ipAddress Required if using static IP addresses. String IP address of the host server to be used after the operating system is deployed. This is used when the network setting is set to static in the Global OS deployment settings.
  mtu Optional Long Maximum transmission unit for the host to be used after the operating system is deployed
  prefixLength Optional String Prefix length of the host IP address to be used after the operating system is deployed. This is used when the network setting is set to static IPv6 in the Global OS deployment settings.
  selectedMAC Required String MAC address of the host server to which the IP address is to be bound

The MAC address is set to AUTO by default. This setting automatically detects the Ethernet ports that can be configured and used for deployment. The first MAC address (port) that is detected is used by default. If connectivity is detected on a different MAC address, the XClarity Administrator host is automatically restarted to use the newly detected MAC address for deployment, and selectedMAC is set to the newly detected MAC address.

VLAN mode is supported only for servers that have MAC addresses in their inventory. If AUTO is the only the MAC address that is available for a server, then VLANs cannot be used to deploy operating systems to that server.

Tip: To obtain the MAC address, use the macaddress value field in osimages hostplatforms.
  subnetMask Required if using static IP addresses.

Optional if using DHCP.

String Subnet mask of the host server to be used after the operating system is deployed. This is used when the network setting is set to static in the Global OS deployment settings.
Tip: To determine the IP mode, use osimages globalsettings.
  vlanId Optional String VLAN ID for operating-system VLAN tagging

This parameter is valid only if in VLAN mode is enabled (see osimages globalsettings).

Important: Only specify a VLAN ID when a VLAN tag is required to function on the network. Using VLAN tags can affect the network routability between the host operating system and the Lenovo XClarity Administrator.
selectedImage Required String Profile ID of the operating-system image to be deployed
Tip: To obtain the operating-system image values, use the availableImages value field in osimages hostplatforms command.
storageSettings Required Object Preferred storage location on which you want to deploy operating-system images
  targetDevice Required String Target device. This can be one of the following values.
  • localdisk. Local disk drive. The first enumerated local disk drive in the managed server is used.
  • M.2drive. M.2 drive. The first enumerated M.2 drive in the managed server is used.
  • usbdisk. Embedded USB Hypervisor. This location is applicable only when a VMware ESXi image is being deployed to managed servers. If two hypervisor keys are installed on the managed server, the VMware installer selects the first enumerated key for deployment.
  • lunpluswwn=LUN@WWN. FC SAN storage (for example, lunpluswwn=2@50:05:07:68:05:0c:09:bb).
  • lunplusiqn=LUN@IQN. iSCSI SAN Storage (for example, lunplusiqn=0@iqn.1990-01.com.lenovo:tgt1). Specifying the IQN is optional if only one iSCSI target is configured If the IQN is not specified, the first detected iSCSI target is selected for OSDN. If specified, and exact match is made.
Note: For ThinkServer servers, this value is always localdisk.
unattendFileId Required if selectedImage includes custom unattend files; otherwise ignored. String ID of the unattend file to use for this OS deployment
uuid Required String UUID of the host server to which the operating system is to be deployed
windowsDomain Optional String (Windows only) Active Directory domain that the Windows operating system is to join after the operating system is deployed successfully. If an OU is present, specify the string using the format domain/ou.

If the operating system will not join a domain, you can set this field to null.

Note:
  • To join an Active Directory domain, you must specify either the windowsDomain or windowsDomainBlob parameter. If both are specified, the windowsDomainBlob parameter is used.

  • Use the adusername and adpassword parameters to specify the user name and password for the domain.

windowsDomainBlob Optional String (Windows only) Active Directory Computer Account Metadata (in Base-64 encoded blob format) that can be used to join the Active Directory domain. For instructions for generating a file that contains the metadata blob data, see Integrating with Windows Active Directory.
Note:
  • To join an Active Directory domain, you must specify either the windowsDomain or windowsDomainBlob parameter. If both are specified, the windowsDomainBlob parameter is used.

  • You can use metadata blob data when deploying any Windows operating system. However, this method must be used for Windows Nano Server. Specifying a domain in global settings is not supported for Windows Nano Server.

For example,
{
   "networkSettings": {
      "dns1": "192.0.2.255", 
      "dns2": "192.0.2.254", 
      "gateway": "192.0.2.200", 
      "ipAddress": "192.0.2.0", 
       "mtu": 1500, 
      "prefixLength": 64, 
     "selectedMAC": "78:9A:BC:12:34:56", 
      "subnetMask": "255.255.255.0"
   },
   "selectedImage": "rhels6.4-x86_64-install-Minimal", 
   "storageSettings": {
      "targetDevice": "lunpluswwn=2@50:05:07:68:05:0c:09:bb"
   },
   "uuid": "2D16B4422AC011E38A06000AF72567B0",
   "windowsDomain": null
}
{-v | --view} <filter>
Identifies the view to use for the returned data. If a filter is not specified, the default view is used.

You can also create custom views (see Creating custom views).

Examples

The following example returns a list of OS images in the repository.

connect --url https://192.0.2.0 --user ADMIN --noverify
osimages hostplatforms

This example deploys an OS image to a specific managed server.

connect --url https://192.0.2.0 --user ADMIN --noverify
osimages hostplatforms -o '{"networkSettings": {"dns1": "10.240.0.10", "dns2": "10.240.0.11",
         "gateway": "10.240.28.1", "ipAddress": "10.240.29.226", "mtu": 1500,
         "prefixLength": 64, "selectedMAC": "AUTO", "subnetMask": "255.255.252.0",
         "vlanId": 521}, "selectedImage": "rhels7.3|rhels7.3-x86_64-install-Minimal",
         "storageSettings": {"targetDevice": "localdisk"}, 
         "uuid": "B918EDCA1B5F11E2803EBECB82710ADE"}'

Related links