mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
64 lines
3.7 KiB
Plaintext
64 lines
3.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * virt/vm_templates/virt-creating-vm-template.adoc
|
|
|
|
:_content-type: PROCEDURE
|
|
[id="virt-adding-a-boot-source-web_{context}"]
|
|
= Adding a boot source for a virtual machine template
|
|
|
|
A boot source can be configured for any virtual machine template that you want to use for creating virtual machines or custom templates. When virtual machine templates are configured with a boot source, they are labeled *Available* in the *Templates* tab. After you add a boot source to a template, you can create a new virtual machine from the template.
|
|
|
|
There are four methods for selecting and adding a boot source in the web console:
|
|
|
|
* *Upload local file (creates PVC)*
|
|
* *Import via URL (creates PVC)*
|
|
* *Clone existing PVC (creates PVC)*
|
|
* *Import via Registry (creates PVC)*
|
|
|
|
.Prerequisites
|
|
* To add a boot source, 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 virtual machine from a template with a boot source added.
|
|
|
|
* To upload a local file, the operating system image file must exist on your local machine.
|
|
|
|
* To import via URL, access to the web server with the operating system image is required. 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 import via registry, access to the container registry is required.
|
|
|
|
.Procedure
|
|
|
|
. In the {VirtProductName} console, click *Workloads* -> *Virtualization* from the side menu.
|
|
|
|
. Click the *Templates* tab.
|
|
|
|
. Identify the virtual machine template for which you want to configure a boot source and click *Add source*.
|
|
|
|
. In the *Add boot source to template* window, click *Select boot source*, select a method for creating a persistent volume claim (PVC): *Upload local file*, *Import via URL*, *Clone existing PVC*, or *Import via Registry*.
|
|
|
|
. Optional: Click *This is a CD-ROM boot source* to mount a CD-ROM and use it to install the operating system on to an empty disk. The additional empty disk is automatically created and mounted by {VirtProductName}. If the additional disk is not needed, you can remove it when you create the virtual machine.
|
|
|
|
. 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.
|
|
|
|
.. Optional: Enter a name for *Source provider* to associate the name with this template.
|
|
|
|
.. Optional: *Advanced Storage settings*: 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.
|
|
|
|
.. Optional: *Advanced Storage settings*: Click *Access mode* and select an access mode for the persistent volume:
|
|
|
|
* *Single User (RWO)* mounts the volume as read-write by a single node.
|
|
* *Shared Access (RWX)* mounts the volume as read-write by many nodes.
|
|
* *Read Only (ROX)* mounts the volume as read-only by many nodes.
|
|
|
|
.. Optional: *Advanced Storage settings*: Click *Volume mode* if you want to select *Block* instead of the default value *Filesystem*. {VirtProductName} can statically provision raw block volumes. These volumes do not have a file system, and can provide performance benefits for applications that either write to the disk directly or implement their own storage service.
|
|
|
|
. 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 in the *Templates* tab, and you can create virtual machines by using this template.
|