Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Deploy Kubevirt DPDK Dataplane Support for VMs

SUMMARY Cloud-Native Contrail® Networking supports the deployment of the vRouter DPDK dataplane (Kubevirt) for high-performance VM and container networking in Kubernetes.

Kubevirt Overview

Kubevirt is an open-source Kubernetes project that enables the management (scheduling) of virtual machine (VM) workloads alongside container workloads within a Kubernetes cluster. Kubevirt provides a unified development platform where developers build, modify, and deploy applications residing in both application containers and VMs within a common, shared environment.

Kubevirt provides the following additional functions to your Kubernetes cluster by adding:

  • Other types of pods, or Custom Resource Definitions (CRDs), to the Kubernetes API server.

  • Controllers for cluster-wide logic to support the new types of pods.

  • Daemons for node-specific logic to support the new types of pods.

As a result of this new functionality, Kubevirt creates and manages VirtualMachineInstance (VMI) objects. VMIs contain a workload controller called a VirtualMachine (VM). The VM maintains the persistent state of its VMI. This process enables users to terminate and initiate VMs at another time with no change in data or state. Additionally, you can deploy Kubevirt on top of a Kubernetes cluster, which lets you manage traditional container workloads along with VMIs managed by Kubevirt. VMs have access to Kubernetes cluster features with no additional permissions required.

Kubevirt DPDK Implementation

Kubevirt does not typically support user space networking for fast packet processing. In Cloud-Native Contrail Networking however, enhancements enable Kubevirt to support vhostuser interface types for VMs. These interfaces perform user space networking with the Data Plane Development Kit (DPDK) vRouter and give pods access to the increased performance and packet processing the DPDK vRouter provides.

Following are some of the benefits of the DPDK vRouter application:

  • Packet processing occurs in user space and bypasses kernel space. This bypass increases packet-processing efficiency.

  • Kernel interrupts and context switches do not occur because packets bypass kernel space. This bypass results in less CPU overhead and increased data throughput.

  • DPDK enhances the forwarding plane of the vRouter in user space, increasing performance.

  • DPDK Lcores run in poll mode. This mode enables the Lcores to receive and process packets immediately upon receiving them.

Deploy Kubevirt

Prerequisites

You must have an active Kubernetes cluster and the ability to use the kubectl client in order to deploy Kubevirt.

Pull Kubevirt Images and Deploy Kubevirt Using a Local Registry

See the following topic for information about how to deploy Kubevirt: Pull Kubevirt Images and Deploy Kubevirt Using a Local Registry.

Note:

These instructions are for the following Kubevirt releases:

  • v0.58.0 (current)

  • v0.48.0

Launch a VM Alongside a Container

With Kubevirt, launching and managing a VM in Kubernetes is similar to deploying a pod. You can create a VM object using kubectl. After creating a VM object, that VM is active and running in your cluster.

Use the following high-level steps to launch a VM alongside a container:

  1. Create a VirtualNetwork.

  2. Launch a VM.

Launch a VM

The following VirtualMachine specs are examples of VirtualMachine instances with a varying number of interfaces.

  • Single vhostuser interface VM:
  • Multi vhostuser interface:
  • Bridge/vhostuser interface VM:

Create a Virtual Network

The following net-attach-def object is an example of a virtual network:

Launch a VM

The following VirtualMachine specs are examples of VirtualMachine instances with a varying number of interfaces:

  • Single vhostuser interface VM:
  • Multi vhostuser interface:
  • Bridge/vhostuser interface VM: