// Module included in the following assemblies:
//
// updating/updating_a_cluster/updating-hardware-on-nodes-running-in-vsphere.adoc

:_mod-docs-content-type: PROCEDURE
[id="update-vsphere-virtual-hardware-on-control-plane-nodes_{context}"]
= Updating the virtual hardware for control plane nodes on vSphere

[role="_abstract"]
You can update the virtual hardware for control plane nodes on vSphere.

To reduce the risk of downtime, it is recommended that control plane nodes be updated serially. This ensures that the Kubernetes API remains available and etcd retains quorum.

.Prerequisites

* You have cluster administrator permissions to execute the required permissions in the vCenter instance hosting your {product-title} cluster.
* Your vSphere ESXi hosts are version 8.0 Update 1 or later, or VWware vSphere Foundation 9, or VMware Cloud Foundation 9.

.Procedure

. List the control plane nodes in your cluster by running the following command:
+
[source,terminal]
----
$ oc get nodes -l node-role.kubernetes.io/master
----
+
.Example output
[source,terminal]
----
NAME                    STATUS   ROLES    AGE   VERSION
control-plane-node-0    Ready    master   75m   v1.35.4
control-plane-node-1    Ready    master   75m   v1.35.4
control-plane-node-2    Ready    master   75m   v1.35.4
----
+
Note the names of your control plane nodes.

. Mark the control plane node as unschedulable by running the following command:
+
[source,terminal]
----
$ oc adm cordon <control_plane_node>
----

. Shut down the virtual machine (VM) associated with the control plane node. Do this in the vSphere client by right-clicking the VM and selecting *Power* -> *Shut Down Guest OS*. Do not shut down the VM using *Power Off* because it might not shut down safely.

. Update the VM in the vSphere client. Follow link:https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-60768C2F-72E1-42E0-8A17-CA76849F2950.html[Upgrade the Compatibility of a Virtual Machine Manually] (VMware vSphere documentation).

. Power on the VM associated with the control plane node. Do this in the vSphere client by right-clicking the VM and selecting *Power On*.

. Run the following command and wait for the node to report as `Ready`:
+
[source,terminal]
----
$ oc wait --for=condition=Ready node/<control_plane_node>
----

. Mark the control plane node as schedulable again by running the following command:
+
[source,terminal]
----
$ oc adm uncordon <control_plane_node>
----

. Repeat this procedure for each control plane node in your cluster.
