Prerequisites
Ensure that:
- A default storage class is present on the cluster for dynamic allocation of persistent volumes.
- An ISO is available for booting the VM.
Installation steps
To install OpenShift Virtualization:
- In the OpenShift Container Platform web console, select Operators > OperatorHub.
- From the list of available operators, choose OpenShift Virtualization, and then click Install.
Figure 19. Installing the Open Virtualization operator
- Select Operators > Installed Operators and click OpenShift Virtualization.
- Click Create HyperConverged to create a hyperconverged instance.
- On the Creating Hyperconverged instance page, keep or update the default values as required, and then click Create.
Figure 20. Creating a hyperconverged instance
When the deployment is complete, a Virtualization section is enabled in the OpenShift web console. You can now create and manage a new virtual machine from the console, as described in the following section.
Create a virtual machine
To create a virtual machine:
- In the OpenShift Container Platform web console, select Virtualization and click Virtual Machines.
- Click Create VirtualMachine.
A Create VirtualMachine from catalog page opens, as shown in the following figure:
Figure 21. Creating a virtual machine
- Select the template that you want and click Quick create VirtualMachine.
- For templates where a boot source is unavailable, you can upload a boot ISO to the PVC to boot the VM and install the operating system, as shown in the following figure:
Figure 22. Customize VM template parameters
- Check Boot from CD and select Upload local file as the CD source type.
A PVC is created that uses the default storage class.
- Upload the ISO file and enter a Persistent Volume Claim value to specify the PVC size that is adequate for the uncompressed image and any additional space that is required.
- Select Blank to create a PVC using the default storage class as the disk source, and enter a value for the Disk size.
- When you click Next, the ISO starts uploading to the PVC.
- When the upload is complete, click Create VirtualMachine to create a virtual machine from the template.
Figure 23. Review and create a Virtual Machine
You can manage the virtual machines that you create from the OpenShift Container Platform web console.
- Click Virtualization and select the required virtual machine to view or update the settings.