-
Book Overview & Buying
-
Table Of Contents
Ubuntu Server Cookbook
By :
In this recipe, we will create our first container with LXD.
You will need access to the root account or an account with sudo privileges.
LXD works on the concept of remote servers and images served by those remote servers. Starting a new container with LXD is as simple as downloading a container image and starting a container out of it, all with a single command. Follow these steps:
To start your first container, use the lxc launch command, as follows:
$ lxc launch ubuntu:14.04/amd64 c1
LXC will download the required image (14.04/amd64) and start the container.
You should see the progress like this:

As you can see in the screenshot, lxc launch downloads the required image, creates a new container, and then starts it as well. You can see your new container in a list of containers with the lxc list command, as follows:
$ lxc list

Optionally, you can get more details about the containers with the lxc info command:
$ lxc info c1...