Description of problem: When creating a VM from a template with custom cloud-init script, the gui does not show the userData stored in the templates yaml for the cloudinitdisk. As a result, the VM is created without a known password and the cloud-init scripts are not run. Version-Release number of selected component (if applicable): 2.5.3 How reproducible: Everytime Steps to Reproduce: 1.Create a template from a boot source image (rhel8) 2.Add some custom cloud-init configuration to the template. i used the following: #cloud-config user: cloud-user password: changeme chpasswd: expire: false rh_subscription: org: an_org_name_or_number activation-key: an_activation_key auto-attach: true 3. Save the template 4. View the yaml for the template and the script is present. volumes: - name: cloudinitdisk cloudInitNoCloud: userData: |+ #cloud-config user: cloud-user password: changeme chpasswd: expire: false rh_subscription: org: an_org_name_or_number activation-key: an_activation_key auto-attach: true 5. Create a VM from the template. 6. The cloud-init page has a blank custom script. 7. Finish creating the VM with the blank cloud-init script. Actual results: The cloud-init script stored in yaml file is not executed. If I create another VM and paste the same script into the gui, it works as expected. Expected results: The Custom Cloud-init script stored in the template should automatically populate the gui and be executed once the VM is created. Additional info:
I tested creating the VM from the command line and it works as expected. The cloud-init stored in the template is executed. oc process rhel8-autoregister -n default NAME=test-cloud-init | oc create -f -
I am running OpenShift version 4.7.3 and CNV version 2.6.1.
*** This bug has been marked as a duplicate of bug 1925207 ***