Skip to content

Commit

Permalink
Update lxd template
Browse files Browse the repository at this point in the history
  • Loading branch information
Jip-Hop committed Jun 21, 2024
1 parent 1184233 commit f94ff51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions templates/lxd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ Could this be the same issue as [Instance creation failed](#instance-creation-fa

Refer to the [Incus README](../incus/README.md) as a lot of it applies to LXD too.

## Ideas

Instead of installing `snapd` and `lxd` from the `initial_setup` script, it's possible to install [the `lxd-installer` package](https://packages.ubuntu.com/noble/lxd-installer) instead, which is a wrapper to install the lxd snap on demand. This can be done on a rootfs which is not booted (e.g. in a chroot, dockerfile, or with `systemd-nspawn` without the `--boot` flag). Another option is to use [a cloud variant image from linuxcontainers.org](https://images.linuxcontainers.org) or [other sources](https://cloud-images.ubuntu.com/noble/current/) as I think they already include lxd. These images als come with `cloud-init`, which is a standardized way to customize a container (or VM) during the first boot. Benefit of using that would be a standardized way to customize the image rootfs. Downside could be more bloated images as it depends on Python and more.

## References

- [Running QEMU/KVM Virtual Machines in Unprivileged LXD Containers](https://dshcherb.github.io/2017/12/04/qemu-kvm-virtual-machines-in-unprivileged-lxd.html)
2 changes: 1 addition & 1 deletion templates/lxd/config
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pre_start_hook=#!/usr/bin/bash

# Only used while creating the jail
distro=ubuntu
release=jammy
release=noble

initial_setup=#!/usr/bin/bash
set -euo pipefail
Expand Down

0 comments on commit f94ff51

Please sign in to comment.