Your submission was sent successfully! Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

ESXi Alternative: try open source LXD 

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. 

Try LXD – an open source 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. 

LXD vs ESXi – feature comparison

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.

LXDESXi
Software typeOpen SourceProprietary 
BasisKVMVMkernel
Web UIYesYes
ClusteringYesYes
High availabilityYesYes
VM live migration YesYes
Shared storageCephvSAN
NetworkingBridge, OVNNSX
SnapshotsYesYes
BackupYesYes
Free trialN/A (unlimited free usage)30 days
PricingFree, with enterprise support available on a per physical host basisFull functionality requires a paid licence, differing based on the number of cores

Next, let’s take a closer look at LXD’s capabilities: 

  • Image-based workflow for launching VMs and containers. Built-in image server, with support for custom ISO images as well. 
  • Web UI for easier deployment and management of your workloads 
Screenshot of the LXD UI
  • Projects for multi-tenancy and workload organization
  • Profiles for defining instance options, device and device options, cloud-init instructions and further instance customizations. Profiles can then easily be applied to any number of instances
  • Various hardware passthrough options, including PCI, GPU, USB, block devices, NICs, disks
  • Live VM migration, users can migrate running VMs between hosts with little or no downtime
  • Backups, snapshots and image transfer support
  • High-availability through clustering with Ceph and OVN for distributed storage and networking. All these are combined in our MicroCloud solution
  • Various storage backend options, including directory, Btrfs, LVM, ZFS, Ceph and Dell PowerFlex
  • Various networking options, including bridge and OVN for fully controlled networks, and physical, SR-IOV and Macvlan support for external network types
  • Third-party integrations with tools like Terraform and Ansible are already available, and custom integrations are possible through LXD’s REST API

Get started with LXD

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

Can I import my existing VMs into LXD?

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.  

Running LXD on Windows?

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.

Consider trying system containers

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

Summary

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.

Further Resources

Learn more about Canonical’s open source infrastructure solutions.

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.

Ubuntu cloud

Ubuntu offers all the training, software infrastructure, tools, services and support you need for your public and private clouds.

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

Join Canonical in Paris at Dell Technologies Forum

Canonical is thrilled to be joining forces with Dell Technologies at the upcoming Dell Technologies Forum – Paris, taking place on 19 November. This premier...

Join Canonical in Dallas at Dell Technologies Forum

Canonical is excited to be a sponsor of the Dell Technologies Forum in Dallas, taking place on November 14th. This is a great opportunity to learn about the...

Join Canonical in Brazil at Dell Technologies Forum São Paulo

Canonical is excited to be a part of the Dell Technologies Forum in São Paulo on October 30th. This exclusive event brings together industry leaders to...