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

KVM

178
227
+ 1
8
LXD

104
194
+ 1
68
Add tool

KVM vs LXD: What are the differences?

Introduction This Markdown code provides a comparison between KVM and LXD, highlighting their key differences.

  1. Hypervisor Type: KVM is a full virtualization hypervisor that emulates the entire hardware stack, including the processor, memory, and input/output devices, allowing the running of a wide range of operating systems. On the other hand, LXD is a lightweight container hypervisor that utilizes Linux containers to isolate processes and resources, providing lightweight virtualization without the need for emulating hardware.

  2. Resource Overhead: KVM involves higher resource overhead as it requires emulating the complete hardware environment, resulting in higher memory and processing requirements. In contrast, LXD has lower resource overhead as it uses lightweight containers, enabling more efficient utilization of resources and better overall performance.

  3. Isolation Level: KVM provides stronger isolation between virtual machines (VMs) as each VM has its own emulated hardware stack and runs an independent operating system. In contrast, LXD offers a lower level of isolation as it relies on Linux containers, where processes share the same host kernel, making them more lightweight but potentially less secure if the kernel is compromised.

  4. Application Scope: KVM is well-suited for running diverse workloads that require running multiple operating systems concurrently, including legacy systems and platforms. On the other hand, LXD is specifically designed for running Linux containers, making it ideal for applications that require lightweight virtualization and resource efficiency, such as microservices architectures and cloud-native applications.

  5. Manageability and Flexibility: KVM provides more flexibility in terms of customization and configuration options, allowing fine-grained control over virtual machine settings. Additionally, KVM can be managed using various management tools and orchestration platforms. Conversely, LXD focuses on simplicity and ease of use, providing a more straightforward way to manage containers and offering a standardized API for container management.

  6. Migration and Live Snapshots: KVM supports live migration, allowing VMs to be moved between physical hosts without downtime. It also supports live snapshots, enabling the creation of point-in-time backups of running VMs. In contrast, LXD does not natively support live migration, as it mainly focuses on container management rather than VM migration. However, LXD provides similar functionality through the use of container migration and checkpoint/restore mechanisms.

In Summary, KVM is a full virtualization hypervisor suited for running diverse workloads with higher resource overhead, while LXD is a lightweight container hypervisor ideal for Linux containers, providing lower resource overhead and simplicity in management.

Decisions about KVM and LXD
Florian Sager
IT DevOp at Agitos GmbH · | 3 upvotes · 421.1K views
Chose
LXDLXD
over
DockerDocker

lxd/lxc and Docker aren't congruent so this comparison needs a more detailed look; but in short I can say: the lxd-integrated administration of storage including zfs with its snapshot capabilities as well as the system container (multi-process) approach of lxc vs. the limited single-process container approach of Docker is the main reason I chose lxd over Docker.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of KVM
Pros of LXD
  • 4
    No license issues
  • 2
    Very fast
  • 2
    Flexible network options
  • 10
    More simple
  • 8
    Open Source
  • 8
    API
  • 8
    Best
  • 7
    Cluster
  • 5
    Multiprocess isolation (not single)
  • 5
    Fast
  • 5
    I like the goal of the LXD and found it to work great
  • 4
    Full OS isolation
  • 3
    Container
  • 3
    More stateful than docker
  • 2
    Systemctl compatibility

Sign up to add or upvote prosMake informed product decisions

What companies use KVM?
What companies use LXD?
See which teams inside your own company are using KVM or LXD.
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 LXD?

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

What are some alternatives to KVM and LXD?
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