Description of problem: If a VM template has any parameter that is required but does not provide a default value, the storage disk source is lost. Version-Release number of selected component (if applicable): Openshift 4.12.0 Openshift Virtualization 4.12.0 How reproducible: Always Steps to Reproduce: 1. Create a VM template with a required parameter and no default value, for example: ~~~ parameters: - description: SSH pubkey for the cloud-init user name: CLOUD_USER_SSH_KEY required: true ~~~ 2. In the console, go to Virtual Machines -> Create from catalog -> Select template -> Customize Virtual Machine. Actual results: CLOUD_USER_SSH_KEY is empty and required as expected, however in Storage -> Disk source, the details of the source storage has been lost. Expected results: I expect that "Template default" is selected in Storage -> Disk source. Additional info:
Created attachment 1942824 [details] template.yaml
I could reproduce the issue, but I double about whether it's a valid scenario because it sets a required parameter in the template but not provide the data for the required parameter.
The required parameter 'CLOUD_USER_SSH_KEY' is displaying on page now, but the parameter is not processed. Create a VM from it cannot see the key or secret about it. @Ugo @Tal Do we need further fix for the problem?
Missed one part while creating the template, retest it with the YAML from the attachment, the ssh key is actually in the VM YAML.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Virtualization 4.13.0 Images security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2023:3205
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days