1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/virt-adding-a-boot-source-web.adoc
2023-11-07 19:35:13 +00:00

52 lines
2.9 KiB
Plaintext

// Module included in the following assemblies:
//
:_mod-docs-content-type: PROCEDURE
[id="virt-adding-a-boot-source-web_{context}"]
= Adding boot source to a template
You can add a boot source or operating system image to a virtual machine (VM) template. When templates are configured with an operating system image, they are labeled *Source available* on the *Catalog* page. After you add a boot source to a template, you can create a VM from the template.
There are four methods for selecting and adding a boot source in the web console:
* *Upload local file (creates PVC)*
* *URL (creates PVC)*
* *Clone (creates PVC)*
* *Registry (creates PVC)*
.Prerequisites
* You must be logged in as a user with the `os-images.kubevirt.io:edit` RBAC role or as an administrator.
+
You do not need special privileges to create a VM from a template with an operating system image added.
* To upload a local file, the boot source file must exist on your local machine.
* To download from a URL endpoint, you must have access to the web server with the boot source. For example: the Red Hat Enterprise Linux web page with images.
* To clone an existing PVC, access to the project with a PVC is required.
* To download a boot source from a registry, access to the container registry is required.
.Procedure
. In the {product-title} console, click *Virtualization* -> *Catalog* from the side menu.
. Click the options menu beside a template and select *Edit boot source*.
. Click *Add disk*.
. In the *Add disk* window, select *Use this disk as a boot source*.
. Enter the disk name and select a *Source*, for example, *Blank (creates PVC)*.
. Enter a value for *Persistent Volume Claim size* to specify the PVC size that is adequate for the uncompressed image and any additional space that is required.
. Select a *Type*, for example, *Disk*.
. Optional: Click *Storage class* and select the storage class that is used to create the disk. Typically, this storage class is the default storage class that is created for use by all PVCs.
+
[NOTE]
====
Provided boot sources are updated automatically to the latest version of the operating system. For auto-updated boot sources, persistent volume claims (PVCs) and volume snapshots are created with the cluster's default storage class. If you select a different default storage class after configuration, you must delete the existing boot sources in the cluster namespace that are configured with the previous default storage class.
====
. Optional: Clear *Apply optimized StorageProfile settings* to edit the access mode or volume mode.
. Select the appropriate method to save your boot source:
.. Click *Save and upload* if you uploaded a local file.
.. Click *Save and import* if you imported content from a URL or the registry.
.. Click *Save and clone* if you cloned an existing PVC.
Your custom virtual machine template with a boot source is listed on the *Catalog* page. You can use this template to create a virtual machine.