1

I want to add a new machine to MAAS for commissioning and deployment using the MAAS CLI. What is the MAAS CLI command to add a new machine that supports IPMI power parameters?

3

Here is an example of how to add a machine:

maas maasadmin machines create \
    hostname=<hostname> \
    fqdn=<hostname>.maas \
    mac_addresses=<mac_used_for_dhcp> \
    architecture=amd64 \
    power_type=ipmi \
    power_parameters_power_driver=LAN_2_0 \
    power_parameters_power_user=<ipmi_user> \
    power_parameters_power_pass=<ipmi_password> \
    power_parameters_power_address=<mgmt_ip_address>

Inputs:

hostname: whatever you want to label your new machine.

mac_address: The mac address of the adapter on the new machine that will receive the DHCP address and then reach back to MAAS for a PXE image.

ipmi_user/password: The user account on your machine's controller card (e.g. Dell iDRAC)

mgmt_ip_address: The ip address of your machine's controller card (e.g. Dell iDRAC)

The following is pulled from the MAAS api source code for creating a new machine.

   """Create a new Machine.

    Adding a server to a MAAS puts it on a path that will wipe its disks
    and re-install its operating system, in the event that it PXE boots.
    In anonymous enlistment (and when the enlistment is done by a
    non-admin), the machine is held in the "New" state for approval by a
    MAAS admin.

    The minimum data required is:
    architecture=<arch string> (e.g. "i386/generic")
    mac_addresses=<value> (e.g. "aa:bb:cc:dd:ee:ff")

    :param architecture: A string containing the architecture type of
        the machine. (For example, "i386", or "amd64".) To determine the
        supported architectures, use the boot-resources endpoint.
    :type architecture: unicode

    :param min_hwe_kernel: A string containing the minimum kernel version
        allowed to be ran on this machine.
    :type min_hwe_kernel: unicode

    :param subarchitecture: A string containing the subarchitecture type
        of the machine. (For example, "generic" or "hwe-t".) To determine
        the supported subarchitectures, use the boot-resources endpoint.
    :type subarchitecture: unicode

    :param mac_addresses: One or more MAC addresses for the machine. To
        specify more than one MAC address, the parameter must be specified
        twice. (such as "machines new mac_addresses=01:02:03:04:05:06
        mac_addresses=02:03:04:05:06:07")
    :type mac_addresses: unicode

    :param hostname: A hostname. If not given, one will be generated.
    :type hostname: unicode

    :param domain: The domain of the machine. If not given the default
        domain is used.
    :type domain: unicode

    :param power_type: A power management type, if applicable (e.g.
        "virsh", "ipmi").
    :type power_type:unicode

    :param power_parameters_{param}: The parameter(s) for the power_type.
        Note that this is dynamic as the available parameters depend on
        the selected value of the Machine's power_type. `Power types`_
        section for a list of the available power parameters for each
        power type.
    :type power_parameters_{param1}: unicode
    """
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.