The LXD Container Hypervisor
It’s always good news when you see quality products—software, operating systems and container technology too—becoming even better than before. That happened with LXC, after a long wait for it to be stable enough to use in production.
One reason for this is possibly because LXD works like a daemon for LXC. It allows you to establish a communication handshake between your LXC client and any machine you have with LXD hosting several containers.
Are you ready to benefit from these changes and optimally use system containers?
Lightweight and simple, just pop your command-line client and start creating, starting, stopping, cloning and snapshotting. Moving system containers between LXD hosts is easy and the system performs well.
Here are the main LXD advantages:
- Secure by design: There are unprivileged containers, resource restrictions and much more.
- Scalable: Pick from containers on your laptop to thousands of compute nodes.
- Intuitive: You get a simple, clear API and crisp command line experience.
- Image-based: No more distribution templates; only quality, trusted images
Below you’ll see a few practical examples of how to install LXD and benefit from it.
If you’re using Ubuntu 16.04 LTS, start with the following:
$> sudo lxd init
If that’s not enough, also try:
$> sudo apt-get install lxd
This will install the LXD daemon, client tools and also LXC.
Remember: LXD is not a replacement for LXC. It’s simply a daemon and a new set of client libraries and tools. It allows you to manage remote servers hosting the containers.
$> lxc create odoo1
Option 2 in a remote host:
$> lxc create host1:odoo1
When you’ve created system containers, you will then list existing containers:
$> lxc list host1:
Get access to the container’s console:
$> lxc exec host1:odoo1 bash
You’ll also see many other commands by using —help
$> lxc --help
List of Commands:
config: Manage configuration copy: Copy containers within or in between LXD instances. delete: Delete containers or container snapshots. exec: Execute the specified command in a container. file: Manage files on a container. help: Presents details on how to use LXD. image: Manipulate container images. info: List information on LXD servers and system containers. launch: Launch a container from a particular image. list: Lists the available resources. move: Move containers within or in between LXD instances. profile: Manage configuration profiles. publish: Publish containers as images. remote: Manage remote LXD servers. restart: Changes state of one or more system containers to restart. restore: Set the current state of a resource back to a snapshot. snapshot: Create a read-only snapshot of a container. start: Changes state of one or more containers to start. stop: Changes state of one or more containers to stop. version: Prints the version number of this client tool.
For the remote host, you need to do the following to get access:
$> lxc config set core.https_address "[::]"
$> lxc config set core.trust_password some-password
You can see when using LXD LXC takes on a whole new meaning in your life. You simply need to use container technology correctly to enjoy the benefits.
We hope this post gets you pumped enough for trying LXD. We love the concept and will be trying this “stable version” on test servers first.
If you have questions, don’t hesitate to contact us.Ask a Question