diff options
author | Christopher Baines <mail@cbaines.net> | 2017-09-28 18:57:09 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2017-10-04 07:16:40 +0100 |
commit | 0c75a4de497991912af0e4d252b90c283e162e5d (patch) | |
tree | 9f0be0da48eff4f0d7dfbb4974f07041abc858e1 /gnu | |
parent | d0c8e5249dbf7d0c8b0faa8c39b3bf7effc444b7 (diff) | |
download | guix-0c75a4de497991912af0e4d252b90c283e162e5d.tar guix-0c75a4de497991912af0e4d252b90c283e162e5d.tar.gz |
vm: Add a minimum root size.
* gnu/system/vm.scm (qemu-image): When guessing the root-size, use a lower
bound of 20 MiB, otherwise the root file system size is sometimes 0 MiB in
size.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/system/vm.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 78143e4f7a..d340a8563f 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -304,9 +304,12 @@ the image." #:register-closures? #$register-closures? #:system-directory #$os-drv)) (root-size #$(if (eq? 'guess disk-image-size) - #~(estimated-partition-size - (map (cut string-append "/xchg/" <>) - graphs)) + #~(max + ;; Minimum 20 MiB root size + (* 20 (expt 2 20)) + (estimated-partition-size + (map (cut string-append "/xchg/" <>) + graphs))) (- disk-image-size (* 50 (expt 2 20))))) (partitions (list (partition |