The Cloud Experience Everywhere
1754638 Members
2963 Online
108823 Solutions
New Article
ServicesExperts

Bridge the gap between VMs and containers with KubeVirt and HPE Services

KubeVirt is an open-source project that seamlessly integrates virtualization technology with Kubernetes. HPE Services can help you get the most from this platform for running virtual machines alongside containers.

By Senthil Kumar Ramanathan, Solution Architect, Cloud Native Computing Practice Area, HPE Advisory and Professional Services

HPE-Services-IT-consulting-services-KubeVirt.pngIn the ever-evolving landscape of containerization and orchestration, Kubernetes has emerged as the de facto standard for managing and scaling containerized applications. Its flexible architecture and rich ecosystem have revolutionized the way we deploy and manage microservices. However, there are instances where traditional virtual machines (VMs) are still the preferred choice, especially for workloads that require strong isolation or run legacy applications. Under such requirements, we need to manage both virtualized and containerized environments as two different platforms with two different control planes, which creates more operation complexity and effort. 

In order to solve the complexity, KubeVirt comes into play – an open-source project that seamlessly integrates virtualization technology with Kubernetes. In this blog post, we will explore KubeVirt and how it bridges the gap between VMs and containers, empowering organizations to leverage the full potential of Kubernetes.

Overview of KubeVirt

KubeVirt enables virtualization on Kubernetes. It allows users to run virtual machines (VMs) as Kubernetes pods, making it easier to manage and orchestrate VMs alongside containers. It introduces custom resources and controllers that enable the deployment, management, and scaling of VMs using the same declarative approach as containers in Kubernetes. By leveraging the underlying virtualization technology, KubeVirt enables organizations to run legacy applications, adopt specialized guest operating systems, and achieve stronger isolation for critical workloads – all within the Kubernetes ecosystem.

HPE-Services-IT-consulting-services-KubeVirt-Figure-1.png

 

How KubeVirt works

KubeVirt consists of a set of Kubernetes Custom Resource Definitions (CRDs) that define VMs and their associated resources. These CRDs allow users to create, update, and delete VMs using kubectl or other Kubernetes tools.

Under the hood, KubeVirt uses the KVM hypervisor to run VMs. The KVM hypervisor is a Linux kernel module that provides hardware virtualization support. KubeVirt uses libvirt to manage the KVM instances and provides a RESTful API for users to interact with the VMs.

KubeVirt also provides a web-based console called the Virtual Machine Manager (Virt-Manager) that allows users to interact with VMs using a graphical user interface.

Key features and benefits of KubeVirt

Unified management: With KubeVirt, VMs and containers can be managed using a unified set of Kubernetes tools and APIs, simplifying the operational complexity of managing multiple deployment models.

Resource efficiency: KubeVirt optimizes resource utilization by allowing VMs and containers to coexist on the same cluster, enabling organizations to make efficient use of their infrastructure resources.

Workload flexibility: By integrating VMs into Kubernetes, KubeVirt enables organizations to run workloads that require specific operating systems, specialized hardware, or strict compliance requirements, which might not be feasible with containers alone.

Migration path for legacy applications: KubeVirt provides a seamless migration path for legacy applications that are not containerized yet. It allows organizations to modernize their infrastructure gradually without disrupting existing applications.

Isolation and security: KubeVirt leverages the isolation capabilities of VMs to ensure stronger security boundaries between workloads, making it an ideal choice for multi-tenant environments and highly regulated industries.

Getting Started with KubeVirt

To get started with KubeVirt, you will need a Kubernetes cluster with at least two nodes that support hardware virtualization. You will also need to install KubeVirt on your cluster. KubeVirt extends the Kubernetes API with custom resources like VirtualMachine and VirtualMachineInstance, which represent the VMs and their instances. You can define VMs using YAML or JSON manifests, similar to defining Kubernetes resources. KubeVirt provides tools and commands to manage VMs, such as creating, scaling, and monitoring their lifecycle.

The easiest way to install KubeVirt is to use the Operator Lifecycle Manager (OLM) in Kubernetes. OLM is a tool that manages the lifecycle of Kubernetes operators, which are applications that run on Kubernetes and manage other applications.

To install KubeVirt using OLM, you can follow these steps:

  • Install the OLM on your Kubernetes cluster.
  • Install the KubeVirt operator using OLM.
  • Create a KubeVirt virtual machine instance using kubectl.

