To install LXD, the container hypervisor for Ubuntu 16.04 LTS, follow these steps:
sudo add-apt-repository ppa:ubuntu-lxc/lxd-stableSour:ecwww.lautturi.com
sudo apt update
lxd
package by running the following command:sudo apt install lxd
sudo lxd init
This will guide you through the process of setting up LXD on your system. Follow the prompts to choose your storage backend, network address, and other options.
lxc launch ubuntu:16.04 my-container
Replace my-container
with the desired name for your container. This will create a new container based on the Ubuntu 16.04 image and start it.
lxc exec my-container bash
Replace my-container
with the name of your container. This will open a terminal session within the container, allowing you to run commands and manage the container.
That's it! You now have LXD installed and configured on your Ubuntu 16.04 system, and you can use it to manage containers.