The VMware world has seen a lot of upheaval in recent months, and now there’s another change to add to the list: the ESXi hypervisor, one of VMware’s most notable products, is no longer free.
VMware ESXi is a type 1 hypervisor that allows users to create and manage virtual machines that can access hardware resources directly. It comes with various management tools, the most familiar being vSphere and vCenter Server, and supports many advanced features such as live migration, high availability, and various security options among others.
The free option for ESXi only covered a limited number of cores, with other limitations in terms of memory and management options. As such, rather than being used in production, it was mostly used by developers and hobbyists who are now left looking for an ESXi alternative.
While LXD is mostly known for providing system containers, since April 2020 and the 4.0 LTS, it also natively supports virtual machines. VM support was initially added to expand the variety of use cases LXD could cover, such as running workloads in a different operating system, or with a different kernel than that of the host, but over the years we have been enhancing the experience and making LXD a modern open source alternative to usual hypervisors.
While the main functionality doesn’t differ much from other VM virtualization tools, we want to provide a better experience out of the box with pre-installed images and optimised choices. The workflow is fully image-based, and in addition to the images provided through a built-in image server, users can also upload custom ISO images for their specific use cases. For easy management, in addition to an intuitive CLI, LXD now also provides a web user interface.
LXD VMs are based on KVM through QEMU, like other VMs you would get through libvirt and similar tools. However, LXD is opinionated about the setup and the experience, placing security at the forefront, which is why we use a modern Q35 layout with UEFI and SecureBoot by default. All devices are virtio-based (we don’t do any complex device emulation at the host level).
Recently, we have also added an option for running non-UEFI based workloads, allowing users to run less modern virtual machines without issues, provided that they specifically enable the security option allowing them to do so.
Why pick LXD as an ESXi alternative? Because LXD is fully open source, with its full functionality available without any restrictions. For enterprise use cases, you can opt-in to get support from Canonical via Ubuntu Pro, but you can also consume LXD entirely for free.
It is difficult to provide a comprehensive comparison with all ESXi features, as they vary between versions and specific combinations with other VMware tools. Nevertheless, the table below provides a summary of the most important ESXi features and how they are supported in LXD.
LXD | ESXi | |
Software type | Open Source | Proprietary |
Basis | KVM | VMkernel |
Web UI | Yes | Yes |
Clustering | Yes | Yes |
High availability | Yes | Yes |
VM live migration | Yes | Yes |
Shared storage | Ceph | vSAN |
Networking | Bridge, OVN | NSX |
Snapshots | Yes | Yes |
Backup | Yes | Yes |
Free trial | N/A (unlimited free usage) | 30 days |
Pricing | Free, with enterprise support available on a per physical host basis | Full functionality requires a paid licence, differing based on the number of cores |
Next, let’s take a closer look at LXD’s capabilities:
LXD is very easy to set up. Four simple steps are all it takes to get ready to run workloads:
1. On Ubuntu, just run
snap install lxd
2. Then run:
lxd init
This will prompt you to configure your LXD instance. Default options are sufficient in many cases, but make sure to select “yes” when asked whether LXD should be available over the network. This will allow you to access the Web UI.
3. Access the UI in your browser by entering your server address (for example, https://192.0.2.10:8443), and follow the authentication prompts.
4. Click on “create instance” to launch your first VM
While you might be looking for an ESXi alternative, we also understand that users will wish to keep their existing workloads currently running on ESXi (or elsewhere). To import your existing VMs, LXD provides a tool (lxd-migrate) to create a LXD instance based on an existing disk or image. Using this tool, with some extra configuration users are able to import their existing VMs. More details are available in this guide.
While LXD is primarily a Linux-based tool, it is also available for Windows users via WSL. WSL allows users to have the full Ubuntu experience on their Windows machines. Here is a practical example of how you can work with web services using WSL and LXD.
If you’re reading this blog, your primary interest is likely to be virtual machines. But system containers are a great alternative that could potentially cover many of your use cases.
System containers are in a way similar to a physical or a virtual machine. However, they utilize the kernel of the host to provide a full operating system and have the same behaviour and manageability as VMs, without the usual overhead, and with the density and efficiency of containers. For almost any use case, you could run the same workload in a system container and not get any of the overhead that you usually get when using virtual machines. The only exception would be if you needed a specific version of the kernel, different from the kernel of the host, for a specific feature of that virtual machine.
If you are curious about learning more, refer to this blog about Linux containers, or this one covering the differences between virtualization and containerization.
LXD has come a long way since its inception and nowadays covers much more than system containers. It is a modern, secure and robust ESXi alternative and also to traditional hypervisors. With its intuitive CLI and web interface, users can easily get started and deploy and manage their workloads easily and intuitively. ESXi users, as well as others looking for a competent, open source virtualization option, should take LXD for a spin.
Learn more about LXD on the LXD webpage or in the documentation.
Learn more about LXD UI.
Curious about using LXD for development, read about it in LXD for beginners.
Curious about some practical use cases, read how you can use LXD to build your ERP.
Microsoft Edge is now available for Ubuntu. In this guide, I’ll walk you through the…
Our latest Canonical website rebrand did not just bring the new Vanilla-based frontend, it also…
At Canonical, the work of our teams is strongly embedded in the open source principles…
Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…
Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…
The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…