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

in Categories Automation & Management, Networking, Virtualization last updated November 14, 2019

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

How do I use this script?

First install and setup LXD server as described here on Ubuntu 16.04 or setup LXD on Ubuntu 18.04 LTS server or above (see How to Setup LXD on Fedora Linux 28) :
$ 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

That is all. It will take some time to download all LXD images from the remote server.


Share this on:

Start the discussion at Linux/Unix forum

Historical Comment Archive

1 comment

    Have a question? Post it on our forum!