Skip to content

Commit 9414579

Browse files
author
Michael Burke
committed
OSDOCS Document how to perform boot image updates on marketplace clusters vSphere
1 parent 378aa7e commit 9414579

2 files changed

Lines changed: 161 additions & 0 deletions

File tree

machine_configuration/mco-update-boot-images.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ include::modules/mco-update-boot-images-about.adoc[leveloffset=+1]
2222
2323
include::modules/mco-update-boot-images-configuring.adoc[leveloffset=+1]
2424

25+
include::modules/mco-update-boot-images-vsphere.adoc[leveloffset=+2]
26+
2527
include::modules/mco-update-boot-images-nutanix.adoc[leveloffset=+2]
2628

2729
include::modules/mco-update-boot-images-openstack.adoc[leveloffset=+2]
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_configuration/mco-update-boot-images.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="mco-update-boot-images-vsphere_{context}"]
7+
= Manually updating the boot image on an {vmw-short} cluster
8+
9+
[role="_abstract"]
10+
You can manually update the boot image for your {vmw-first} cluster by configuring your machine sets to use the latest {product-title} image as the boot image to ensure that new nodes can scale up properly.
11+
12+
vSphere boot images use a template you create by uploading the OVA image to the VMware vCenter. The template image is used by all machine sets as the boot image. The following procedure shows how to identify the correct boot image to use as the new boot image, how to create the template from the image in vCenter, and how to modify your compute machine sets to use that template image.
13+
14+
[NOTE]
15+
====
16+
For clusters that use a default {op-system-first} image, you can configure the cluster to automatically update the boot image each time the cluster is updated. If you are using the following procedure, ensure that automatic boot image updates are disabled and skew enforcement is in manual mode. For more information, see "Boot image management" and "Boot image skew enforcement".
17+
====
18+
19+
.Prerequisites
20+
21+
* You have completed the general boot image prerequisites as described in the "Prerequisites" section of the link:https://access.redhat.com/articles/7053165#prerequisites-2[{product-title} Boot Image Updates knowledgebase article].
22+
23+
* You have installed the {oc-first}.
24+
25+
* You have set boot image skew enforcement to the manual or none mode. For more information, see "Configuring boot image skew enforcement".
26+
27+
* You have disabled boot image management for the cluster. For more information, see "Disabling boot image management".
28+
29+
* You have downloaded the latest version of the {product-title} installation program, openshift-install, from the {cluster-manager-url}. For more information, see "Obtaining the installation program."
30+
31+
.Procedure
32+
33+
. Obtain the latest boot image to use as the new boot image:
34+
35+
.. Obtain the name of the new boot image by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ openshift-install coreos print-stream-json | jq '.architectures.x86_64.artifacts.vmware'
40+
----
41+
+
42+
.Example output
43+
[source,terminal]
44+
----
45+
{
46+
"release": "9.6.20251023-0",
47+
"formats": {
48+
"ova": {
49+
"disk": {
50+
"location": "https://rhcos.mirror.openshift.com/art/storage/prod/streams/rhel-9.6/builds/9.6.20251023-0/x86_64/rhcos-9.6.20251023-0-vmware.x86_64.ova",
51+
"sha256": "14fa549bb83b2e730de22312419b503bc1ce85adf72269582f0af60e366d87ff"
52+
}
53+
}
54+
}
55+
}
56+
----
57+
58+
.. Use the URL in the `location` field to download the image.
59+
60+
//Copied from installation-vsphere-machines.adoc; last two steps from KB
61+
. In the vSphere Client, create a template for the OVA image:
62+
.. From the *Hosts and Clusters* tab, right-click your cluster name and select *Deploy OVF Template*.
63+
.. On the *Select an OVF* tab, specify the name of the {op-system} OVA file that you downloaded.
64+
.. On the *Select a name and folder* tab, set a *Virtual machine name* for your template, such as `Template-{op-system}`. Click the name of your vSphere cluster and select the folder.
65+
.. On the *Select a compute resource* tab, click the name of your vSphere cluster.
66+
.. On the *Select storage* tab, configure the storage options for your VM.
67+
*** Select *Thin Provision* or *Thick Provision*, based on your storage preferences.
68+
*** Select the datastore that you specified in your `install-config.yaml` file.
69+
*** If you want to encrypt your virtual machines, select *Encrypt this virtual machine*. See the section titled "Requirements for encrypting virtual machines" for more information.
70+
.. On the *Select network* tab, specify the network that you configured for the cluster, if available.
71+
.. When creating the OVF template, do not specify values on the *Customize template* tab or configure the template any further.
72+
.. On the *Ready to complete* tab, verify your settings and click *Finish*.
73+
+
74+
The vSphere Client uploads the boot image and creates the OVF template. This can take a few minutes depending on network speeds. You can keep track of this process in the task tab under _Deploy OVF template_.
75+
.. After the upload is complete, click the new virtual machine and click *Template* -> *Convert to template* -> *Yes*.
76+
+
77+
You now have a VM template based on the new boot image, which you can use to update the machineset objects.
78+
79+
. Update each of your compute machine sets to include the new boot image:
80+
81+
.. Obtain the name of your machine sets for use in the following step by running the following command:
82+
+
83+
[source,terminal]
84+
----
85+
$ oc get machineset -n openshift-machine-api
86+
----
87+
+
88+
.Example output
89+
[source,terminal]
90+
----
91+
NAME DESIRED CURRENT READY AVAILABLE AGE
92+
ci-ln-xw7zmyt-72292-x7nqv-worker-a 1 1 1 1 53m
93+
----
94+
95+
.. Edit a machine set to update the `image` field in the `providerSpec` stanza to add your boot image by running the following command:
96+
+
97+
[source,terminal]
98+
----
99+
$ oc patch machineset <machineset-name> -n openshift-machine-api --type json \
100+
-p '[{"op": "replace", "path": "/spec/template/spec/providerSpec/value/template", "value": "ci-ln-6vjqx8t-c1627-bwxkr-rhcos-generated-region-generated-zone"}]'
101+
----
102+
+
103+
Replace `<machineset_name>` with the name of your machine set.
104+
105+
. If boot image skew enforcement in your cluster is set to the manual mode, update the version of the new boot image in the `MachineConfiguration` object as described in "Updating the boot image skew enforcement version".
106+
107+
.Verification
108+
109+
. Scale up a machine set to check that the new node is using the new boot image:
110+
111+
.. Increase the machine set replicas by one to trigger a new machine by running the following command:
112+
+
113+
[source,terminal]
114+
----
115+
$ oc scale --replicas=<count> machineset <machineset_name> -n openshift-machine-api
116+
----
117+
where:
118+
119+
`<count>`:: Specifies the total number of replicas, including any existing replicas, that you want for this machine set.
120+
`<machineset_name>`:: Specifies the name of the machine set to scale.
121+
122+
.. Optional: View the status of the machine set as it provisions by running the following command:
123+
+
124+
[source,terminal]
125+
----
126+
$ oc get machines.machine.openshift.io -n openshift-machine-api -w
127+
----
128+
+
129+
It can take several minutes for the machine set to achieve the `Running` state.
130+
131+
.. Verify that the new node has been created and is in the `Ready` state by running the following command:
132+
+
133+
[source,terminal]
134+
----
135+
$ oc get nodes
136+
----
137+
138+
. Verify that the new node is using the new boot image by running the following command:
139+
+
140+
[source,terminal]
141+
----
142+
$ oc debug node/<new_node> -- chroot /host cat /sysroot/.coreos-aleph-version.json
143+
----
144+
+
145+
Replace `<new_node>` with the name of your new node.
146+
+
147+
.Example output
148+
[source,terminal]
149+
----
150+
{
151+
# ...
152+
"ref": "docker://ostree-image-signed:oci-archive:/rhcos-9.6.20251212-1-ostree.x86_64.ociarchive",
153+
"version": "9.6.20251212-1"
154+
}
155+
----
156+
where:
157+
158+
`version`:: Specifies the boot image version.
159+

0 commit comments

Comments
 (0)