// This module is included in the following assemblies:
//
// * installing/installing_bare_metal/bare-metal-postinstallation-configuration.adoc

:_mod-docs-content-type: PROCEDURE
[id="bmo-editing-a-baremetalhost-resource_{context}"]
= Editing a BareMetalHost resource

[role="_abstract"]
You can edit a node's `BareMetalHost` resource to update BMC information, move nodes between clusters, or modify provisioning configuration.

Consider the following examples:

* You deploy a cluster with the {ai-full} and need to add or edit the baseboard management controller (BMC) host name or IP address.
* You want to move a node from one cluster to another without deprovisioning it.

.Prerequisites

* Ensure the node is in the `Provisioned`, `ExternallyProvisioned`, or `Available` state.

.Procedure

. Get the list of nodes:
+
[source,terminal,subs="+quotes"]
----
$ oc get bmh -n openshift-machine-api
----

. Before editing the node's `BareMetalHost` resource, detach the node from Ironic by running the following command:
+
[source,terminal,subs="+quotes"]
----
$ oc annotate baremetalhost <node_name> -n openshift-machine-api 'baremetalhost.metal3.io/detached=true'
----
+
Replace `<node_name>` with the name of the node.

. Edit the  `BareMetalHost` resource by running the following command:
+
[source,terminal,subs="+quotes"]
----
$ oc edit bmh <node_name> -n openshift-machine-api
----

. Reattach the node to Ironic by running the following command:
+
[source,terminal,subs="+quotes"]
----
$ oc annotate baremetalhost <node_name> -n openshift-machine-api 'baremetalhost.metal3.io/detached'-
----
