Skip to main content

POST /osdeployment/hostSettings

Use this method to create the network and storage settings for one or more specific servers.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/osdeployment/hostSettings

Query parameters

None

Request body

AttributesRequired / OptionalTypeDescription
networkSettingsOptionalObjectInformation about network settings
 dns1OptionalStringPreferred DNS server for the host server to be used after the operating system is deployed
 dns2OptionalStringAlternative DNS server for the host server to be used after the operating system is deployed
 gatewayOptionalStringGateway 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 GET /osdeployment/globalSettings.
 hostnameOptionalStringHostname for the host server. If a hostname is not specified, a default hostname is assigned.
 ipAddressOptionalStringIP 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.
 mtuOptionalLongMaximum transmission unit for the host to be used after the operating system is deployed
 prefixLengthOptionalStringPrefix 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.
 selectedMACOptionalStringMAC 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 attribute in GET /hostPlatforms.
 subnetMaskOptionalStringSubnet 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 GET /osdeployment/globalSettings.
 vlanIdOptionalStringVLAN ID for operating-system VLAN tagging

This attribute is valid only if in VLAN mode is enabled (see GET /osdeployment/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.
selectedImageOptionalStringName of the OS image to be deployed
storageSettingsOptionalObjectPreferred storage location on which you want to deploy operating-system images
 targetDeviceOptionalStringTarget 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.
uuidRequiredStringUUID of the host platform
The following example creates the network and storage settings for one or more specific servers.
[{
"networkSettings": {
"dns1": "",
"dns2": "",
"gateway": "",
"hostname": "",
"ipAddress": "",
"mtu": 1500,
"prefixLength": 0,
"selectedMAC": "AUTO",
"subnetMask": "",
"vlanId": "2"
},
"storageSettings": {
"targetDevice": "localdisk"
},
"uuid": "69BDF8912E5211E4998B40F2E99033F0"
}]

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
403ForbiddenThe orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request.

For XClarity Administrator advanced functions, ensure that you have active licenses for each managed server that supports the advanced functions.

409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
resultStringResult of the request. This can be one of the following values.
  • Success. The request was successful.
  • Failed. The request failed.
messagesArrayInformation about the message that is related to the result of the request
 explanationStringAdditional information to clarify the reason for the message
 idStringMessage identifier of a returned message
 messageStringMessage text associated with the message identifier
 recoveryArrayRecovery information
  textStringUser actions that can be taken to recover from the event
  URLStringLink to the help system for more information, if available
The following example is returned if the request is successful.
{
"result": "success",
"messages": []
}