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.
This commit is contained in:
parent
ce094b4663
commit
fd3b4b985d
|
@ -248,6 +248,7 @@ (define* (qemu-image #:key
|
||||||
(disk-image-format "qcow2")
|
(disk-image-format "qcow2")
|
||||||
(file-system-type "ext4")
|
(file-system-type "ext4")
|
||||||
file-system-label
|
file-system-label
|
||||||
|
file-system-uuid
|
||||||
os-drv
|
os-drv
|
||||||
bootcfg-drv
|
bootcfg-drv
|
||||||
bootloader
|
bootloader
|
||||||
|
@ -257,7 +258,10 @@ (define* (qemu-image #:key
|
||||||
"Return a bootable, stand-alone QEMU image of type DISK-IMAGE-FORMAT (e.g.,
|
"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.
|
'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
|
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
|
with a GRUB installation that uses GRUB-CONFIGURATION as its configuration
|
||||||
file (GRUB-CONFIGURATION must be the name of a file in the VM.)
|
file (GRUB-CONFIGURATION must be the name of a file in the VM.)
|
||||||
|
|
||||||
|
@ -307,6 +311,8 @@ (define* (qemu-image #:key
|
||||||
(partitions (list (partition
|
(partitions (list (partition
|
||||||
(size root-size)
|
(size root-size)
|
||||||
(label #$file-system-label)
|
(label #$file-system-label)
|
||||||
|
(uuid #$(and=> file-system-uuid
|
||||||
|
uuid-bytevector))
|
||||||
(file-system #$file-system-type)
|
(file-system #$file-system-type)
|
||||||
(flags '(boot))
|
(flags '(boot))
|
||||||
(initializer initialize))
|
(initializer initialize))
|
||||||
|
|
Loading…
Reference in a new issue