From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpif4-0002Ey-8j for guix-patches@gnu.org; Wed, 06 Sep 2017 18:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpif3-0000V8-8x for guix-patches@gnu.org; Wed, 06 Sep 2017 18:19:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44866) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpif3-0000V0-6g for guix-patches@gnu.org; Wed, 06 Sep 2017 18:19:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dpif3-0005mI-10 for guix-patches@gnu.org; Wed, 06 Sep 2017 18:19:05 -0400 Subject: [bug#28377] [PATCH 09/10] vm: Allow users to specify a UUID for the root partition. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 7 Sep 2017 00:17:55 +0200 Message-Id: <20170906221756.17024-9-ludo@gnu.org> In-Reply-To: <20170906221756.17024-1-ludo@gnu.org> References: <20170906221756.17024-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28377@debbugs.gnu.org * gnu/system/vm.scm (qemu-image): Add #:file-system-uuid parameter; pass it as the 'uuid' field of the root partition. --- gnu/system/vm.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 1807946cb..73d830bf0 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -240,6 +240,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 @@ -249,7 +250,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, is 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.) @@ -299,6 +303,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)) -- 2.14.1