Once you have created a VM instance, you can interact with it using kubectl or the Virt-Manager console.

Use Cases for KubeVirt

There are a number of use cases of KubeVirt. The first use case seen often among our customers is legacy application modernization. KubeVirt enables organizations to lift and shift legacy applications to Kubernetes without the need for containerization. This allows businesses to benefit from the scalability and management features of Kubernetes while preserving their existing investments. 

Another use case is optimization of operation complexity.  Many customers do have a variety of instance architectures such as bare metal, virtual machine, and containers. In order to reduce and optimize the complexity, use of KubeVirt is seen among our customers.

Another one is to run specialized workloads.  Certain workloads, such as those requiring specialized operating systems or hardware, can be efficiently run using KubeVirt. This flexibility makes it possible to adopt Kubernetes for a wider range of applications. 

Another use case of KubeVirt is DevOps testing environments. KubeVirt facilitates the creation of isolated testing environments within Kubernetes, allowing developers and QA teams to test complex scenarios involving both VMs and containers.

As the use of KubeVirt gets more popular, more use cases will emerge in our market.

VM migration to KubeVirt with MTV

The Migration Toolkit for Virtualization (MTV) is fully open-source and is based on the Forklift, a Konveyor Community project. ​It focuses on migrating virtual machines to OpenShift Virtualization and provides the ability to migrate multiple virtual machines with minimal downtime. 

HPE-Services-IT-consulting-services-KubeVirt-Figure-2.png

 To Migrate VM to KubeVirt you can follow these steps

Migration from a traditional virtual machine (VM) to KubeVirt using the Migration Toolkit for Virtualization (MTV) involves the following steps:

  • Deploy Migration Toolkit for Virtualization​
  • Add Migration Source Provider​
  • Configure network mapping for migration
  • Configure storage mapping for migration
  • Create migration Plan
  • Run migration plan

How HPE can assist customers in their virtualization journey under K8s

The HPE Cloud Native Virtualization Adoption Service accelerates customers’ journey to seamless integration of containers and virtual machines. Leveraging our expertise and existing service offerings, such as the KubeVirt Advisory Workshop, HPE Services empowers organizations to unleash the benefits of combined container and VM management, unlocking a world of possibilities.

The HPE Cloud Native Virtualization Adoption Service brings together the power of Kubernetes and virtualization technology, providing organizations with a unified platform for running VMs and containers. By seamlessly integrating VMs into the Kubernetes ecosystem, the cloud native virtualization service offers enhanced flexibility, resource efficiency, and workload isolation. It enables organizations to modernize their infrastructure, run legacy applications, and achieve stronger security boundaries while benefiting from the scalability and management capabilities of Kubernetes.

Moreover, the integration of the Migration Toolkit for Virtualization (MTV) as part of the Virtualization Adoption Service further simplifies and streamlines the migration process, allowing organizations to easily transition their traditional VM workloads into the KubeVirt environment.

The HPE Cloud Native Virtualization Adoption Service follows industry best practices for managing containers and VMs together, ensuring your Kubernetes environment operates at peak performance and scalability. By bridging the gap between VMs and containers, you can run legacy applications, and specialized workloads such as those requiring specialized operating systems or hardware can be efficiently run using KubeVirt and containerized applications side by side, all within a unified Kubernetes platform. To learn more, see our HPE Container Adoption Solution Brief.

Learn more about IT consulting services from HPE.

Learn more about HPE Advisory and Professional Services -- expert advice and implementation to take your digital transformation to the next level.

Senthil Kumar R.pngSenthil Kumar R. is a Solution Architect in the Cloud Native Computing Practice Area of HPE Advisory and Professional Services. Senthil Kumar joined HPE in 2022 with strong experience in private and public clouds and containerization platforms. He started his career in 2011 as a Linux Administrator at Onmobile where he acquired experience with Linux and VMware. Later he worked with companies including Intel, Wipro, and Govtech where he gained experience with cloud architectures, VMC, AWS, K8s, OpenShift, CICD pipelines, and monitoring and logging.


Services Experts
Hewlett Packard Enterprise

twitter.com/HPE_Services
linkedin.com/showcase/hpe-services/
hpe.com/services

About the Author

ServicesExperts

HPE Services Team experts share their insights on the topics and technologies that matter most for your business.