The BareMetalHost resource contains the properties of a physical host. You must get the BareMetalHost resource for a physical host to review its properties.
Procedure
-
Get the list of
BareMetalHostresources:$ oc get bmh -n openshift-machine-api -o yamlNoteYou can use
baremetalhostas the long form ofbmhwithoc getcommand. -
Get the list of hosts:
$ oc get bmh -n openshift-machine-api -
Get the
BareMetalHostresource for a specific host:$ oc get bmh <host_name> -n openshift-machine-api -o yamlWhere
<host_name>is the name of the host.Example outputapiVersion: metal3.io/v1alpha1 kind: BareMetalHost metadata: creationTimestamp: "2019-09-20T06:33:35Z" finalizers: - baremetalhost.metal3.io generation: 2 name: bmo-controlplane-0 namespace: bmo-project resourceVersion: "22642" selfLink: /apis/metal3.io/v1alpha1/namespaces/bmo-project/baremetalhosts/bmo-controlplane-0 uid: 92b2f77a-db70-11e9-9db1-525400764849 spec: bmc: address: ipmi://10.10.57.19 credentialsName: bmo-controlplane-0-bmc-secret bootMACAddress: 98:03:9b:61:80:48 consumerRef: apiVersion: machine.openshift.io/v1beta1 kind: Machine name: bmo-controlplane-0 namespace: bmo-project externallyProvisioned: true hardwareProfile: default image: checksum: http://172.16.1.100/images/myOSv1/myOS.qcow2.md5sum url: http://172.16.1.100/images/myOSv1/myOS.qcow2 online: true raid: hardwareRAIDVolumes: - level: "1" sizeGibibytes: 200 rotational: true firmware: virtualizationEnabled: true userData: name: bmo-controlplane-user-data namespace: bmo-project networkData: name: bmo-controlplane-network-data namespace: bmo-project metaData: name: bmo-controlplane-meta-data namespace: bmo-project status: errorMessage: "" goodCredentials: credentials: name: bmo-controlplane-0-bmc-secret namespace: bmo-project credentialsVersion: "5562" hardware: cpu: arch: x86_64 clockMegahertz: 2000 count: 40 flags: [] model: Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz firmware: bios: date: 12/17/2018 vendor: Dell Inc. version: 1.6.13 hostname: bmo-controlplane-0.localdomain nics: - ip: 172.22.135.105 mac: "00:00:00:00:00:00" model: unknown name: eno1 pxe: true speedGbps: 25 vlanId: 0 ramMebibytes: 0 storage: [] systemVendor: manufacturer: Dell Inc. productName: PowerEdge r460 serialNumber: "" hardwareProfile: "" lastUpdated: "2019-09-20T07:03:23Z" operationalStatus: OK poweredOn: true provisioning: ID: a4438010-3fc6-4c5c-b570-900bbe85da57 image: checksum: "" url: "" state: externally provisioned triedCredentials: credentials: name: bmo-controlplane-0-bmc-secret namespace: bmo-project credentialsVersion: "5562"