Need advice about which tool to choose?Ask the StackShare community!

KVM

176
225
+ 1
8
LXC

118
225
+ 1
19
Add tool

KVM vs LXC: What are the differences?

KVM (Kernel-based Virtual Machine) and LXC (Linux Containers) are two popular virtualization technologies used to create and manage isolated environments on a single physical host. Here are the key differences between KVM and LXC:

  1. Virtualization Type: KVM is a hardware-level virtualization technology that uses a hypervisor to create and manage virtual machines (VMs) with their own operating systems and kernels. On the other hand, LXC is an OS-level virtualization method that utilizes Linux's containerization features to run multiple isolated user spaces on a shared kernel.

  2. Isolation Level: KVM provides strong isolation between VMs as each VM runs with its own virtualized hardware components and operates as an independent system. LXC offers a lower level of isolation since containers share the host's kernel, potentially leading to less isolation between applications.

  3. Resource Utilization: KVM consumes more resources as it emulates complete hardware components and requires separate kernels for each VM, resulting in higher resource overhead. LXC is more resource-efficient as containers share the host's kernel and utilize fewer resources, leading to faster startup times and efficient memory utilization.

  4. Performance: KVM offers good performance and is suitable for running various operating systems and workloads. LXC provides superior performance for Linux-based applications since it avoids the overhead of emulating hardware components and running multiple kernels.

  5. Portability: KVM provides higher portability due to its ability to run different operating systems and applications in isolated VMs. LXC containers are more suited for applications designed to run within Linux environments, limiting their portability to other operating systems.

  6. Use Cases: KVM is suitable for scenarios requiring complete isolation, compatibility with various operating systems, and the need to run legacy applications. LXC is ideal for lightweight containerization of Linux applications, microservices, and cloud-native environments, emphasizing efficiency and rapid deployment.

  7. Ecosystem and Tooling: KVM is supported by various management tools and platforms, including libvirt and tools integrated into popular virtualization platforms. LXC benefits from a rich ecosystem of container management tools like Docker, Kubernetes, and container orchestration frameworks.

  8. Security: KVM offers better security through complete isolation between virtual machines. LXC's security relies on the shared kernel, potentially raising security concerns when hosting untrusted applications.

  9. Overhead: KVM introduces higher overhead due to the need to emulate hardware components and run separate kernels for each VM. LXC has lower overhead since it shares the host's kernel and requires fewer resources for containerization.

In summary, KVM provides strong isolation and compatibility, making it suitable for diverse workloads, while LXC excels in efficiency and speed for Linux-based applications.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of KVM
Pros of LXC
  • 4
    No license issues
  • 2
    Very fast
  • 2
    Flexible network options
  • 5
    Easy to use
  • 4
    Lightweight
  • 3
    Simple and powerful
  • 3
    Good security
  • 2
    LGPL
  • 1
    Reliable
  • 1
    Trusted

Sign up to add or upvote prosMake informed product decisions

- No public GitHub repository available -

What is KVM?

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).

What is LXC?

LXC is a userspace interface for the Linux kernel containment features. Through a powerful API and simple tools, it lets Linux users easily create and manage system or application containers.

Need advice about which tool to choose?Ask the StackShare community!

What companies use KVM?
What companies use LXC?
See which teams inside your own company are using KVM or LXC.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with KVM?
What tools integrate with LXC?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to KVM and LXC?
VirtualBox
VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2.
Qemu
When used as a machine emulator, it can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance. When used as a virtualizer, it achieves near native performance by executing the guest code directly on the host CPU. it supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, it can virtualize x86, server and embedded PowerPC, 64-bit POWER, S390, 32-bit and 64-bit ARM, and MIPS guests.
OpenVZ
Virtuozzo leverages OpenVZ as its core of a virtualization solution offered by Virtuozzo company. Virtuozzo is optimized for hosters and offers hypervisor (VMs in addition to containers), distributed cloud storage, dedicated support, management tools, and easy installation.
Xen
It is a hypervisor using a microkernel design, providing services that allow multiple computer operating systems to execute on the same computer hardware concurrently. It was developed by the Linux Foundation and is supported by Intel.
Docker
The Docker Platform is the industry-leading container platform for continuous, high-velocity innovation, enabling organizations to seamlessly build and share any application — from legacy to what comes next — and securely run them anywhere
See all alternatives