# `openstack baremetal` Command-Line Interface (CLI)

## Synopsis

openstack [options] baremetal <command> [command-options]

openstack help baremetal <command>

## Description

The OpenStack Client plugin interacts with the Bare Metal service through the `openstack baremetal` command line interface (CLI).

To use the `openstack` CLI, the OpenStackClient (python-openstackclient) package must be installed. There are two ways to do this:

- along with this python-ironicclient package:

      $ pip install python-ironicclient[cli]

- directly:

      $ pip install python-openstackclient

This CLI is provided by python-openstackclient and osc-lib projects:

- https://opendev.org/openstack/python-openstackclient

- https://opendev.org/openstack/osc-lib

### Authentication

To use the CLI, you must provide your OpenStack username, password, project, and auth endpoint. You can use configuration options `--os-username`, `--os-password`, `--os-project-id` (or `--os-project-name`), and `--os-auth-url`, or set the corresponding environment variables:

    $ export OS_USERNAME=user
    $ export OS_PASSWORD=password
    $ export OS_PROJECT_NAME=project                         # or OS_PROJECT_ID
    $ export OS_PROJECT_DOMAIN_ID=default
    $ export OS_USER_DOMAIN_ID=default
    $ export OS_IDENTITY_API_VERSION=3
    $ export OS_AUTH_URL=http://auth.example.com:5000/identity

## Getting help

To get a list of available (sub)commands and options, run:

    $ openstack help baremetal

To get usage and options of a command, run:

    $ openstack help baremetal <sub-command>

## Examples

Get information about the openstack baremetal node create command:

    $ openstack help baremetal node create

Get a list of available drivers:

    $ openstack baremetal driver list

Enroll a node with the `ipmi` driver:

    $ openstack baremetal node create --driver ipmi --driver-info ipmi_address=1.2.3.4

Get a list of nodes:

    $ openstack baremetal node list

The baremetal API version can be specified via:

- environment variable OS_BAREMETAL_API_VERSION:

      $ export OS_BAREMETAL_API_VERSION=1.25

- or optional command line argument –os-baremetal-api-version:

      $ openstack baremetal port group list --os-baremetal-api-version 1.25

## Command Reference

- Command Reference
  - baremetal allocation
    - baremetal allocation create
    - baremetal allocation delete
    - baremetal allocation list
    - baremetal allocation set
    - baremetal allocation show
    - baremetal allocation unset
  - baremetal chassis
    - baremetal chassis create
    - baremetal chassis delete
    - baremetal chassis list
    - baremetal chassis set
    - baremetal chassis show
    - baremetal chassis unset
  - baremetal conductor
    - baremetal conductor list
    - baremetal conductor show
  - baremetal create
    - baremetal create
  - baremetal deploy template
    - baremetal deploy template create
    - baremetal deploy template delete
    - baremetal deploy template list
    - baremetal deploy template set
    - baremetal deploy template show
    - baremetal deploy template unset
  - baremetal driver
    - baremetal driver list
    - baremetal driver passthru call
    - baremetal driver passthru list
    - baremetal driver property list
    - baremetal driver raid property list
    - baremetal driver show
  - baremetal node
    - baremetal node abort
    - baremetal node add trait
    - baremetal node adopt
    - baremetal node bios setting list
    - baremetal node bios setting show
    - baremetal node boot device set
    - baremetal node boot device show
    - baremetal node boot mode set
    - baremetal node children list
    - baremetal node clean
    - baremetal node console disable
    - baremetal node console enable
    - baremetal node console show
    - baremetal node create
    - baremetal node delete
    - baremetal node deploy
    - baremetal node firmware list
    - baremetal node history get
    - baremetal node history list
    - baremetal node inject nmi
    - baremetal node inspect
    - baremetal node inventory save
    - baremetal node list
    - baremetal node maintenance set
    - baremetal node maintenance unset
    - baremetal node manage
    - baremetal node passthru call
    - baremetal node passthru list
    - baremetal node power off
    - baremetal node power on
    - baremetal node provide
    - baremetal node reboot
    - baremetal node rebuild
    - baremetal node remove trait
    - baremetal node rescue
    - baremetal node secure boot off
    - baremetal node secure boot on
    - baremetal node service
    - baremetal node set
    - baremetal node show
    - baremetal node trait list
    - baremetal node undeploy
    - baremetal node unhold
    - baremetal node unrescue
    - baremetal node unset
    - baremetal node validate
    - baremetal node vif attach
    - baremetal node vif detach
    - baremetal node vif list
  - baremetal port
    - baremetal port create
    - baremetal port delete
    - baremetal port group create
    - baremetal port group delete
    - baremetal port group list
    - baremetal port group set
    - baremetal port group show
    - baremetal port group unset
    - baremetal port list
    - baremetal port set
    - baremetal port show
    - baremetal port unset
  - baremetal volume
    - baremetal volume connector create
    - baremetal volume connector delete
    - baremetal volume connector list
    - baremetal volume connector set
    - baremetal volume connector show
    - baremetal volume connector unset
    - baremetal volume target create
    - baremetal volume target delete
    - baremetal volume target list
    - baremetal volume target set
    - baremetal volume target show
    - baremetal volume target unset

this page last updated: 2026-02-27 11:39:19

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug