aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vmimage.subr
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2019-04-30 14:29:09 +0000
committerGlen Barber <gjb@FreeBSD.org>2019-04-30 14:29:09 +0000
commitcbc5290710cdd474cd58644693a05fbdc64b348c (patch)
tree4abe2f7b1f021f072a8399af82804a52054e31e5 /release/tools/vmimage.subr
parenta6619e8d9c1a3820f76ae1b0d5ae61840cbbed57 (diff)
downloadsrc-cbc5290710cdd474cd58644693a05fbdc64b348c.tar.gz
src-cbc5290710cdd474cd58644693a05fbdc64b348c.zip
Reduce the default image size for virtual machine disk images from
30GB to 3GB. The raw images can be resized using truncate(1), and other formats can be resized with tools included with other tools included with other hypervisors. Enable the growfs(8) rc(8) at firstboot if the disk was resized prior to booting the virtual machine for the first time. Discussed with: several PR: 232313 (requested in other context) MFC after: 3 days Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=346959
Diffstat (limited to 'release/tools/vmimage.subr')
-rw-r--r--release/tools/vmimage.subr3
1 files changed, 3 insertions, 0 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index ff3d69f5ba42..6e29139402be 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -182,6 +182,9 @@ vm_extra_enable_services() {
if [ -z "${VMCONFIG}" -o -c "${VMCONFIG}" ]; then
echo 'ifconfig_DEFAULT="DHCP inet6 accept_rtadv"' >> \
${DESTDIR}/etc/rc.conf
+ # Expand the filesystem to fill the disk.
+ echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ touch ${DESTDIR}/firstboot
fi
return 0