summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-05-22 17:36:35 +0200
committerLudovic Courtès <ludo@gnu.org>2018-05-23 10:21:02 +0200
commit56f9d442e0b5624130042f69f33ea5bd7e970798 (patch)
treeac79916dad9d1c9aaabf0565126e1bd1cac7a653
parent353df40102b209a06376044af946a28c2594377b (diff)
downloadguix-56f9d442e0b5624130042f69f33ea5bd7e970798.tar.gz
vm: Use a deterministic file system UUID in shared-store VMs.
* gnu/system/vm.scm (system-qemu-image/shared-store): Pass
 #:file-system-uuid to 'qemu-image'.
-rw-r--r--gnu/system/vm.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 09a11af863..eb73b5ca7a 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -752,6 +752,10 @@ with the host.
 When FULL-BOOT? is true, return an image that does a complete boot sequence,
 bootloaded included; thus, make a disk image that contains everything the
 bootloader refers to: OS kernel, initrd, bootloader data, etc."
+  (define root-uuid
+    ;; Use a fixed UUID to improve determinism.
+    (operating-system-uuid os 'dce))
+
   (mlet* %store-monad ((os-drv   (operating-system-derivation os))
                        (bootcfg  (operating-system-bootcfg os)))
     ;; XXX: When FULL-BOOT? is true, we end up creating an image that contains
@@ -763,6 +767,7 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc."
                 #:bootloader (bootloader-configuration-bootloader
                               (operating-system-bootloader os))
                 #:disk-image-size disk-image-size
+                #:file-system-uuid root-uuid
                 #:inputs (if full-boot?
                              `(("bootcfg" ,bootcfg))
                              '())