Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2016 22:36:45 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307008 - in head/release: . tools
Message-ID:  <201610102236.u9AMajg6006512@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Mon Oct 10 22:36:44 2016
New Revision: 307008
URL: https://svnweb.freebsd.org/changeset/base/307008

Log:
  Add the ability to override the size of the swap partition when building
  VM images.  The default continues to be 1G.
  
  Reviewed by:	gjb@
  Sponsored by:	Chelsio Communications

Modified:
  head/release/Makefile.vm
  head/release/tools/vmimage.subr

Modified: head/release/Makefile.vm
==============================================================================
--- head/release/Makefile.vm	Mon Oct 10 21:12:56 2016	(r307007)
+++ head/release/Makefile.vm	Mon Oct 10 22:36:44 2016	(r307008)
@@ -8,6 +8,7 @@
 VMTARGETS=	vm-image
 VMFORMATS?=	vhd vmdk qcow2 raw
 VMSIZE?=	20G
+SWAPSIZE?=	1G
 VMBASE?=	vm
 
 VHD_DESC=	Azure, VirtualPC, Hyper-V, Xen disk image

Modified: head/release/tools/vmimage.subr
==============================================================================
--- head/release/tools/vmimage.subr	Mon Oct 10 21:12:56 2016	(r307007)
+++ head/release/tools/vmimage.subr	Mon Oct 10 22:36:44 2016	(r307008)
@@ -11,7 +11,7 @@ trap "cleanup" INT QUIT TRAP ABRT TERM
 
 write_partition_layout() {
 	if [ -z "${NOSWAP}" ]; then
-		SWAPOPT="-p freebsd-swap/swapfs::1G"
+		SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}"
 	fi
 
 	_OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)"



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