Set static BMC IP using dhcp provided IP addressΒΆ

The following example outlines the MTMS based hardware discovery for a single IPMI-based compute node.

Compute Node Information Value
Model Type 8247-22l
Serial Number 10112CA
Hostname cn01
IP address

The BMC IP address is obtained by the open range dhcp server and the plan is to leave the IP address the same, except we want to change the IP address to be static in the BMC.

BMC Information Value
IP address - dhcp
IP address - static
  1. Pre-define the compute nodes:

    Use the bmcdiscover command 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, use the command:

    bmcdiscover --range -z > predefined.stanzas

    The discovered nodes have the naming convention: node-<model-type>-<serial-number>

    # cat predefined.stanzas
  2. Edit the predefined.stanzas file and change the discovered nodes to the intended hostname and IP address.

    1. Edit the predefined.stanzas file:

      vi predefined.stanzas
    2. Rename the discovered object names to their intended compute node hostnames based on the MTMS mapping:

      node-8247-22l-10112ca ==> cn01
    3. Add a ip attribute and give it the compute node IP address:

    4. Repeat for additional nodes in the predefined.stanza file based on the MTMS mapping.

    In this example, the predefined.stanzas file now looks like the following:

    # cat predefined.stanzas
  3. Define the compute nodes into xCAT:

    cat predefined.stanzas | mkdef -z
  4. Set the chain table to run the bmcsetup script, this will set the BMC IP to static.

    chdef cn01 chain="runcmd=bmcsetup"
  5. [Optional] More operation plan to do after hardware discovery is done, ondiscover option can be used.

    For example, configure console, copy SSH key for OpenBMC, then disable powersupplyredundancy

    chdef cn01 -p chain="ondiscover=makegocons|rspconfig:sshcfg|rspconfig:powersupplyredundancy=disabled"

    Note: | is used to split commands, and : is used to split command with its option.

  6. 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>"
  7. Add the compute node IP information to /etc/hosts:

    makehosts cn01
  8. Refresh the DNS configuration for the new hosts:

    makedns -n
  9. [Optional] Monitor the node discovery process using rcons

    Configure the goconserver for the predefined node to watch the discovery process using rcons:

    makegocons cn01

    In another terminal window, open the remote console:

    rcons cn01
  10. Start the discovery process by booting the predefined node definition:

    rsetboot cn01 net
    rpower cn01 on
  11. 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 lsdef on the compute nodes should show discovered attributes for the machine. The important mac information should be discovered, which is necessary for xCAT to perform OS provisioning.