aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-10-05 00:45:38 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-10-05 00:45:38 +0200
commit7716ccd59c0c17f9399d73abec05001b775d100b (patch)
tree17a3f8cc7201f9deed0b3de8d5d597b892aaede3 /gnu/system
parent86edcc53382c66be06165c62a3934d60ae7aabd8 (diff)
parenta35532f52df3ba3bc360346938aa90806cad493e (diff)
downloadguix-7716ccd59c0c17f9399d73abec05001b775d100b.tar
guix-7716ccd59c0c17f9399d73abec05001b775d100b.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/vm.scm22
1 files changed, 16 insertions, 6 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 78143e4f7a..273a895bef 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
@@ -706,6 +709,8 @@ it is mostly useful when FULL-BOOT? is true."
(default #f))
(memory-size virtual-machine-memory-size ;integer (MiB)
(default 256))
+ (disk-image-size virtual-machine-disk-image-size ;integer (bytes)
+ (default 'guess))
(port-forwardings virtual-machine-port-forwardings ;list of integer pairs
(default '())))
@@ -734,12 +739,15 @@ FORWARDINGS is a list of host-port/guest-port pairs."
system target)
;; XXX: SYSTEM and TARGET are ignored.
(match vm
- (($ <virtual-machine> os qemu graphic? memory-size ())
+ (($ <virtual-machine> os qemu graphic? memory-size disk-image-size ())
(system-qemu-image/shared-store-script os
#:qemu qemu
#:graphic? graphic?
- #:memory-size memory-size))
- (($ <virtual-machine> os qemu graphic? memory-size forwardings)
+ #:memory-size memory-size
+ #:disk-image-size
+ disk-image-size))
+ (($ <virtual-machine> os qemu graphic? memory-size disk-image-size
+ forwardings)
(let ((options
`("-net" ,(string-append
"user,"
@@ -748,6 +756,8 @@ FORWARDINGS is a list of host-port/guest-port pairs."
#:qemu qemu
#:graphic? graphic?
#:memory-size memory-size
+ #:disk-image-size
+ disk-image-size
#:options options)))))
;;; vm.scm ends here