aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-09-06 23:12:32 +0200
committerLudovic Courtès <ludo@gnu.org>2017-09-11 22:26:24 +0200
commitfd3b4b985d5bbd5d91362aa91079c1155018fa34 (patch)
tree10ae147fd168c4b0ff0d0ae8c2492f9675255d3f /gnu
parentce094b4663da6aa52d02f398a19e1d2892641b7d (diff)
downloadpatches-fd3b4b985d5bbd5d91362aa91079c1155018fa34.tar
patches-fd3b4b985d5bbd5d91362aa91079c1155018fa34.tar.gz
vm: Allow users to specify a UUID for the root partition.
* gnu/system/vm.scm (qemu-image): Add #:file-system-uuid parameter; pass it as the 'uuid' field of the root partition.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system/vm.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 92f0444ed8..9e900182ae 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -248,6 +248,7 @@ INPUTS is a list of inputs (as for packages)."
(disk-image-format "qcow2")
(file-system-type "ext4")
file-system-label
+ file-system-uuid
os-drv
bootcfg-drv
bootloader
@@ -257,7 +258,10 @@ INPUTS is a list of inputs (as for packages)."
"Return a bootable, stand-alone QEMU image of type DISK-IMAGE-FORMAT (e.g.,
'qcow2' or 'raw'), with a root partition of type FILE-SYSTEM-TYPE.
Optionally, FILE-SYSTEM-LABEL can be specified as the volume name for the root
-partition. The returned image is a full disk image that runs OS-DERIVATION,
+partition; likewise FILE-SYSTEM-UUID, if true, specifies the UUID of the root
+partition (a UUID object).
+
+The returned image is a full disk image that runs OS-DERIVATION,
with a GRUB installation that uses GRUB-CONFIGURATION as its configuration
file (GRUB-CONFIGURATION must be the name of a file in the VM.)
@@ -307,6 +311,8 @@ the image."
(partitions (list (partition
(size root-size)
(label #$file-system-label)
+ (uuid #$(and=> file-system-uuid
+ uuid-bytevector))
(file-system #$file-system-type)
(flags '(boot))
(initializer initialize))