To automatically start an LXD container at boot time on a Linux system, you need to configure the container to start automatically. Here are the steps to do this:
- Start the container:
lxc start <container_name>
- Set the container to start automatically:
lxc config set <container_name> boot.autostart true
- Restart the container to apply the change:
lxc restart <container_name>
- Verify that the container is set to start automatically:
lxc config show <container_name>
The output should include a line indicating that the container is set to start automatically:
boot.autostart: "true"
After these steps, the container should start automatically at boot time. Note that you may need to configure your system to start LXD at boot time if it is not already configured to do so.