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.
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 27. Installing the Open Virtualization operator
- Select Operators > Installed Operators and click OpenShift Virtualization.
- Click Create HyperConverged.
Figure 28. Creating a hyperconverged instance
- On the page that opens, keep or update the default values of the hyperconverged instance as required, and then click Create.
When the deployment is complete, a Virtualization section is enabled in the OpenShift web console. Create 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 29. Creating a virtual machine
- Select the template that you want and click CustomizeVirtualMachine.
- 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 30. Customizing 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.
- Click Customize VirtualMachine parameters.
The ISO starts uploading to the PVC.
- When the upload is complete, click Create VirtualMachine to create a virtual machine from the template.
Figure 31. Creating a virtual machine
You can review and manage the virtual machines that you create from the web console.
- To manage a virtual machine, click Virtualization and select the required virtual machine to view or update the settings.