Skip to main content
NetApp Solutions

Workflows: Red Hat OpenShift Virtualization with NetApp ONTAP

Contributors banum-netapp

Create VM

VMs are stateful deployments that require volumes to host the operating system and data. With CNV, because the VMs are run as pods, the VMs are backed by PVs hosted on NetApp ONTAP through Trident. These volumes are attached as disks and store the entire filesystem including the boot source of the VM.

Create VM architecture

To create a virtual machine on the OpenShift cluster, complete the following steps:

  1. Navigate to Workloads > Virtualization > Virtual Machines and click Create > With Wizard.

  2. Select the desired the operating system and click Next.

  3. If the selected operating system has no boot source configured, you must configure it. For Boot Source, select whether you want to import the OS image from an URL or from a registry and provide the corresponding details. Expand Advanced and select the Trident-backed StorageClass. Then click Next.

    Create boot source for VM
  4. If the selected operating system already has a boot source configured, the previous step can be skipped.

  5. In the Review and Create pane, select the project you want to create the VM in and furnish the VM details. Make sure that the boot source is selected to be Clone and boot from CD-ROM with the appropriate PVC assigned for the selected OS.

    Create VM
  6. If you wish to customize the virtual machine, click Customize Virtual Machine and modify the required parameters.

  7. Click Create Virtual Machine to create the virtual machine; this spins up a corresponding pod in the background.

When a boot source is configured for a template or an operating system from an URL or from a registry, it creates a PVC in the openshift-virtualization-os-images project and downloads the KVM guest image to the PVC. You must make sure that template PVCs have enough provisioned space to accommodate the KVM guest image for the corresponding OS. These PVCs are then cloned and attached as rootdisks to virtual machines when they are created using the respective templates in any project.