]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
release: Add support for creating ZFS-based VM images
authorMark Johnston <markj@FreeBSD.org>
Fri, 28 Oct 2022 20:53:36 +0000 (16:53 -0400)
committerMark Johnston <markj@FreeBSD.org>
Fri, 28 Oct 2022 21:00:24 +0000 (17:00 -0400)
commit89585511cc052643a774f64f6450d18e7dd51d4a
tree77b727037f0e19f07880d5bdfc8704dd910c6bcb
parent752ba1004aa94e76df826fa803050fa7dffbcc78
release: Add support for creating ZFS-based VM images

The change extends vmimage.subr to handle a new parameter, VMFS, which
should be equal to either "ufs" or "zfs".  When it is set to ZFS, we use
makefs to create a bootable pool populated using the same dataset layout
as bsdinstall and "poudriere image" use.  The pool can be grown using
the growfs rc.d script, just as in UFS images.

This will make it easy to provide VM and cloud images with ZFS as the
root filesystem.  So far I did not do extensive testing of cloud images;
I merely verified that creation of ZFS-based AWS AMIs works and allows
me to create amd64 and arm64 EC2 instances with ZFS as the root
filesystem.

Reviewed by: emaste, gjb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34426
release/Makefile.vm
release/scripts/mk-vmimage.sh
release/tools/ec2.conf
release/tools/vmimage.subr
share/man/man7/release.7