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.
Install OpenShift Virtualization
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 20. Installing the Open Virtualization operator
- Go to 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 21.
Creating a hyperconverged instance
When the deployment is complete, a Virtualization section is enabled in the OpenShift web console. You can 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.
- Click Virtual Machines.
- Click Create VirtualMachine.
On the Create VirtualMachine from catalog page, select the template that you want.
Figure 22. Creating a virtual machine
- 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 23. Customize VM template parameters
- Check Boot from CD and select Upload local file as the CD source type.
This creates a PVC using 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 required space.
- Select Blank to create a PVC using the default Storage Class as the disk source, and enter a value for the Disk size.
- 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 24. 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.