summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-29 23:07:43 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-29 23:32:46 +0200
commitef9fc40dda0f14366d0612bcb940f4fe7285e786 (patch)
treee1c24da7781b18732c2fad12516024aec498a355 /gnu/system
parentff0bf0aca579555400faad3814c2a635dd00caf0 (diff)
vm: Allow a volume name to be specified for the root partition.
* guix/build/vm.scm (format-partition): Add #:label parameter, and honor it. (initialize-hard-disk): Add #:file-system-label parameter, and pass it to 'format-partition'. * gnu/system/vm.scm (qemu-image): Add #:file-system-label parameter and pass it to 'initialize-hard-disk'.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/vm.scm13
1 files changed, 8 insertions, 5 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index a15c4c358b..ddc13468cc 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -196,15 +196,17 @@ made available under the /xchg CIFS share."
(disk-image-size (* 100 (expt 2 20)))
(disk-image-format "qcow2")
(file-system-type "ext4")
+ file-system-label
grub-configuration
(register-closures? #t)
(inputs '())
copy-inputs?)
"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. The
-returned image is a full disk image, with a GRUB installation that uses
-GRUB-CONFIGURATION as its configuration file (GRUB-CONFIGURATION must be the
-name of a file in the VM.)
+'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, with a GRUB installation
+that uses GRUB-CONFIGURATION as its configuration file (GRUB-CONFIGURATION
+must be the name of a file in the VM.)
INPUTS is a list of inputs (as for packages). When COPY-INPUTS? is true, copy
all of INPUTS into the image being built. When REGISTER-CLOSURES? is true,
@@ -243,7 +245,8 @@ the image."
#:copy-closures? #$copy-inputs?
#:register-closures? #$register-closures?
#:disk-image-size #$disk-image-size
- #:file-system-type #$file-system-type)
+ #:file-system-type #$file-system-type
+ #:file-system-label #$file-system-label)
(reboot))))
#:system system
#:make-disk-image? #t