Description of problem: From the console, while creating VM using the template, customize virtual machine => scripts => Edit cloudinit => Click checkbox script => remove everything and add only a customer value like "example: test" and save and apply. Now when we edit the cloud int again to see the configuration, the data will be below: ~~~ userData: | #cloud-config '0': u '1': 'n' '2': d '3': e '4': f '5': i '6': 'n' '7': e '8': d ~~~ Version-Release number of selected component (if applicable): OpenShift Virtualization 4.13.0 How reproducible: 100% Steps to Reproduce: Please refer above. Actual results: Cloud-init user data is not parsed correctly if "userData" is removed. Expected results: Either validate the user input while saving the data or parse the data correctly. Additional info:
While looking at the script examples here: https://cloudinit.readthedocs.io/en/latest/reference/examples.html There are no "userData: |" provided in these examples, hence suggest removing it from script UI. Currently it looks like: userData: | #cloud-config user: centos password: m62e-b6fg-ve6w chpasswd: expire: false Suggestion: #cloud-config user: centos password: m62e-b6fg-ve6w chpasswd: expire: false