Replace Virtual Machines with LXC/LXD Containers

So many folks today use Virtual Machines for Self-Hosting or they use Docker containers. Often overlooked, LXC/LXD containers provide a highly efficient way to virtualize an operating system without virtualizing the hardware as is the case with a Virtual Machine. In this presentation, we look into how to create and use LXD containers. The focus this tutorial is learning how to use the linux command line to create containers and also how to bridge those containers to a LAN network. In the video, we review a simple .yaml file for implementing a network bridge on your host computer in order for LXD containers to be exposed to your LAN. Change the "ens3" device, the "addresses" field, and the "gateway4" field for your host. cd /etc/netplan sudo nano xxxxx.yaml This is the network config for a bridged network network: version: 2 renderer: networkd ethernets: ens3: dhcp4: false dhcp6: false bridges: br0: interfaces: [ens3] addresses: [172.16.15.15/16] gateway4: 172.16.0.1 mtu: 1500 nameservers: addresses: [1.1.1.1] parameters: stp: true forward-delay: 4 dhcp4: no dhcp6: no To apply the above configuration after saving the file: sudo netplan generate sudo netplan apply