×

A default operating system (OS) image is a bootable disk containing an OS and all of the configuration settings for the OS, such as drivers. You use a default OS image to create bootable virtual machines with specific configurations.

To use default OS images, you must install the latest version of OpenShift Virtualization. You then create a persistent volume claim (PVC) by using the OpenShift Container Platform web console to upload a default OS image to the PVC. After uploading, you create virtual machines or virtual machine templates from the uploaded images by using the wizard in the web console.

Creating persistent volume claims to store default OS images

Follow these steps to create a persistent volume claim (PVC), which you use to upload and save default operating system (OS) images.

Prerequisites
  • You must be logged in as a user with the os-images.kubevirt.io:edit RBAC role or as an administrator.

Procedure
  1. Select a local image of a bootable disk that you want to upload and save as a default OS image.

  2. In the OpenShift Container Platform web console, click Storage > Persistent Volume Claims in the sidebar menu. The Persistent Volume Claim page displays.

  3. Click the Create Persistent Volume Claim button and select the With Data upload form option.

  4. Complete the Upload Data to Persistent Volume Claim form to create a PVC that is used to upload and save default OS images.

    1. Click Browse and locate a bootable image to upload and save as a default OS image.

    2. Select the Attach this data to a Virtual Machine operating system check box.

    3. Select the OS of the bootable disk that you want to upload from the Operating System list.

    4. Select the storage class you want to use in the Storage Class list.

    5. Enter the size of the PVC you are creating in the Size fields.

    6. Select the Access Mode.

    7. Click Create to create the PVC.

    The Persistent Volume Claim Details screen displays information about the PVC that you created.

Creating a virtual machine from a default OS image

After you have created a persistent volume claim (PVC) for default operating system (OS) images, you create a new virtual machine or virtual machine template from a default OS image that you uploaded to the PVC.

You can create virtual machines and virtual machine templates from default OS images with non-administrator user privileges. You need administrator privileges to upload and save default OS images to PVCs.

Prerequisites
  • When you created the PVC, you selected the Attach this data to a Virtual Machine operating system check box.

Procedure
  1. In the OpenShift Container Platform web console, click Workloads > Virtualization in the sidebar menu. The Virtualization page displays. Use web console Help or existing documentation to create virtual machine templates.

  2. Create a virtual machine or virtual machine template from an uploaded default OS image.

    1. Select Create Virtual Machine > New with Wizard. The Create Virtual Machine wizard displays.

    2. On the General wizard page, select an OS from the Operating System list that displays the (Source available) label next to the OS and version name. The (Source available) label indicates default OS images are available for this OS.

    3. Ensure that the Clone available operating system source check box is selected.

    4. Click the Review and Confirm button.

    5. On the Review and confirm your settings wizard page, review information about your virtual machine and change them, if required.

    6. Click Create Virtual Machine to create your virtual machine. The Successfully created virtual machine page displays with links to See virtual machine details or Go to list, to display the list of virtual machines and virtual machine templates.

Additional resources