GNU bug report logs - #28635
[PATCH] Allow configuring the disk image size of a virtual machine

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Thu, 28 Sep 2017 19:55:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 28635 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28635 <at> debbugs.gnu.org
Subject: [PATCH 1/2] vm: Add a minimum root size.
Date: Thu, 28 Sep 2017 20:57:53 +0100
* 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.
---
 gnu/system/vm.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 78143e4f7..d340a8563 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
-- 
2.14.1





This bug report was last modified 7 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.