Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 1. About
1.1. About OpenShift Virtualization Link kopierenLink in die Zwischenablage kopiert!
Learn about OpenShift Virtualization’s capabilities and support scope.
1.1.1. What you can do with OpenShift Virtualization Link kopierenLink in die Zwischenablage kopiert!
OpenShift Virtualization is an add-on to OpenShift Container Platform that allows you to run and manage virtual machine workloads alongside container workloads.
OpenShift Virtualization adds new objects into your OpenShift Container Platform cluster by using Kubernetes custom resources to enable virtualization tasks. These tasks include:
- Creating and managing Linux and Windows virtual machines (VMs)
- Running pod and VM workloads alongside each other in a cluster
- Connecting to virtual machines through a variety of consoles and CLI tools
- Importing and cloning existing virtual machines
- Managing network interface controllers and storage disks attached to virtual machines
- Live migrating virtual machines between nodes
An enhanced web console provides a graphical portal to manage these virtualized resources alongside the OpenShift Container Platform cluster containers and infrastructure.
OpenShift Virtualization is designed and tested to work well with Red Hat OpenShift Data Foundation features.
When you deploy OpenShift Virtualization with OpenShift Data Foundation, you must create a dedicated storage class for Windows virtual machine disks. See Optimizing ODF PersistentVolumes for Windows VMs for details.
You can use OpenShift Virtualization with OVN-Kubernetes, OpenShift SDN, or one of the other certified network plugins listed in Certified OpenShift CNI Plug-ins.
You can check your OpenShift Virtualization cluster for compliance issues by installing the Compliance Operator and running a scan with the
ocp4-moderate
ocp4-moderate-node
1.1.1.1. OpenShift Virtualization supported cluster version Link kopierenLink in die Zwischenablage kopiert!
The latest stable release of OpenShift Virtualization 4.14 is 4.14.17.
OpenShift Virtualization 4.14 is supported for use on OpenShift Container Platform 4.14 clusters. To use the latest z-stream release of OpenShift Virtualization, you must first upgrade to the latest version of OpenShift Container Platform.
1.1.2. About volume and access modes for virtual machine disks Link kopierenLink in die Zwischenablage kopiert!
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 best results, use the
ReadWriteMany
Block
-
(RWX) access mode is required for live migration.
ReadWriteMany The
volume mode performs significantly better than theBlockvolume 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.FilesystemFor example, if you use Red Hat OpenShift Data Foundation, Ceph RBD volumes are preferable to CephFS volumes.
You cannot live migrate virtual machines with the following configurations:
-
Storage volume with (RWO) access mode
ReadWriteOnce - Passthrough features such as GPUs
Do not set the
evictionStrategy
LiveMigrate
1.1.3. Single-node OpenShift differences Link kopierenLink in die Zwischenablage kopiert!
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
1.2. Supported limits Link kopierenLink in die Zwischenablage kopiert!
You can refer to tested object maximums when planning your OpenShift Container Platform environment for OpenShift Virtualization. However, approaching the maximum values can reduce performance and increase latency. Ensure that you plan for your specific use case and consider all factors that can impact cluster scaling.
For more information about cluster configuration and options that impact performance, see the OpenShift Virtualization - Tuning & Scaling Guide in the Red Hat Knowledgebase.
1.2.1. Tested maximums for OpenShift Virtualization Link kopierenLink in die Zwischenablage kopiert!
The following limits apply to a large-scale OpenShift Virtualization 4.x environment. They are based on a single cluster of the largest possible size. When you plan an environment, remember that multiple smaller clusters might be the best option for your use case.
1.2.1.1. Virtual machine maximums Link kopierenLink in die Zwischenablage kopiert!
The following maximums apply to virtual machines (VMs) running on OpenShift Virtualization. These values are subject to the limits specified in Virtualization limits for Red Hat Enterprise Linux with KVM.
| Objective (per VM) | Tested limit | Theoretical limit |
|---|---|---|
| Virtual CPUs | 216 vCPUs | 255 vCPUs |
| Memory | 6 TB | 16 TB |
| Single disk size | 20 TB | 100 TB |
| Hot-pluggable disks | 255 disks | N/A |
Each VM must have at least 512 MB of memory.
1.2.1.2. Host maximums Link kopierenLink in die Zwischenablage kopiert!
The following maximums apply to the OpenShift Container Platform hosts used for OpenShift Virtualization.
| Objective (per host) | Tested limit | Theoretical limit |
|---|---|---|
| Logical CPU cores or threads | Same as Red Hat Enterprise Linux (RHEL) | N/A |
| RAM | Same as RHEL | N/A |
| Simultaneous live migrations | Defaults to 2 outbound migrations per node, and 5 concurrent migrations per cluster | Depends on NIC bandwidth |
| Live migration bandwidth | No default limit | Depends on NIC bandwidth |
1.2.1.3. Cluster maximums Link kopierenLink in die Zwischenablage kopiert!
The following maximums apply to objects defined in OpenShift Virtualization.
| Objective (per cluster) | Tested limit | Theoretical limit |
|---|---|---|
| Number of attached PVs per node | N/A | CSI storage provider dependent |
| Maximum PV size | N/A | CSI storage provider dependent |
| Hosts | 500 hosts (100 or fewer recommended) [1] | Same as OpenShift Container Platform |
| Defined VMs | 10,000 VMs [2] | Same as OpenShift Container Platform |
If you use more than 100 nodes, consider using Red Hat Advanced Cluster Management (RHACM) to manage multiple clusters instead of scaling out a single control plane. Larger clusters add complexity, require longer updates, and depending on node size and total object density, they can increase control plane stress.
Using multiple clusters can be beneficial in areas like per-cluster isolation and high availability.
The maximum number of VMs per node depends on the host hardware and resource capacity. It is also limited by the following parameters:
-
Settings that limit the number of pods that can be scheduled to a node. For example: .
maxPods -
The default number of KVM devices. For example: .
devices.kubevirt.io/kvm: 1k
-
Settings that limit the number of pods that can be scheduled to a node. For example:
1.3. Security policies Link kopierenLink in die Zwischenablage kopiert!
Learn about OpenShift Virtualization security and authorization.
Key points
-
OpenShift Virtualization adheres to the Kubernetes pod security standards profile, which aims to enforce the current best practices for pod security.
restricted - Virtual machine (VM) workloads run as unprivileged pods.
-
Security context constraints (SCCs) are defined for the service account.
kubevirt-controller - TLS certificates for OpenShift Virtualization components are renewed and rotated automatically.
1.3.1. About workload security Link kopierenLink in die Zwischenablage kopiert!
By default, virtual machine (VM) workloads do not run with root privileges in OpenShift Virtualization, and there are no supported OpenShift Virtualization features that require root privileges.
For each VM, a
virt-launcher
libvirt
libvirt
1.3.2. TLS certificates Link kopierenLink in die Zwischenablage kopiert!
TLS certificates for OpenShift Virtualization components are renewed and rotated automatically. You are not required to refresh them manually.
Automatic renewal schedules
TLS certificates are automatically deleted and replaced according to the following schedule:
- KubeVirt certificates are renewed daily.
- Containerized Data Importer controller (CDI) certificates are renewed every 15 days.
- MAC pool certificates are renewed every year.
Automatic TLS certificate rotation does not disrupt any operations. For example, the following operations continue to function without any disruption:
- Migrations
- Image uploads
- VNC and console connections
1.3.3. Authorization Link kopierenLink in die Zwischenablage kopiert!
OpenShift Virtualization uses role-based access control (RBAC) to define permissions for human users and service accounts. The permissions defined for service accounts control the actions that OpenShift Virtualization components can perform.
You can also use RBAC roles to manage user access to virtualization features. For example, an administrator can create an RBAC role that provides the permissions required to launch a virtual machine. The administrator can then restrict access by binding the role to specific users.
1.3.3.1. Default cluster roles for OpenShift Virtualization Link kopierenLink in die Zwischenablage kopiert!
By using cluster role aggregation, OpenShift Virtualization extends the default OpenShift Container Platform cluster roles to include permissions for accessing virtualization objects.
| Default cluster role | OpenShift Virtualization cluster role | OpenShift Virtualization cluster role description |
|---|---|---|
|
|
| A user that can view all OpenShift Virtualization resources in the cluster but cannot create, delete, modify, or access them. For example, the user can see that a virtual machine (VM) is running but cannot shut it down or gain access to its console. |
|
|
| A user that can modify all OpenShift Virtualization resources in the cluster. For example, the user can create VMs, access VM consoles, and delete VMs. |
|
|
| A user that has full permissions to all OpenShift Virtualization resources, including the ability to delete collections of resources. The user can also view and modify the OpenShift Virtualization runtime configuration, which is located in the
|
1.3.3.2. RBAC roles for storage features in OpenShift Virtualization Link kopierenLink in die Zwischenablage kopiert!
The following permissions are granted to the Containerized Data Importer (CDI), including the
cdi-operator
cdi-controller
1.3.3.2.1. Cluster-wide RBAC roles Link kopierenLink in die Zwischenablage kopiert!
| CDI cluster role | Resources | Verbs |
|---|---|---|
|
|
|
|
|
|
| |
|
|
|
|
|
|
| |
|
|
|
|
|
|
| |
|
|
|
|
| API group | Resources | Verbs |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Allow list:
|
|
|
|
Allow list:
|
|
|
|
|
|
| API group | Resources | Verbs |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.3.2.2. Namespaced RBAC roles Link kopierenLink in die Zwischenablage kopiert!
| API group | Resources | Verbs |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| API group | Resources | Verbs |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.3.3. Additional SCCs and permissions for the kubevirt-controller service account Link kopierenLink in die Zwischenablage kopiert!
Security context constraints (SCCs) control permissions for pods. These permissions include actions that a pod, a collection of containers, can perform and what resources it can access. You can use SCCs to define a set of conditions that a pod must run with to be accepted into the system.
The
virt-controller
virt-launcher
By default,
virt-launcher
default
VirtualMachineInstance
virt-launcher
The
kubevirt-controller
virt-launcher
The
kubevirt-controller
-
scc.AllowHostDirVolumePlugin = true
This allows virtual machines to use the hostpath volume plugin. -
scc.AllowPrivilegedContainer = false
This ensures thepod is not run as a privileged container.virt-launcher scc.AllowedCapabilities = []corev1.Capability{"SYS_NICE", "NET_BIND_SERVICE"}-
allows setting the CPU affinity.
SYS_NICE -
allows DHCP and Slirp operations.
NET_BIND_SERVICE
-
Viewing the SCC and RBAC definitions for the kubevirt-controller
You can view the
SecurityContextConstraints
kubevirt-controller
oc
$ oc get scc kubevirt-controller -o yaml
You can view the RBAC definition for the
kubevirt-controller
oc
$ oc get clusterrole kubevirt-controller -o yaml
1.4. OpenShift Virtualization Architecture Link kopierenLink in die Zwischenablage kopiert!
The Operator Lifecycle Manager (OLM) deploys operator pods for each component of OpenShift Virtualization:
-
Compute:
virt-operator -
Storage:
cdi-operator -
Network:
cluster-network-addons-operator -
Scaling:
ssp-operator -
Templating:
tekton-tasks-operator
OLM also deploys the
hyperconverged-cluster-operator
hco-webhook
hyperconverged-cluster-cli-download
After all operator pods are successfully deployed, you should create the
HyperConverged
HyperConverged
The
HyperConverged
KubeVirt
virt-controller
virt-handler
virt-api
The OLM deploys the Hostpath Provisioner (HPP) Operator, but it is not functional until you create a
hostpath-provisioner
1.4.1. About the HyperConverged Operator (HCO) Link kopierenLink in die Zwischenablage kopiert!
The HCO,
hco-operator
| Component | Description |
|---|---|
|
| Validates the
|
|
| Provides the
|
|
| Contains all operators, CRs, and objects needed by OpenShift Virtualization. |
|
| A Scheduling, Scale, and Performance (SSP) CR. This is automatically created by the HCO. |
|
| A Containerized Data Importer (CDI) CR. This is automatically created by the HCO. |
|
| A CR that instructs and is managed by the
|
1.4.2. About the Containerized Data Importer (CDI) Operator Link kopierenLink in die Zwischenablage kopiert!
The CDI Operator,
cdi-operator
| Component | Description |
|---|---|
|
| Manages the authorization to upload VM disks into PVCs by issuing secure upload tokens. |
|
| Directs external disk upload traffic to the appropriate upload server pod so that it can be written to the correct PVC. Requires a valid upload token. |
|
| Helper pod that imports a virtual machine image into a PVC when creating a data volume. |
1.4.3. About the Cluster Network Addons Operator Link kopierenLink in die Zwischenablage kopiert!
The Cluster Network Addons Operator,
cluster-network-addons-operator
| Component | Description |
|---|---|
|
| Manages TLS certificates of Kubemacpool’s webhooks. |
|
| Provides a MAC address pooling service for virtual machine (VM) network interface cards (NICs). |
|
| Marks network bridges available on nodes as node resources. |
|
| Installs Container Network Interface (CNI) plugins on cluster nodes, enabling the attachment of VMs to Linux bridges through network attachment definitions. |
1.4.4. About the Hostpath Provisioner (HPP) Operator Link kopierenLink in die Zwischenablage kopiert!
The HPP Operator,
hostpath-provisioner-operator
| Component | Description |
|---|---|
|
| Provides a worker for each node where the HPP is designated to run. The pods mount the specified backing storage on the node. |
|
| Implements the Container Storage Interface (CSI) driver interface of the HPP. |
|
| Implements the legacy driver interface of the HPP. |
1.4.5. About the Scheduling, Scale, and Performance (SSP) Operator Link kopierenLink in die Zwischenablage kopiert!
The SSP Operator,
ssp-operator
| Component | Description |
|---|---|
|
| Creates a VM from a template. |
|
| Copies a VM template. |
|
| Creates or removes a VM template. |
|
| Creates or removes data volumes or data sources. |
|
| Runs a script or a command on a VM, then stops or deletes the VM afterward. |
|
| Runs a
|
|
| Runs a
|
|
| Waits for a specific virtual machine instance (VMI) status, then fails or succeeds according to that status. |
|
| Creates a VM from a manifest. |
1.4.6. About the OpenShift Virtualization Operator Link kopierenLink in die Zwischenablage kopiert!
The OpenShift Virtualization Operator,
virt-operator
| Component | Description |
|---|---|
|
| HTTP API server that serves as the entry point for all virtualization-related flows. |
|
| Observes the creation of a new VM instance object and creates a corresponding pod. When the pod is scheduled on a node,
|
|
| Monitors any changes to a VM and instructs
|
|
| Contains the VM that was created by the user as implemented by
|