Preparing your cluster for OpenShift Virtualization
Before you install OpenShift Virtualization, review this section to ensure that your cluster meets the requirements.
Compatible platforms
You can use the following platforms with OpenShift Virtualization:
-
On-premise bare metal servers. See Planning a bare metal cluster for OpenShift Virtualization.
-
Bare metal clusters installed on ARM64-based (
arm64, also known asaarch64) systems.
-
IBM Z® or IBM® LinuxONE (s390x architecture) systems where an OpenShift Container Platform cluster is installed in logical partitions (LPARs). See Preparing to install on IBM Z and IBM LinuxONE.
- Cloud platforms
-
OpenShift Virtualization is also compatible with a variety of public cloud platforms. Each cloud platform has specific storage provider options available. The following table outlines which platforms are fully supported (GA) and which are currently offered as Technology Preview features.
| Vendor | Status | Storage | Related links |
|---|---|---|---|
Amazon Web Services (AWS) |
GA |
Elastic Block Store (EBS), Red Hat OpenShift Data Foundation (ODF), Portworx, FSx (NetApp) |
|
Red Hat OpenShift Service on AWS (ROSA) |
GA |
EBS, Portworx, FSx (Q3), ODF |
|
Oracle Cloud Infrastructure (OCI) |
GA |
OCI native storage |
|
Azure Red Hat OpenShift (ARO) |
GA |
ODF |
|
Google Cloud |
Technology Preview |
Google Cloud native storage |
|
Tip
For platform-specific networking information, see the networking overview.
Bare metal instances or servers offered by other cloud providers are not supported.
OpenShift Virtualization on AWS bare metal
You can run OpenShift Virtualization on an Amazon Web Services (AWS) bare metal OpenShift Container Platform cluster.
Note
OpenShift Virtualization is also supported on Red Hat OpenShift Service on AWS (ROSA) Classic clusters, which have the same configuration requirements as AWS bare-metal clusters.
Before you set up your cluster, review the following summary of supported features and limitations:
- Installing
-
You can install the cluster by using installer-provisioned infrastructure, ensuring that you specify bare-metal instance types for the worker nodes. For example, you can use the
c5n.metaltype value for a machine based on x86_64 architecture. You specify bare-metal instance types by editing theinstall-config.yamlfile.For more information, see the OpenShift Container Platform documentation about installing on AWS.
- Accessing virtual machines (VMs)
-
There is no change to how you access VMs by using the
virtctlCLI tool or the OpenShift Container Platform web console. -
You can expose VMs by using a
NodePortorLoadBalancerservice.Note
The load balancer approach is preferable because OpenShift Container Platform automatically creates the load balancer in AWS and manages its lifecycle. A security group is also created for the load balancer, and you can use annotations to attach existing security groups. When you remove the service, OpenShift Container Platform removes the load balancer and its associated resources.
- Networking
-
You cannot use Single Root I/O Virtualization (SR-IOV) or bridge Container Network Interface (CNI) networks, including virtual LAN (VLAN). If your application requires a flat layer 2 network or control over the IP pool, consider using OVN-Kubernetes secondary overlay networks.
- Storage
-
You can use any storage solution that is certified by the storage vendor to work with the underlying platform.
Important
AWS bare metal, Red Hat OpenShift Service on AWS, and Red Hat OpenShift Service on AWS classic architecture clusters might have different supported storage solutions. Ensure that you confirm support with your storage vendor.
-
Using Amazon Elastic File System (EFS) or Amazon Elastic Block Store (EBS) with OpenShift Virtualization might cause performance and functionality limitations as shown in the following table:
Table 1. EFS and EBS performance and functionality limitations Feature EBS volume EFS volume Shared storage solutions gp2
gp3
io2
VM live migration
Not available
Not available
Available
Available
Available
Fast VM creation by using cloning
Available
Not available
Available
VM backup and restore by using snapshots
Available
Not available
Available
Consider using CSI storage, which supports ReadWriteMany (RWX), cloning, and snapshots to enable live migration, fast VM creation, and VM snapshots capabilities.
- Hosted control planes (HCPs)
-
HCPs for OpenShift Virtualization are not currently supported on AWS infrastructure.
ARM64 compatibility
Using OpenShift Virtualization on an OpenShift Container Platform cluster installed on an ARM64 system is generally available (GA).
Before using OpenShift Virtualization on an ARM64-based system, consider the following limitations:
- Operating system
-
-
Only Linux-based guest operating systems are supported.
-
All virtualization limitations for RHEL also apply to OpenShift Virtualization. For more information, see How virtualization on ARM64 differs from AMD64 and Intel 64 in the RHEL documentation.
-
- Live migration
-
-
Live migration is not supported on ARM64-based OpenShift Container Platform clusters.
-
Hotplug is not supported on ARM64-based clusters because it depends on live migration.
-
- VM creation
-
-
RHEL 10 supports instance types and preferences, but not templates.
-
RHEL 9 supports templates, instance types, and preferences.
-
IBM Z and IBM LinuxONE compatibility
You can use OpenShift Virtualization in an OpenShift Container Platform cluster that is installed in logical partitions (LPARs) on an IBM Z® or IBM® LinuxONE (s390x architecture) system.
Some features are not currently available on s390x architecture, while others require workarounds or procedural changes. These lists are subject to change.
Currently unavailable features
The following features are currently not available on s390x architecture:
-
Memory hot plugging and hot unplugging
-
Node Health Check Operator
-
SR-IOV Operator
-
PCI passthrough
-
OpenShift Virtualization cluster checkup framework
-
OpenShift Virtualization on a cluster installed in FIPS mode
-
IPv6
-
IBM® Storage scale
-
Hosted control planes for OpenShift Virtualization
-
VM pages using HugePages
The following features are not applicable on s390x architecture:
-
virtual Trusted Platform Module (vTPM) devices
-
UEFI mode for VMs
-
USB host passthrough
-
Configuring virtual GPUs
-
Creating and managing Windows VMs
-
Hyper-V
Functionality differences
The following features are available for use on s390x architecture but function differently or require procedural changes:
-
When deleting a virtual machine by using the web console, the grace period option is ignored.
-
When configuring the default CPU model, the
spec.defaultCPUModelvalue is"gen15b"for an IBM Z cluster. -
When configuring a downward metrics device, if you use a VM preference, the
spec.preference.namevalue must be set torhel.9.s390xor another available preference with the format*.s390x. -
When creating virtual machines from instance types, you are not allowed to set
spec.domain.memory.maxGuestbecause memory hot plugging is not supported on IBM Z®. -
Prometheus queries for VM guests could have inconsistent outcome in comparison to
x86.
Important considerations for any platform
Before you install OpenShift Virtualization on any platform, note the following caveats and considerations.
- Installation method considerations
-
You can use any installation method, including user-provisioned, installer-provisioned, or Assisted Installer, to deploy OpenShift Container Platform. However, the installation method and the cluster topology might affect OpenShift Virtualization functionality, such as snapshots or live migration.
- Red Hat OpenShift Data Foundation
-
If you deploy OpenShift Virtualization with Red Hat OpenShift Data Foundation, you must create a dedicated storage class for Windows virtual machine disks. See Optimizing ODF PersistentVolumes for Windows VMs for details.
- IPv6
-
OpenShift Virtualization support for single-stack IPv6 clusters is limited to the OVN-Kubernetes localnet and Linux bridge Container Network Interface (CNI) plugins.
Important
Deploying OpenShift Virtualization on a single-stack IPv6 cluster is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
- FIPS mode
-
If you install your cluster in FIPS mode, no additional setup is required for OpenShift Virtualization.
Hardware and operating system requirements
Review the following hardware and operating system requirements for OpenShift Virtualization.
CPU requirements
-
Supported by Red Hat Enterprise Linux (RHEL) 9.
See Red Hat Ecosystem Catalog for supported CPUs.
Note
If your worker nodes have different CPUs, live migration failures might occur because different CPUs have different capabilities. You can mitigate this issue by ensuring that your worker nodes have CPUs with the appropriate capacity and by configuring node affinity rules for your virtual machines.
See Configuring a required node affinity rule for details.
-
Supports AMD64, Intel 64-bit (x86-64-v2), IBM Z® (
s390x), or ARM64-based (arm64oraarch64) architectures and their respective CPU extensions. -
Intel VT-x, AMD-V, or ARM virtualization extensions are enabled, or
s390xvirtualization support is enabled. -
NX (no execute) flag is enabled.
-
If you use
s390xarchitecture, the default CPU model is set togen15b.
Operating system requirements
-
Red Hat Enterprise Linux CoreOS (RHCOS) installed on worker nodes.
See About RHCOS for details.
Note
RHEL worker nodes are not supported.
Storage requirements
-
Supported by OpenShift Container Platform. See Optimizing storage.
-
You must create a default OpenShift Virtualization or OpenShift Container Platform storage class. The purpose of this is to address the unique storage needs of VM workloads and offer optimized performance, reliability, and user experience. If both OpenShift Virtualization and OpenShift Container Platform default storage classes exist, the OpenShift Virtualization class takes precedence when creating VM disks.
Note
To mark a storage class as the default for virtualization workloads, set the annotation storageclass.kubevirt.io/is-default-virt-class to "true".
-
If the storage provisioner supports snapshots, you must associate a
VolumeSnapshotClassobject with the default storage class.
About volume and access modes for virtual machine disks
If you use the storage API with known storage providers, the volume and access modes are selected automatically. However, if you use a storage class that does not have a storage profile, you must configure the volume and access mode.
For a list of known storage providers for OpenShift Virtualization, see the Red Hat Ecosystem Catalog.
For best results, use the ReadWriteMany (RWX) access mode and the Block volume mode. This is important for the following reasons:
-
ReadWriteMany(RWX) access mode is required for live migration. -
The
Blockvolume mode performs significantly better than theFilesystemvolume mode. This is because theFilesystemvolume mode uses more storage layers, including a file system layer and a disk image file. These layers are not necessary for VM disk storage.For example, if you use Red Hat OpenShift Data Foundation, Ceph RBD volumes are preferable to CephFS volumes.
Important
You cannot live migrate virtual machines with the following configurations:
-
Storage volume with
ReadWriteOnce(RWO) access mode -
Passthrough features such as GPUs
Set the evictionStrategy field to None for these virtual machines.
The None strategy powers down VMs during node reboots.
Live migration requirements
-
Shared storage with
ReadWriteMany(RWX) access mode. -
Sufficient RAM and network bandwidth.
Note
You must ensure that there is enough memory request capacity in the cluster to support node drains that result in live migrations. You can determine the approximate required spare memory by using the following calculation:
Product of (Maximum number of nodes that can drain in parallel) and (Highest total VM memory request allocations across nodes)
The default number of migrations that can run in parallel in the cluster is 5.
-
If the virtual machine uses a host model CPU, the nodes must support the virtual machine’s host model CPU.
Note
A dedicated Multus network for live migration is highly recommended. A dedicated network minimizes the effects of network saturation on tenant workloads during migration.
Physical resource overhead requirements
OpenShift Virtualization is an add-on to OpenShift Container Platform and imposes additional overhead that you must account for when planning a cluster.
Each cluster machine must accommodate the following overhead requirements in addition to the OpenShift Container Platform requirements. Oversubscribing the physical resources in a cluster can affect performance.
Important
The numbers noted in this documentation are based on Red Hat’s test methodology and setup. These numbers can vary based on your own individual setup and environments.
Memory overhead
Calculate the memory overhead values for OpenShift Virtualization by using the equations below.
- Cluster memory overhead
-
Memory overhead per infrastructure node ≈ 150 MiB
Memory overhead per worker node ≈ 360 MiB
Additionally, OpenShift Virtualization environment resources require a total of 2179 MiB of RAM that is spread across all infrastructure nodes.
- Virtual machine memory overhead
-
Memory overhead per virtual machine ≈ (0.002 × requested memory) \ + 218 MiB \ + 8 MiB × (number of vCPUs) \ + 16 MiB × (number of graphics devices) \ + (additional memory overhead)- Required for the processes that run in the
virt-launcherpod. - Number of virtual CPUs requested by the virtual machine.
- Number of virtual graphics cards requested by the virtual machine.
- Additional memory overhead:
-
If your environment includes a Single Root I/O Virtualization (SR-IOV) network device or a Graphics Processing Unit (GPU), allocate 1 GiB additional memory overhead for each device.
-
If Secure Encrypted Virtualization (SEV) is enabled, add 256 MiB.
-
If Trusted Platform Module (TPM) is enabled, add 53 MiB.
-
- Required for the processes that run in the
CPU overhead
Calculate the cluster processor overhead requirements for OpenShift Virtualization by using the equation below. The CPU overhead per virtual machine depends on your individual setup.
- Cluster CPU overhead
-
CPU overhead for infrastructure nodes ≈ 4 cores
OpenShift Virtualization increases the overall utilization of cluster level services such as logging, routing, and monitoring. To account for this workload, ensure that nodes that host infrastructure components have capacity allocated for 4 additional cores (4000 millicores) distributed across those nodes.
CPU overhead for worker nodes ≈ 2 cores + CPU overhead per virtual machine
Each worker node that hosts virtual machines must have capacity for 2 additional cores (2000 millicores) for OpenShift Virtualization management workloads in addition to the CPUs required for virtual machine workloads.
- Virtual machine CPU overhead
-
If dedicated CPUs are requested, there is a 1:1 impact on the cluster CPU overhead requirement. Otherwise, there are no specific rules about how many CPUs a virtual machine requires.
Storage overhead
Use the guidelines below to estimate storage overhead requirements for your OpenShift Virtualization environment.
- Cluster storage overhead
-
Aggregated storage overhead per node ≈ 10 GiB
10 GiB is the estimated on-disk storage impact for each node in the cluster when you install OpenShift Virtualization.
- Virtual machine storage overhead
-
Storage overhead per virtual machine depends on specific requests for resource allocation within the virtual machine. The request could be for ephemeral storage on the node or storage resources hosted elsewhere in the cluster. OpenShift Virtualization does not currently allocate any additional ephemeral storage for the running container itself.
- Example
-
As a cluster administrator, if you plan to host 10 virtual machines in the cluster, each with 1 GiB of RAM and 2 vCPUs, the memory impact across the cluster is 11.68 GiB. The estimated on-disk storage impact for each node in the cluster is 10 GiB and the CPU impact for worker nodes that host virtual machine workloads is a minimum of 2 cores.
Single-node OpenShift differences
You can install OpenShift Virtualization on single-node OpenShift.
However, you should be aware that Single-node OpenShift does not support the following features:
-
High availability
-
Pod disruption
-
Live migration
-
Virtual machines or templates that have an eviction strategy configured
Object maximums
You must consider the following tested object maximums when planning your cluster:
Cluster high-availability options
You can configure one of the following high-availability (HA) options for your cluster:
-
Automatic high availability for installer-provisioned infrastructure (IPI) is available by deploying machine health checks.
Note
In OpenShift Container Platform clusters installed using installer-provisioned infrastructure and with a properly configured
MachineHealthCheckresource, if a node fails the machine health check and becomes unavailable to the cluster, it is recycled. What happens next with VMs that ran on the failed node depends on a series of conditions. See Run strategies for more detailed information about the potential outcomes and how run strategies affect those outcomes.Currently, IPI is not supported on IBM Z®.
-
Automatic high availability for both IPI and non-IPI is available by using the Node Health Check Operator on the OpenShift Container Platform cluster to deploy the
NodeHealthCheckcontroller. The controller identifies unhealthy nodes and uses a remediation provider, such as the Self Node Remediation Operator or Fence Agents Remediation Operator, to remediate the unhealthy nodes. For more information on remediation, fencing, and maintaining nodes, see the Workload Availability for Red Hat OpenShift documentation.Note
Fence Agents Remediation uses supported fencing agents to reset failed nodes faster than the Self Node Remediation Operator. This improves overall virtual machine high availability. For more information, see the OpenShift Virtualization - Fencing and VM High Availability Guide knowledgebase article.
-
High availability for any platform is available by using either a monitoring system or a qualified human to monitor node availability. When a node is lost, shut it down and run
oc delete node <lost_node>.Note
Without an external monitoring system or a qualified human monitoring node health, virtual machines lose high availability.