Set static BMC IP using different IP address (recommended)¶
The following example outlines the MTMS based hardware discovery for a single IPMI-based compute node.
|Compute Node Information
The BMC IP address is obtained by the open range dhcp server and the plan in this scenario is to change the IP address for the BMC to a static IP address in a different subnet than the open range addresses. The static IP address in this example is in the same subnet as the open range to simplify the networking configuration on the xCAT management node.
|IP address - dhcp
|IP address - static
Detect the BMCs and add the node definitions into xCAT.
Use the bmcdiscover command to discover the BMCs responding over an IP range and write the output into the xCAT database. This discovered BMC node is used to control the physical server during hardware discovery and will be deleted after the correct server node object is matched to a pre-defined node. You must use the
-woption to write the output into the xCAT database.
To discover the BMC with an IP address range of 220.127.116.11-100:
bmcdiscover --range 18.104.22.168-100 -z -w
The discovered nodes will be written to xCAT database. The discovered BMC nodes are in the form node-model_type-serial. To view the discovered nodes:
bmcdiscovercommand will use the username/password from the
passwdtable corresponding to
key=ipmi. To overwrite with a different username/password use the
Pre-define the compute nodes:
bmcdiscovercommand to help discover the nodes over an IP range and easily create a starting file to define the compute nodes into xCAT.
To discover the compute nodes for the BMCs with an IP address of 22.214.171.124, use the command:
bmcdiscover --range 126.96.36.199 -z > predefined.stanzas
The discovered nodes have the naming convention: node-<model-type>-<serial-number>
# cat predefined.stanzas node-8247-22l-10112ca: objtype=node groups=all bmc=188.8.131.52 cons=ipmi mgt=ipmi mtm=8247-22L serial=10112CA
predefined.stanzasfile and change the discovered nodes to the intended
Rename the discovered object names to their intended compute node hostnames based on the MTMS mapping:
node-8247-22l-10112ca ==> cn01
ipattribute and give it the compute node IP address:
hwtypeif defined in the
Repeat for additional nodes in the
predefined.stanzafile based on the MTMS mapping.
In this example, the
predefined.stanzasfile now looks like the following:
# cat predefined.stanzas cn01: objtype=node groups=all bmc=184.108.40.206 cons=ipmi mgt=ipmi mtm=8247-22L serial=10112CA ip=10.0.101.1
Define the compute nodes into xCAT:
cat predefined.stanzas | mkdef -z
Set the chain table to run the
bmcsetupscript, this will set the BMC IP to static.
chdef cn01 chain="runcmd=bmcsetup"
[Optional] More operation plan to do after hardware discovery is done,
ondiscoveroption can be used.
For example, configure console, copy SSH key for OpenBMC, then disable
chdef cn01 -p chain="ondiscover=makegocons|rspconfig:sshcfg|rspconfig:powersupplyredundancy=disabled"
|is used to split commands, and
:is used to split command with its option.
Set the target osimage into the chain table to automatically provision the operating system after the node discovery is complete.
chdef cn01 -p chain="osimage=<osimage_name>"
Change the BMC IP address
Set the BMC IP address to a different value for the predefined compute node definitions.
To change the dhcp obtained IP address of 220.127.116.11 to a static IP address of 18.104.22.168, run the following command:
chdef cn01 bmc=22.214.171.124
[Optional] If more configuration planed to be done on BMC, the following command is also needed.
chdef cn01 bmcvlantag=<vlanid> # tag VLAN ID for BMC chdef cn01 bmcusername=<desired_username> chdef cn01 bmcpassword=<desired_password>
Add the compute node IP information to
Refresh the DNS configuration for the new hosts:
[Optional] Monitor the node discovery process using rcons
Configure the conserver for the discovered node to watch the discovery process using
In another terminal window, open the remote console:
Start the discovery process by booting the discovered node definition:
rsetboot node-8247-22l-10112ca net rpower node-8247-22l-10112ca on
The discovery process will network boot the machine into the diskless xCAT genesis kernel and perform the discovery process. When the discovery process is complete, doing
lsdefon the compute nodes should show discovered attributes for the machine. The important
macinformation should be discovered, which is necessary for xCAT to perform OS provisioning.