~ruther/guix-local

ref: e8d5e32fbff2f8a5be0462b5e23fbeaaeb832af3 guix-local/gnu/system/vm.scm -rw-r--r-- 32.1 KiB
5f7fe1c5 — Ludovic Courtès 8 years ago
vm: Generate a UUID to identify the root file system.

This makes collisions less likely than when using a label to look up the
partition.  See <https://bugs.gnu.org/27735>.

* gnu/system/vm.scm (operating-system-uuid): New procedure.
(system-disk-image): Define 'root-uuid' and use it for the root file
system.  Pass it to 'iso9660-image' and 'qemu-image'.
fd3b4b98 — Ludovic Courtès 8 years ago
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.
9b336338 — Ludovic Courtès 8 years ago
system: Introduce a disjoint UUID type.

Conceptually a UUID is just a bytevector.  However, there's software out
there such as GRUB that relies on the string representation of different
UUID types (e.g., the string representation of DCE UUIDs differs from
that of ISO-9660 UUIDs, even if they are actually bytevectors of the
same length).  This new <uuid> record type allows us to preserve
information about the type of UUID so we can eventually convert it to a
string using the right representation.

* gnu/system/uuid.scm (<uuid>): New record type.
(bytevector->uuid): New procedure.
(uuid): Return calls to 'make-uuid'.
(uuid->string): Rewrite using 'match-lambda*' to accept a single 'uuid?'
argument.
* gnu/bootloader/grub.scm (grub-root-search): Check for 'uuid?' instead
of 'bytevector?'.
* gnu/system.scm (bootable-kernel-arguments): Check whether ROOT-DEVICE
is 'uuid?'.
(read-boot-parameters): Use 'bytevector->uuid' when the
store device is a bytevector.
(read-boot-parameters-file): Check for 'uuid?' instead of 'bytevector?'.
(device->sexp): New procedure.
(operating-system-boot-parameters-file): Use it for 'root-device' and
'store'.
(operating-system-bootcfg): Remove conditional in definition of
'root-device'.
* gnu/system/file-systems.scm (file-system->spec): Check for 'uuid?' on
DEVICE and take its bytevector.
* gnu/system/mapped-devices.scm (open-luks-device): Likewise.
* gnu/system/vm.scm (iso9660-image): Call 'uuid-bytevector' for the
 #:volume-uuid argument.
b069111f — Christopher Baines 8 years ago
vm: Call iso9660-image with #:register-closures? as #t.

* gnu/system/vm.scm (system-disk-image): Call iso9660-image with
  #:register-closures? as #t.
e375d3fa — Christopher Baines 8 years ago
vm: Add support for registering closures to iso9660-image.

* gnu/system/vm.scm (iso9660-image): Add support for registering closures.
4138e782 — Christopher Baines 8 years ago
vm: Remove redundant conditional in system-disk-image.

* gnu/system/vm.scm (system-disk-image): Remove redundant conditional for
  #:file-system-type when calling qemu-image.
f167595b — Mark H Weaver 8 years ago
Merge branch 'master' into core-updates
cf189709 — Danny Milosavljevic 8 years ago
vm: Use grub-hybrid's grub-mkrescue.

* gnu/system/vm.scm (system-disk-image): Use grub-hybrid's grub-mkrescue.
* gnu/bootlader/grub.scm (grub-mkrescue-bootloader): New variable.
6c1a317e — Leo Famulari 8 years ago
Merge branch 'master' into core-updates
ed419fa0 — Ludovic Courtès 8 years ago
vm: Add a <virtual-machine> type and associated gexp compiler.

* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add
 #:options parameter and honor it.
(<virtual-machine>): New record type.
(virtual-machine): New macro.
(port-forwardings->qemu-options, virtual-machine-compiler): New
procedures.
8d033e3e — Ludovic Courtès 8 years ago
vm: 'iso9660-image' produces a single-file output.

* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
  #:single-file-output? and pass it to 'load-in-linux-vm'.
(iso9660-image): Pass #:single-file-output? to
'expression->derivation-in-linux-vm'.
* gnu/build/vm.scm (load-in-linux-vm): Add #:single-file-output? and
honor it.
0862b954 — Tobias Geerinckx-Rice 8 years ago
build, vm: Use a less common label.

* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD_image" as label.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/system/vm.scm (system-disk-image): Likewise.
59132b80 — 宋文武 8 years ago
gnu: Rename (gnu packages qemu) to (gnu packages virtualization).

* gnu/packages/qemu.scm: Rename this ...
* gnu/packages/virtualization.scm: ... to this.
* gnu/local.mk (GNU_SYSTEM_MODULES),
gnu/packages/bootloaders.scm, gnu/packages/debug.scm,
gnu/packages/gnome.scm, gnu/system/vm.scm,
gnu/tests/install.scm: Adjust accordingly.
c8eb2b8c — Leo Famulari 8 years ago
Merge branch 'master' into core-updates
651de2bd — Danny Milosavljevic 8 years ago
build, vm: Use "GuixSD" or "GUIXSD" as volume label.

* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD" as label.
* gnu/system/install.scm (installation-os): Use "GuixSD" as label.
* gnu/system/vm.scm (system-disk-image): Use "GuixSD" or "GUIXSD" as volume
label.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
acc0f6bb — Danny Milosavljevic 8 years ago
guix system: Add file system label and uuid to iso9660-image.

* gnu/system/vm.scm (system-disk-image): Pass root-label to ...
(iso9660-image): ... here.  Add keyword arguments #:file-system-label
and #:file-system-uuid.
be1033a3 — Danny Milosavljevic 8 years ago
build: Add iso9660 system image generator.

* build-aux/hydra/gnu-system.scm (qemu-jobs): Add 'iso9660-image .
* gnu/build/vm.scm (make-iso9660-image): New variable.  Export it.
* gnu/system/vm.scm (iso9660-image): New variable.  Use make-iso9660-image.
(system-disk-image): Use iso9660-image.
e0556f76 — Ludovic Courtès 8 years ago
Merge branch 'master' into core-updates
a8ac4f08 — Ludovic Courtès 8 years ago
vm: Estimate the disk size by default.

* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
9d438563 — Mark H Weaver 8 years ago
Merge branch 'master' into core-updates
Next