Bug 2066642

Summary: [RFE][Virtualization][Documentation] To include in the product guide the procedure to create VMs from templates using the CLI.
Product: Container Native Virtualization (CNV) Reporter: nsurati
Component: DocumentationAssignee: ctomasko <ctomasko>
Status: CLOSED DEFERRED QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: high    
Version: 4.11.0CC: alitke, cnv-qe-bugs, maugarci
Target Milestone: ---   
Target Release: 4.13.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: https://issues.redhat.com/browse/CNV-17042
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-20 02:23:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description nsurati 2022-03-22 08:57:28 UTC
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:

Comment 4 ctomasko 2022-04-12 05:53:36 UTC
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.

Comment 6 Avital Pinnick 2022-07-07 15:05:18 UTC
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.

Comment 7 Adam Litke 2022-07-22 16:31:28 UTC
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.

Comment 9 Avital Pinnick 2022-07-27 08:57:12 UTC
(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?

Comment 11 ctomasko 2022-10-20 02:23:48 UTC
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.