To set up and use LXD on a CentOS 7.x server, follow these steps:
lxd package:sudo yum install lxd
sudo lxd init
This will prompt you to answer a series of questions about the configuration of LXD. You can accept the default values or customize the configuration as needed.
lxc launch command. For example, to create a new container based on the CentOS 7 image:lxc launch images:centos/7 mycontainer
This will create a new container with the name mycontainer based on the CentOS 7 image.
lxc exec command. For example:lxc exec mycontainer bash
This will open a shell prompt inside the mycontainer container.
lxc stop command:lxc stop mycontainer
This will stop the mycontainer container.
For more information about using LXD on CentOS, see the LXD documentation.