Document URL: https://docs.openshift.com/container-platform/4.8/virt/vm_templates/virt-creating-vm-template.html Section Number and Name: - Creating virtual machine templates Describe the issue: Currently the product guide of OpenShift Virtualization covers the Virtual Machine Templates topic. However, this chapter focuses on manipulation of templates and virtual machines creation from templates using the wizard provided by the OpenShift web console. There is a lack of explanation regarding the creation of virtual machines after processing the template using the CLI of the oc client. Suggestions for improvement: Users interested in creating virtual machines from templates using the CLI need to review the Upstream documentation provided by Kubevirt [1]. [1] https://kubevirt.io/user-guide/virtual_machines/templates/#virtual-machine-creation Additional information:
Currently, OpenShift Virtualization supports creating a VM from the UI. Review bug during the next PM open hours/planning meeting to determine how to address this issue.
The documentation for creating a VM from the CLI was recently updated: https://docs.openshift.com/container-platform/4.10/virt/virtual_machines/virt-create-vms.html#virt-creating-vm-cli_virt-create-vms The VirtualMachine manifest example creates a RHEL 9 VM. If a user has a VM template, this procedure should work for creating a VM from the CLI.
Avital, The linked documentation does not provide instructions how to create the yaml definition from one of our pre-existing templates. This is important, for example, so that users can take advantage of the managed boot sources as well as ensuring that some more detailed VM settings are configured properly.
(In reply to Adam Litke from comment #7) > Avital, > > The linked documentation does not provide instructions how to create the > yaml definition from one of our pre-existing templates. This is important, > for example, so that users can take advantage of the managed boot sources as > well as ensuring that some more detailed VM settings are configured properly. Adam, We have documentation for editing the YAML of an existing template in the UI (https://docs.openshift.com/container-platform/4.10/virt/vm_templates/virt-editing-vm-template.html#virt-editing-template-yaml-web_virt-editing-vm-template). Would the user copy a template yaml from the UI and edit with the CLI? Or is there a way to list and get existing templates from the CLI?
Closing as deferred. Creating templates from API is a CNV Feature and planned for a future release. Documentation will accompany the feature when implemented in the product.