Shell script to setup an LXD (Linux Containers) VM lab for testing purpose

Posted on in Categories Automation & Management, Networking, Virtualization last updated April 30, 2017

A sample shell script to build an LXD (Linux Containers) VM lab on Ubuntu Linux 16.04 LTS server.

How do I use this script?

First install and setup LXD server as described here on Ubuntu Linux 16.04 LTS or above:
$ sudo apt-get install lxd
## config your storage like zfs and bridge setup
$ sudo lxd init

Edit and customize script variable. Once done, run it as follows:
$ ./lxd-vm-lab
Sample outputs:

Fig.01: script output
Fig.01: script output

Leave a Comment