Launching LXD Containers

15 minutes
  • 4 Learning Objectives

About this Hands-on Lab

LXD, or the Linux Container Daemon, lets us leverage the resource-light LXC virtualization method, as well as providing additional support for the container images we use to spin up our containers. In this lab, we’ll pull down and cache two separate images, then create a series of containers based on these images.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Copy the Alpine Linux Image

Copy the image to the LXD server, ensuring to provide an alias:

lxc image copy images:alpine/edge local: --alias alpine
Copy the Ubuntu Image

Copy the image to the LXD server, ensuring to provide an alias:

lxc image copy ubuntu: local: --alias ubuntu
Launch the Alpine Linux Container

Launch a new container, called alpine-test:

lxc launch alpine alpine-test
Launch the Ubuntu Container

Launch the ubuntu-test container:

lxc launch ubuntu ubuntu-test

Additional Resources

As part of the lift-and-shift of a legacy application from virtual machines to Linux containers, you want to potentially explore switching container-level operating systems. Currently, the applications are hosted on Ubuntu images, but you wish to make a case for Alpine Linux.

To prepare for this, copy the Alpine Linux and Ubuntu images to the LXD server, giving them the alpine and ubuntu aliases. When finished, launch two containers: one called alpine-test and one called ubuntu-test, each using their respective images.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?