diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-06-30 00:04:38 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-06-30 00:16:50 +0200 |
commit | a8ac4f081a9a679498ea42ccfe001f218bba3043 (patch) | |
tree | 7c5d85cc5d3d52ecb1c482bfde52c4755b48a8bb /doc/guix.texi | |
parent | a2cf57e79e0c1ca59ff854c12ece178a73fe224d (diff) | |
download | gnu-guix-a8ac4f081a9a679498ea42ccfe001f218bba3043.tar gnu-guix-a8ac4f081a9a679498ea42ccfe001f218bba3043.tar.gz |
vm: Estimate the disk size by default.
* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 729ec081be..d61a5b7514 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7877,9 +7877,8 @@ that. The installation image described above was built using the @command{guix system} command, specifically: -@c FIXME: 1G is too much; see <http://bugs.gnu.org/23077>. @example -guix system disk-image --image-size=1G gnu/system/install.scm +guix system disk-image gnu/system/install.scm @end example Have a look at @file{gnu/system/install.scm} in the source tree, @@ -16187,8 +16186,9 @@ size of the image. @item vm-image @itemx disk-image Return a virtual machine or disk image of the operating system declared -in @var{file} that stands alone. Use the @option{--image-size} option -to specify the size of the image. +in @var{file} that stands alone. By default, @command{guix system} +estimates the size of the image needed to store the system, but you can +use the @option{--image-size} option to specify a value. When using @code{vm-image}, the returned image is in qcow2 format, which the QEMU emulator can efficiently use. @xref{Running GuixSD in a VM}, @@ -16251,6 +16251,10 @@ of the given @var{size}. @var{size} may be a number of bytes, or it may include a unit as a suffix (@pxref{Block size, size specifications,, coreutils, GNU Coreutils}). +When this option is omitted, @command{guix system} computes an estimate +of the image size as a function of the size of the system declared in +@var{file}. + @item --root=@var{file} @itemx -r @var{file} Make @var{file} a symlink to the result, and register it as a garbage |