summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
AgeCommit message (Collapse)Author
2018-06-08vm: 'expression->derivation-in-linux-vm' takes a #:file-systems parameter.Ludovic Courtès
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add #:file-systems and use it instead of %LINUX-VM-FILE-SYSTEMS.
2018-06-01vm: Use 'with-extensions'.Ludovic Courtès
* gnu/system/vm.scm (system-docker-image)[build]: Use 'with-extensions'. Remove 'add-to-load-path' calls.
2018-05-29vm: Remove unneeded dependency on Guile-JSON.Ludovic Courtès
Fixes <https://bugs.gnu.org/31581>. Reported by Leo Famulari <leo@famulari.name>. * gnu/system/vm.scm: Remove unneeded (guix docker) import.
2018-05-28system: Remove uses of the 'title' field of <file-system>.Ludovic Courtès
* gnu/system/install.scm (installation-os): Remove uses of the 'title' field of 'file-system'; use 'file-system-label' as appropriate. * gnu/system/vm.scm (system-disk-image, system-qemu-image): Likewise. * gnu/tests.scm (%simple-os): Likewise. * gnu/tests/install.scm (%minimal-os, %minimal-extlinux-os) (%minimal-os-on-vda, %separate-home-os, %separate-store-os) (%raid-root-os, %encrypted-root-os, %btrfs-root-os): Likewise. * gnu/build/shepherd.scm (default-mounts)[tmpfs]: Likewise. * tests/guix-system.sh: Likewise. * tests/system.scm (%root-fs): Likewise. ("operating-system-boot-mapped-devices, implicit dependency"): Likewise.
2018-05-28file-systems: Remove 'title' field and add <file-system-label>.Ludovic Courtès
The 'title' field was easily overlooked and was an endless source of confusion. Now, the value of the 'device' field is self-contained. * gnu/system/file-systems.scm (<file-system>): Change constructor name to '%file-system'. [title]: Remove. (<file-system-label>): New record type with printer. (report-deprecation, device-expression) (process-file-system-declaration, file-system): New macros. (file-system-title): New procedure. (file-system->spec, spec->file-system): Adjust to handle <file-system-label>. * gnu/system.scm (bootable-kernel-arguments): Add case for 'file-system-label?'. (read-boot-parameters): Likewise. (mapped-device-user): Avoid 'file-system-title'. (fs->boot-device): Remove. (operating-system-boot-parameters): Use 'file-system-device' instead of 'fs->boot-device'. (device->sexp): Add case for 'file-system-label?'. * gnu/bootloader/grub.scm (grub-root-search): Add case for 'file-system-label?'. * gnu/system/examples/bare-bones.tmpl, gnu/system/examples/beaglebone-black.tmpl, gnu/system/examples/lightweight-desktop.tmpl, gnu/system/examples/vm-image.tmpl: Remove uses of 'title'. * gnu/system/vm.scm (virtualized-operating-system): Remove uses of 'file-system-title'. * guix/scripts/system.scm (check-file-system-availability): Likewise, and adjust fix-it hint. (check-initrd-modules)[file-system-/dev]: Likewise. * gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title' parameter. [canonical-title]: Remove. Match on SPEC's type rather than on CANONICAL-TITLE. (mount-file-system): Adjust caller. * gnu/build/linux-boot.scm (boot-system): Interpret ROOT here. * gnu/services/base.scm (file-system->fstab-entry): Remove use of 'file-system-title'. * doc/guix.texi (File Systems): Remove documentation of the 'title' field. Rewrite documentation of 'device' and document 'file-system-label'.
2018-05-23vm: Use a deterministic file system UUID in shared-store VMs.Ludovic Courtès
* gnu/system/vm.scm (system-qemu-image/shared-store): Pass #:file-system-uuid to 'qemu-image'.
2018-03-24system: Add "guix system docker-image" command.Chris Marusich
* gnu/system/vm.scm (system-docker-image): New procedure. * guix/scripts/system.scm (system-derivation-for-action): Add a case for docker-image, and in that case, call system-docker-image. (show-help): Document docker-image. (guix-system): Parse arguments for docker-image. * doc/guix.texi (Invoking guix system): Document "guix system docker-image". * gnu/system/examples/docker-image.tmpl: New file.
2018-03-24gnu: When building in a VM, share a temporary directory.Chris Marusich
* gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory available in the VM. * gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.
2018-03-18vm: Display a backtrace upon error by default.Ludovic Courtès
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass #:on-error to 'base-initrd'.
2018-03-08vm: Use 9p mount tags below 32 chars.Ludovic Courtès
Fixes <https://bugs.gnu.org/30667>. Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * gnu/system/vm.scm (file-system->mount-tag): Use 'sha1' to compute the tag.
2018-03-03linux-initrd: Add virtio modules to '%base-initrd-modules'.Ludovic Courtès
Fixes a regression in installation tests, whereby 'guix system init' would report that virtio modules are missing for the target devices. In practice virtio modules were always available since 'base-initrd' was always called with #:virtio? #t. This commit simply moves them to '%base-initrd-modules' so that 'guix system' knows they're available. Reported by Danny Milosavljevic <dannym@scratchpost.org> at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30629#112>. * gnu/system/linux-initrd.scm (default-initrd-modules): Add virtio modules. (base-initrd): Remove #:virtio? and 'virtio-modules'. * gnu/system/vm.scm (expression->derivation-in-linux-vm) (system-qemu-image, virtualized-operating-system): Remove uses of #:virtio?. * doc/guix.texi (Initial RAM Disk): Update 'base-initrd' doc.
2018-03-03vm: Add missing modules to the 'expression->derivation-in-linux-vm' initrd.Ludovic Courtès
Fixes a regression introduced in bc499b113a598c0e7863da9887a4133472985713, whereby the default initrd used by 'expression->derivation-in-linux-vm' would lack all the usual modules: virtio, nls_iso8859-1, etc. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass #:linux-modules to 'base-initrd'.
2018-01-19gnu: Consistently Write ‘file system(s)’.Tobias Geerinckx-Rice
It is the GNU way. * doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’. * gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): Likewise. * gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise. * gnu/packages/check.scm (python-testpath)[description]: Likewise. * gnu/packages/disk.scm (pydf)[description]: Likewise. * gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise. (glusterfs)[description]: Likewise. * gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap) (ghc-system-fileio)[synopsis]: Likewise. (ghc-fsnotify)[description]: Likewise. * gnu/packages/linux.scm (proot)[description]: Likewise. (jmtpfs)[synopsis, description]: Likewise. * gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise. * gnu/packages/storage.scm (ceph)[description]: Likewise. * gnu/packages/sync.scm (lsyncd)[description]: Likewise. * gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise. (go-github-com-zillode-notify)[description]: Likewise. * gnu/services/nfs.scm (pipefs-service-type): Likewise. * guix/scripts/system.scm (perform-action): Likewise.
2018-01-07vm: 'vm-image' images refer to the root file system by UUID.Ludovic Courtès
This avoids the hard-coded "/dev/sda1", which only made sense when the image is run with "qemu-system-x86_64 -hda", not when it's passed to Xen, etc. Reported by Andreas Enge <andreas@enge.fr>. * gnu/system/vm.scm (system-qemu-image): Define 'root-uuid', use it as the 'device' field for "/", and pass it to 'qemu-image'.
2017-12-18vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.Leo Famulari
* gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci. * gnu/system/vm.scm (common-qemu-options): Likewise.
2017-12-17gnu: system: vm: Use loose cache for 9p file system.Christopher Baines
This improves the performance of the shared store for operations involving lots of files, e.g. searching through the store. * gnu/system/vm.scm (mapping->file-system): Add cache=loose to options.
2017-12-15bootloader: Factorize write-file-on-device.Mathieu Othacehe
* gnu/bootloader/extlinux.scm (install-extlinux): Factorize bootloader writing in a new procedure write-file-on-device defined in (gnu build bootloader). * gnu/build/bootloader.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add new file. * gnu/system/vm.scm (qemu-img): Adapt to import and use (gnu build bootloader) module during derivation building. * gnu/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-15vm: Adapt qemu command to ARM.Mathieu Othacehe
* gnu/build/vm.scm (load-in-linux-vm): New argument #:target-arm32. Use it to adapt command for qemu-system-arm. This implies to choose a machine ("virt"), use the correct console port "ttyAMA0", disable KVM use that is buggy on some ARM boards (Odroid XU4 for example) and use user mode network stack instead of NIC. Gather all those options in a new variable "arch-specific-flags". * gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass to load-in-linux-vm "#:target-arm32?" argument.
2017-12-04bootloader: extlinux: Stop using dd binary.Mathieu Othacehe
* gnu/bootloader/extlinux.scm (dd): Remove it, (install-extlinux): replace dd call by Guile I/O procedures. * gnu/system/vm.scm (qemu-image): Add (ice-9 binary-ports) to used-modules list to provide "get-bytevector-n" and "put-bytevector". * guix/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-02system: vm: Fix typo in comment.Mathieu Othacehe
* gnu/system/vm.scm (qemu-image): Fix typo targetting -> targeting.
2017-12-01system: vm: Do not add EFI partition on ARM system.Mathieu Othacehe
* gnu/system/vm.scm (qemu-img): Do not add EFI partition if we are targetting ARM. UEFI support on u-boot is still experimental, so do not add EFI partition on ARM for now.
2017-11-30vm: Filter out file systems that refer to UUIDs or labels.Ludovic Courtès
* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]: Filter out things that refer to file system UUIDs or labels.
2017-11-26vm: Use os-defined initrd intead of base-initrd.Mathieu Othacehe
* gnu/system/vm.scm (system-disk-image, system-qemu-image, virtualized-operating-system): Replace base-initrd by (operating-system-initrd os). The system produced were always using base-initrd even if the user had defined a custom initrd based on raw-initrd in the os declaration.
2017-11-06system: vm: Use 2^32 - 1 as hash size.Mathieu Othacehe
* gnu/system/vm.scm (operating-system-uuid): Use 2^32 - 1 instead of 2^32 as hash size. On some 32 bit system (ARM for example), 2^32 exceeds hash max size (ULONG_MAX = 2^32 - 1).
2017-10-19vm: Always use GRUB/i386.Ludovic Courtès
Fixes <https://bugs.gnu.org/28768>. Reported by Oleg Pykhalov <go.wigust@gmail.com>. * gnu/system/vm.scm (virtualized-operating-system): Override the 'bootloader' field.
2017-10-04vm: Add disk-image-size to <virtual-machine>.Christopher Baines
* gnu/system/vm.scm (<virtual-machine>): Add disk-image-size. (port-forwardings->qemu-options): Use disk-image-size from <virtual-machine>.
2017-10-04vm: Add a minimum root size.Christopher Baines
* gnu/system/vm.scm (qemu-image): When guessing the root-size, use a lower bound of 20 MiB, otherwise the root file system size is sometimes 0 MiB in size.
2017-09-11vm: Generate a UUID to identify the root file system.Ludovic Courtès
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'.
2017-09-11vm: Allow users to specify a UUID for the root partition.Ludovic Courtès
* gnu/system/vm.scm (qemu-image): Add #:file-system-uuid parameter; pass it as the 'uuid' field of the root partition.
2017-09-11system: Introduce a disjoint UUID type.Ludovic Courtès
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.
2017-09-06vm: Call iso9660-image with #:register-closures? as #t.Christopher Baines
* gnu/system/vm.scm (system-disk-image): Call iso9660-image with #:register-closures? as #t.
2017-09-06vm: Add support for registering closures to iso9660-image.Christopher Baines
* gnu/system/vm.scm (iso9660-image): Add support for registering closures.
2017-09-04vm: Remove redundant conditional in system-disk-image.Christopher Baines
* gnu/system/vm.scm (system-disk-image): Remove redundant conditional for #:file-system-type when calling qemu-image.
2017-08-03vm: Use grub-hybrid's grub-mkrescue.Danny Milosavljevic
* gnu/system/vm.scm (system-disk-image): Use grub-hybrid's grub-mkrescue. * gnu/bootlader/grub.scm (grub-mkrescue-bootloader): New variable.
2017-07-20vm: Add a <virtual-machine> type and associated gexp compiler.Ludovic Courtès
* 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.
2017-07-18vm: 'iso9660-image' produces a single-file output.Ludovic Courtès
* 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.
2017-07-17build, vm: Use a less common label.Tobias Geerinckx-Rice
* 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.
2017-07-15gnu: 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.
2017-07-10build, vm: Use "GuixSD" or "GUIXSD" as volume label.Danny Milosavljevic
* 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>
2017-07-07guix system: Add file system label and uuid to iso9660-image.Danny Milosavljevic
* gnu/system/vm.scm (system-disk-image): Pass root-label to ... (iso9660-image): ... here. Add keyword arguments #:file-system-label and #:file-system-uuid.
2017-07-03build: Add iso9660 system image generator.Danny Milosavljevic
* 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.
2017-06-30vm: Estimate the disk size by default.Ludovic Courtès
* 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.
2017-06-16tests: Allow setting of qemu memory-size for system tests.Jan Nieuwenhuizen
* gnu/system/vm.scm (common-qemu-options): Remove hardcoded "-m 256". (system-qemu-image/shared-store-script): New keyword argument: #:memory-size.
2017-05-21vm: Increase default disk size to account for ESP partition.Marius Bakke
Fixes a test regression introduced by ecf5d5376979fadd971559367bf553df89fcc62b. * gnu/system/vm.scm (system-qemu-image/shared-store-script): 30MiB -> 70MiB.
2017-05-19vm: Add UEFI loader to disk images.Marius Bakke
* gnu/build/vm.scm (install-efi): New procedure. (initialize-hard-disk): Generate EFI blob when ESP is present. * gnu/system/vm.scm (qemu-image): Append 40MiB EFI System Partition.
2017-05-19vm: Support creating FAT partitions.Marius Bakke
* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): New procedures. (format-partition): Use them. Error for unknown file systems. * gnu/system/vm.scm (qemu-image): Include DOSFSTOOLS. * gnu/system/linux-initrd.scm (base-initrd): Always add nls_is8859-1.ko.
2017-05-19vm: Support arbitrary partition flags.Marius Bakke
* gnu/build/vm.scm (<partition>): Change BOOTABLE? to FLAGS. (initialize-partition-table): Pass each flag to parted. (initialize-hard-disk): Locate boot partition. * gnu/system/vm.scm (qemu-image): Adjust partition flags.
2017-05-16bootloader: Adapt vm to new bootloader API.Mathieu Othacehe
* gnu/build/install.scm (install-boot-config): New procedure. (install-grub): Move to (gnu bootloader grub). * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and adjust accordingly. (initialize-hard-disk): Takes a bootloader-package, bootcfg, bootcfg-location and bootloader-installer procedure. Adjust accordingly. * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Adjust to qemu-image.
2017-05-16bootloader: Add extlinux support.Mathieu Othacehe
* gnu/bootloader.scm: New file. * gnu/bootloader/extlinux.scm: New file. * gnu/bootloader/grub.scm: New file. * gnu/local.mk: Build new files. * gnu/system.scm: Adapt to new bootloader api. * gnu/scripts/system.scm: Adapt to new bootloader api. * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu bootloader grub) modules. * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). * gnu/tests.scm: Ditto. * gnu/tests/nfs.scm: Ditto.
2017-05-05system: vm: Use operating-system-kernel-arguments.Danny Milosavljevic
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Use operating-system-kernel-arguments.