You can create virtual machines (VMs) from Red Hat templates by using the OKD web console.
You can use VM templates to help you easily create VMs.
You can expedite VM creation by using templates that have an available boot source. Templates with a boot source are labeled Available boot source if they do not have a custom label.
Templates without a boot source are labeled Boot source required. See Managing automatic boot source updates for details.
You can customize the disk source and VM parameters before you start the VM.
|
If you copy a VM template with all its labels and annotations, your version of the template is marked as deprecated when a new version of the Scheduling, Scale, and Performance (SSP) Operator is deployed. You can remove this designation. See Customizing a VM template by using the web console. |
Due to differences in storage behavior, some templates are incompatible with single-node OpenShift. To ensure compatibility, do not set the evictionStrategy field for templates or VMs that use data volumes or storage profiles.
You can create a virtual machine (VM) from a template with an available boot source by using the OKD web console.
Optional: You can customize template or VM parameters, such as data sources, cloud-init, or SSH keys, before you start the VM.
Navigate to Virtualization → Catalog in the web console.
Click Boot source available to filter templates with boot sources.
The catalog displays the default templates. Click All Items to view all available templates for your filters.
Click a template tile to view its details.
Click Quick create VirtualMachine to create a VM from the template.
Optional: Customize the template or VM parameters:
Click Customize VirtualMachine.
Expand Storage or Optional parameters to edit data source settings.
Click Customize VirtualMachine parameters.
The Customize and create VirtualMachine pane displays the Overview, YAML, Scheduling, Environment, Network interfaces, Disks, Scripts, and Metadata tabs.
Edit the parameters that must be set before the VM boots, such as cloud-init or a static SSH key.
Click Create VirtualMachine.
The VirtualMachine details page displays the provisioning status.
You can customize an existing virtual machine (VM) template by modifying the VM or template parameters, such as data sources, cloud-init, or SSH keys, before you start the VM. If you customize a template by copying it and including all of its labels and annotations, the customized template is marked as deprecated when a new version of the Scheduling, Scale, and Performance (SSP) Operator is deployed.
You can remove the deprecated designation from the customized template.
Navigate to Virtualization → Templates in the web console.
From the list of VM templates, click the template marked as deprecated.
Click Edit next to the pencil icon beside Labels.
Remove the following two labels:
template.kubevirt.io/type: "base"
template.kubevirt.io/version: "version"
Click Save.
Click the pencil icon beside the number of existing Annotations.
Remove the following annotation:
template.kubevirt.io/deprecated
Click Save.
You create a virtual machine template by editing a YAML file example in the OKD web console.
In the web console, click Virtualization → Templates in the side menu.
Optional: Use the Project drop-down menu to change the project associated with the new template. All templates are saved to the openshift project by default.
Click Create Template.
Specify the template parameters by editing the YAML file.
Click Create.
The template is displayed on the Templates page.
Optional: Click Download to download and save the YAML file.
You can enable dedicated resources for a virtual machine (VM) template in the OKD web console. VMs that are created from this template will be scheduled with dedicated resources.
In the OKD web console, click Virtualization → Templates in the side menu.
Select the template that you want to edit to open the Template details page.
On the Scheduling tab, click the edit icon beside Dedicated Resources.
Select Schedule this workload with dedicated resources (guaranteed policy).
Click Save.