Streamline VM overlays and rootfs packages
Move the default guest package list into a repo manifest and record a hash beside built rootfs images so run/make-rootfs can warn when the docker-ready image is stale. Switch the Firecracker launch path to a single sparse root overlay per VM instead of separate /home and /var disks, so many VMs can share the same base image while still installing packages under /var and working from /root. Keep older images bootable by masking stale home.mount and var.mount units at boot, and scrub those obsolete fstab entries when customize.sh rebuilds an image. Verified with bash -n on the updated scripts; no live VM boot was run in this environment.
This commit is contained in:
parent
9191b7e370
commit
3cf33d1e0a
8 changed files with 206 additions and 204 deletions
5
make-rootfs.sh
Normal file → Executable file
5
make-rootfs.sh
Normal file → Executable file
|
|
@ -18,6 +18,7 @@ EOF
|
|||
}
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$DIR/packages.sh"
|
||||
OUT_ROOTFS="$DIR/rootfs-docker.ext4"
|
||||
SIZE_SPEC="6G"
|
||||
BASE_ROOTFS=""
|
||||
|
|
@ -45,6 +46,10 @@ while [[ $# -gt 0 ]]; do
|
|||
done
|
||||
|
||||
if [[ -f "$OUT_ROOTFS" ]]; then
|
||||
OUT_ROOTFS_WARNING="$(banger_rootfs_manifest_warning "$OUT_ROOTFS" || true)"
|
||||
if [[ -n "$OUT_ROOTFS_WARNING" ]]; then
|
||||
log "warning: $OUT_ROOTFS_WARNING"
|
||||
fi
|
||||
log "already exists: $OUT_ROOTFS"
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue