Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 May 2019 00:45:32 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347037 - in stable: 11/release 11/release/tools 12/release 12/release/tools
Message-ID:  <201905030045.x430jWg6031716@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Fri May  3 00:45:31 2019
New Revision: 347037
URL: https://svnweb.freebsd.org/changeset/base/347037

Log:
  MFC r346959:
    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 in hypervisors.
  
    Enable the growfs(8) rc(8) at firstboot if the disk was resized
    prior to booting the virtual machine for the first time.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/11/release/Makefile.vm
  stable/11/release/tools/gce.conf
  stable/11/release/tools/vmimage.subr
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/release/Makefile.vm
  stable/12/release/tools/gce.conf
  stable/12/release/tools/vmimage.subr
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/release/Makefile.vm
==============================================================================
--- stable/11/release/Makefile.vm	Fri May  3 00:20:02 2019	(r347036)
+++ stable/11/release/Makefile.vm	Fri May  3 00:45:31 2019	(r347037)
@@ -7,7 +7,7 @@
 
 VMTARGETS=	vm-image
 VMFORMATS?=	vhd vmdk qcow2 raw
-VMSIZE?=	30G
+VMSIZE?=	3072M
 SWAPSIZE?=	1G
 VMBASE?=	vm
 

Modified: stable/11/release/tools/gce.conf
==============================================================================
--- stable/11/release/tools/gce.conf	Fri May  3 00:20:02 2019	(r347036)
+++ stable/11/release/tools/gce.conf	Fri May  3 00:45:31 2019	(r347037)
@@ -3,9 +3,6 @@
 # $FreeBSD$
 #
 
-# Reduce VMSIZE to be below the free quota limit.
-export VMSIZE=27G
-
 # Set to a list of packages to install.
 export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \
 	google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \

Modified: stable/11/release/tools/vmimage.subr
==============================================================================
--- stable/11/release/tools/vmimage.subr	Fri May  3 00:20:02 2019	(r347036)
+++ stable/11/release/tools/vmimage.subr	Fri May  3 00:45:31 2019	(r347037)
@@ -179,6 +179,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905030045.x430jWg6031716>