-
Book Overview & Buying
-
Table Of Contents
Ubuntu Server Cookbook
By :
We have installed LXD and deployed our first container with it. In this recipe, we will learn various LXD commands that manage the container lifecycle.
Make sure that you have followed the previous recipes and created your first container.
Follow these steps to manage LXD containers:
Before we start with container management, we will need a running container. If you have been following the previous recipes, you should already have a brand new container running on your system. If your container is not already running, you can start it with the lxc start command:
$ lxc start c1
To check the current state of a container, use lxc list, as follows:
$ lxc list c1
This command should list only containers that have c1 in their name.
You can also set the container to start automatically. Set the boot.autostart configuration option to true and your container will start automatically on system boot. Additionally, you can specify a delay before autostart...