OpenShift Virtualization (CNV/KubeVirt)¶
OpenShift Virtualization is a fully developed virtualization solution utilizing the type-1 KVM hypervisor from Red Hat Enterprise Linux with the powerful features and capabilities of OpenShift for managing hypervisor nodes, virtual machines, and their consumers.
Usefull resources:¶
Example deployments¶
Tiny RHEL 9 VM with pod bridge network
Red Hat CoreOS with ignition & pod bridge network
Boot from ISO
Example Fedora with httpd cloud-init and network
Useful Commands¶
Configure a new number of CPUs for a VM¶
Add the OCP Descheduler Annotation to True or False¶
Create multiple VMs loop¶
Containerized Data Importer (CDI) / DataVolume¶
Source: cdi-examples
OpenShift Virtualization & Container Storage¶
Recommended storage settings:
Build container image with OS disk¶
Local IIS build in my lab¶
Resource Capacity Calculation¶
At a high level, the process is to determine the amount of virtualization resources needed (VM sizes, overhead, burst capacity, failover capacity), add that to the amount of resources needed for cluster services (logging, metrics, ODF/ACM/ACS if hosted in the same cluster, etc.) and customer workload (hosted control planes, other Pods deployed to the hardware, etc.), then find a balance of node size vs node count.
CPU capacity calculation¶
physical_cpu_cores= the number of physical cores available on the node.odf_requirements= the amount of resources reserved for ODF. A value of 32 cores was used for the example architectures.control_plane_requirements= the amount of CPU reserved for the control plane workload. A value of 4 cores was used for the example architectures.node_count= the number of nodes with this geometry. For small, all nodes were equal. For medium, the nodes are mixed-purpose, so the previous steps would need to be repeated for each node type, taking into account the appropriate node type.overcommitment_ratio= the amount of CPU overcommitment. A ratio of 4:1 was used for this document.spare_capacity= the amount of capacity reserved for spare/burst. A value of 10% was used for this document.ha_reserve_percent= the amount of capacity reserved for recovering workload lost in the event of node failure. For the small example, a value of 25% was used, allowing for one node to fail. For the medium example, a value of 20% was used, allowing for two nodes to fail.
Memory capacity calculation¶
total_node_memory= the total physical memory installed on the node.odf_requirements= the amount of memory assigned to ODF. A value of 72GiB was used for the example architectures in this document.control_plane_requirements= the amount of memory reserved for the control plane functions. A value of 24GiB was used for the example architectures.soft_eviction_threshold_percent= the value at which soft eviction is triggered to rebalance resource utilization on the node. Unless all nodes in the cluster exceed this value, it’s expected that the node will be below this utilization. A value of 90% was used for this document.node_count= the number of nodes with this geometry. For small, all nodes were equal. For medium, the nodes are mixed-purpose, so the previous steps would need to be repeated for each node type, taking into account the appropriate node type.ha_reserve_percent= the amount of capacity reserved for recovering workload lost in the event of node failure. For the small example, a value of 25% was used, allowing for one node to fail. For the medium example, a value of 20% was used, allowing for two nodes to fail.
ODF capacity calculation¶
disk_size= the size of the disk(s) used. 4TB and 8TB disks were used in the example architectures.disk_count= the number of disks of disk_size in the node.node_count= the number of nodes with this geometry. For small, all nodes were equal. For medium, the nodes are mixed-purpose, so the previous steps would need to be repeated for each node type taking into account the appropriate node type.replica_count= the number of copies ODF stores of the data for protection/resiliency. A value of 3 was used for this document.utilization_percent= the desired threshold of capacity used in the ODF instance. A value of 65% was used for this document.
Resources and useful articles¶
- Deploying Vms On Kubernetes Glusterfs Kubevirt
- Kubevirt Network Deep Dive
- Upstream containerized-data-importer
- Deploy openSUSE Leap15 VM in Kubernetes using KubeVirt
- Kubernetes and Virtualization: kubevirt will let you spawn virtual machine on your cluster!
- Very old, please double check: Know Issue: No IP address in VM after pod deletion #1646
- https://developers.redhat.com/blog/2018/10/22/introduction-to-linux-interfaces-for-virtual-networking/
- https://www.praqma.com/stories/debugging-kubernetes-networking/