Open saiteja313 opened 1 month ago
Only "specific" scenario that would work right now is with :
And there are two "RHSM" workarounds build when using a RHEL 8.8 iso :
==
DO NOT work Config :
The root source of most of the problems seems to come from the deprecated/unsupported/archived version of cloud-init-vmware-guestinfo tool
@saiteja313
And the fact your tooling using a very old library of cloud-init-vmware.sh
Our tooling doesn't use cloud-init-vmware.sh at all. Please refer to the below explanation:
It is clear that the cloud-init-vmware-guestinfo
is the source of all the trouble, but the step Directly install Guestinfo which installs the tool shouldn't have been executed in the first place as it's required only if Cloud-init version is less than 21.3. I tried reproducing this with a RHEL 8.10 source ISO, but I was unable to since, in my local build and CI builds, the final cloud-init
version is set to 23.4, so the build doesn't even execute that step and the image build works fine without any of the above workarounds. I tried using this image in an EKS-A cluster and that worked fine too.
The only thing that would make the build execute that guestinfo step is if this cloud-init
version is set to a value <= 21.3. We can find out what this value is if we run the image-builder
CLI with --ansible-verbosity
flag to 2, then try to debug from that point on.
Could you try running the image-builder
CLI with --ansible-verbosity
flag to 2 and provide the output you get for this version step? Here is what the output of that step looks like for me:
vsphere-iso.vsphere: TASK [providers : Set cloud-init version] **************************************
vsphere-iso.vsphere: task path: <path>/image-builder/images/capi/ansible/roles/providers/tasks/vmware-redhat.yml:29
vsphere-iso.vsphere: ok: [default] => {"ansible_facts": {"cloud_init_version": "23.4"}, "changed": false}
The sample config file I used is:
{
"cluster": "<cluster>",
"convert_to_template": "false",
"create_snapshot": "true",
"datacenter": "<datacenter>",
"datastore": "<datastore>",
"folder": "<folder>",
"insecure_connection": "true",
"linked_clone": "false",
"network": "<network>",
"password": "<password>",
"resource_pool": "<resource_pool>",
"template": "",
"username": "<username>",
"vcenter_server": "<vcenter_server>",
"vsphere_library_name": "<library>",
"rhel_username": "<rhel_username>",
"rhel_password": "<rhel_password>",
"iso_url": "file:///tmp/rhel-8.10-x86_64-dvd.iso",
"iso_checksum_type": "sha256",
"iso_checksum": "9b3c8e31bc2cdd2de9cf96abb3726347f5840ff3b176270647b3e66639af291b",
}
The command I ran to build the image is:
image-builder build --hypervisor vsphere --os redhat --os-version 8 --vsphere-config vsphere.json --release-channel 1-29 --ansible-verbosity 2
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment: