From 8aa37a4124db90a9991485477d1af85677c7fa1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 22 May 2018 17:36:35 +0200 Subject: [PATCH 2/3] 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'. --- gnu/system/vm.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 09a11af86..b6561dfc7 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -752,6 +752,13 @@ 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 so that 'mke2fs' doesn't wait for strong randomness + ;; while generating a UUID. See . + ;; XXX: Actually it doesn't help since 'mke2fs' calls 'uuid_generate' + ;; anyway. + (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 +770,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)) '()) -- 2.17.0