summaryrefslogtreecommitdiff
path: root/gnu/build/vm.scm
AgeCommit message (Collapse)Author
2018-07-04vm: Disable KVM on i386.Ludovic Courtès
* gnu/build/vm.scm (load-in-linux-vm): Disable KVM on i386.
2018-06-26vm: 'make-iso9660-image' makes 'grub.cfg' a GC root.Ludovic Courtès
* gnu/build/vm.scm (make-iso9660-image): Add call to 'register-bootcfg-root'.
2018-06-26vm: 'make-iso9660-image' no longer includes unreferenced store items.Ludovic Courtès
Fixes <https://bugs.gnu.org/31757>. * gnu/build/vm.scm (make-iso9660-image): Invoke 'grub-mkrescue' in 'open-pipe*'. Use '-path-list -' instead of passing "gnu/store=…".
2018-06-26vm: Don't try to modify the bind-mounted store.Ludovic Courtès
Previously 'guix system disk-image --file-system-type=iso9660' would fail because 'register-closure' would try to reset timestamps/ownership on the bind-mounted store, which fails with EPERM. * gnu/build/vm.scm (make-iso9660-image): Pass #:reset-timestamps? to 'register-closure'.
2018-06-14Remove 'guix-register' and its traces.Ludovic Courtès
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh. * build-aux/pre-inst-env.in (GUIX_REGISTER): Remove. * gnu/build/install.scm (directives): Remove outdated comment. * gnu/build/vm.scm (root-partition-initializer): Update comment. * gnu/packages/package-management.scm (guix-register): Remove. * guix/config.scm.in (%sbindir, %guix-register-program): Remove. * guix/scripts/system.scm (install): Adjust docstring. * guix/self.scm (make-config.scm): Remove #:guix. Do not generate %sbindir and %guix-register-program. (specification->package): Remove "guix". * nix/guix-register/guix-register.cc: Remove. * nix/libstore/store-api.cc (decodeValidPathInfo): Remove. * nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration. * nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES) (guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove. * tests/guix-register.sh: Remove.
2018-06-14install: Use 'reset-timestamps' from (guix store database).Ludovic Courtès
* gnu/build/install.scm (reset-timestamps): Remove. * gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database).
2018-06-14install: Use (guix store database) instead of 'guix-register'.Ludovic Courtès
* gnu/build/install.scm (register-closure): Add #:reset-timestamps? and and #:schema; honor them. Rewrite in terms of 'register-path'. (populate-single-profile-directory): Add #:schema and honor it. Make /var/guix/profiles and /var/guix/gcroots. * gnu/build/vm.scm (root-partition-initializer): Pass #:reset-timestamps? to 'register-closure'. * gnu/system/vm.scm (not-config?): New procedure. (guile-sqlite3&co): New variable. (expression->derivation-in-linux-vm)[config]: New variable. [builder]: Use 'with-extensions'. (iso9660-image)[schema, config]: New variables. Wrap build expression in 'with-extensions'; add 'sql-schema' call. Remove GUIX from INPUTS. (qemu-image)[schema, config]: New variables. Wrap body in 'with-extensions'. (system-docker-image)[not-config?]: Remove. [config]: Use 'make-config.scm'. [schema]: New variable. [build]: Use 'with-extensions'. Add call to 'sql-schema'. Remove GUIX from INPUTS. * gnu/system/file-systems.scm (%store-prefix): Check whether '%store-prefix' is defined. * guix/scripts/pack.scm (self-contained-tarball)[not-config?] [libgcrypt, schema]: New variables. [build]: Wrap in 'with-extensions'. Adjust imported module list to use 'make-config.scm' for (guix config).
2018-05-25vm: Pass "panic=1" to Linux.Ludovic Courtès
* gnu/build/vm.scm (load-in-linux-vm): Always pass "panic=1" after '-append'.
2018-05-23vm: Print the label and UUID of partitions.Ludovic Courtès
* gnu/build/vm.scm (create-ext-file-system): Print the label and UUID.
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-24vm: Allow control of deduplication in root-partition-initializer.Chris Marusich
* gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate? keyword argument.
2018-03-16vm: Pass "-append ..." only once.Danny Milosavljevic
* gnu/build/vm.scm (load-in-linux-vm): Pass "-append ..." only once.
2018-03-15vm: Use 'invoke' instead of 'system*'.Ludovic Courtès
* gnu/build/vm.scm (load-in-linux-vm, initialize-partition-table) (create-ext-file-system, create-fat-file-system) (install-efi, make-iso9660-image): Use 'invoke' instead of (unless (zero? (system* ...)) (error ...)).
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.
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-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-13vm: Use qemu drive device parameter.Mathieu Othacehe
* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive device.
2017-11-29vm: ISO9660 images include /etc and other standard files.Ludovic Courtès
* gnu/build/vm.scm (make-iso9660-image): Call 'populate-root-file-system' instead of a series of 'mkdir-p' calls. Add /etc to the arguments of xorriso.
2017-09-22build: Do not store two copies of the ISO-9660 superblock anymore.Danny Milosavljevic
* gnu/build/vm.scm (make-iso9660-image): Do not store two copies of the ISO-9660 superblock anymore.
2017-09-11file-systems: Introduce (gnu system uuid).Ludovic Courtès
* gnu/build/file-systems.scm (sub-bytevector) (latin1->string, %fat32-endianness, fat32-uuid->string) (%iso9660-uuid-rx, string->iso9660-uuid) (iso9660-uuid->string, %network-byte-order) (dce-uuid->string, %uuid-rx, string->dce-uuid) (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid) (vhashq, %uuid-parsers, %uuid-printers, string->uuid) (uuid->string): Move to... * gnu/system/uuid.scm: ... here. New file. * gnu/system/file-systems.scm (uuid): Move to the above file. * gnu/system/vm.scm: Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Add uuid.scm.
2017-09-11vm: Allow partitions to be initialized with a given UUID.Ludovic Courtès
* gnu/build/vm.scm (<partition>)[uuid]: New field. (create-ext-file-system): Add #:uuid and honor it. (create-fat-file-system): Add #:uuid. (format-partition): Add #:uuid and honor it. (initialize-partition): Honor the 'uuid' field of PARTITION.
2017-09-10vm: Add comment about deduplication in make-iso9660-image.Christopher Baines
* gnu/build/vm.scm (make-iso9660-image): Add comment about the use of #:deduplicate #f when calling register-closure.
2017-09-06vm: Create /mnt in the generated ISO image in make-iso9660-image.Christopher Baines
This is used in the installation process, as the mountpoint for the target filesystem. * gnu/build/vm.scm (make-iso9660-image): Create /mnt within the generated ISO image.
2017-09-06vm: Add support for registering closures to make-iso9660-image.Christopher Baines
This mimics the functionality in the root-partition-initializer used in creating the QEMU image. This helps when trying to run guix system init from the generated ISO image. * gnu/build/vm.scm (make-iso9660-image): Add support for registering closures.
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-18vm: Increase disk size overhead estimate.Tobias Geerinckx-Rice
* gnu/build/vm.scm (estimated-partition-size): Add 25% to the graph size.
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-12build: Make ISO-9660 image bootable from USB flash drive.Danny Milosavljevic
* gnu/build/vm.scm (make-iso9660-image): Make image bootable from USB flash drive.
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-03build: Add (gnu build file-systems) import.Danny Milosavljevic
* gnu/build/vm.scm: Add (gnu build file-systems) import.
2017-07-03build: Clarify error message when make-iso9660-image fails.Danny Milosavljevic
* gnu/build/vm.scm (make-iso9660-image): Clarify error message.
2017-07-03build: Allow specifying volume-uuid with make-iso9660-image.Danny Milosavljevic
* gnu/build/file-systems.scm (iso9660-uuid->string): Export. * gnu/build/vm.scm (make-iso9660-image): Add volume-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: Use 'fold2' from (guix combinators).Ludovic Courtès
* gnu/build/vm.scm: Use (guix combinators). (fold2): Remove.
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-30vm: Display the disk and partition sizes.Ludovic Courtès
* gnu/build/vm.scm (load-in-linux-vm): Add 'format' call when MAKE-DISK-IMAGE? is true. (initialize-partition-table): Show the size of the partitions being created.
2017-06-30vm: Fix 'load-in-linux-vm' docstring.Ludovic Courtès
* gnu/build/vm.scm (load-in-linux-vm): Change default value of #:disk-image-size. Update docstring to note that DISK-IMAGE-SIZE is in bytes.
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-04-15vm: Reword grub.cfg to bootcfg.Mathieu Othacehe
* gnu/build/vm.scm (register-grub.cfg-root): Reword grub.cfg to bootcfg, (initialize-hard-disk): ditto, * gnu/system/vm.scm (system-disk-image): ditto, (system-qemu-image): ditto, (system-qemu-image/shared-store): ditto. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-07vm: Add missing module.Mathieu Othacehe
* gnu/build/vm.scm (define-module): Use module (guix build syscalls). It fixes the following warnings during guix build : gnu/build/vm.scm:233:3: warning: possibly unbound variable `mount' gnu/build/vm.scm:238:3: warning: possibly unbound variable `umount' gnu/build/vm.scm:268:8: warning: possibly unbound variable `mount' gnu/build/vm.scm:276:8: warning: possibly unbound variable `umount' gnu/build/vm.scm:315:4: warning: possibly unbound variable `mount' gnu/build/vm.scm:323:4: warning: possibly unbound variable `umount' This was not possible until the previous commit because we had to be sure that Guile core implementation of 'mount' and 'umount' was used in initrd context. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-11-28vm: Avoid needless file copy in 'load-in-linux-vm'.Ludovic Courtès
Reported by Chris Webber. * gnu/build/vm.scm (load-in-linux-vm)[image-file]: Remove. Directly refer to OUTPUT instead.
2016-06-20vm: 'qemu-command' honors its argument.Ludovic Courtès
* gnu/build/vm.scm (qemu-command): Refer to SYSTEM rather than %HOST-TYPE in the body.
2016-02-22vm: Only pass "-enable-kvm" to qemu if /dev/kvm is present.Christopher Allan Webber
Fixes <http://bugs.gnu.org/22633>. * gnu/build/vm.scm (load-in-linux-vm): Only pass "-enable-kvm" flag to qemu if "/dev/kvm" is present. * gnu/system/vm.scm (common-kvm-options): Same as above.
2015-07-26vm: Make the list of partitions to build a parameter.Ludovic Courtès
* gnu/build/vm.scm (<partition>): New record type. (fold2): New procedure. (initialize-partition-table): Remove #:bootable? and 'partition-size' parameters. Add 'partitions' parameter. Invoke 'parted' with '--script'. (initialize-root-partition): Remove. (initialize-partition, root-partition-initializer): New procedures. (initialize-hard-disk): Remove #:system-directory, #:disk-image-size, #:file-system-type, #:file-system-label, #:closures, #:copy-closures?, #:bootable?, and #:register-closures? parameters. Add #:partitions. Rewrite to use 'initialize-partition' for each item of PARTITIONS. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Add (guix records) to #:modules default value. (qemu-image): Adjust accordingly.
2015-07-24vm: Use the 'umount' procedure instead of util-linux's 'umount' command.Ludovic Courtès
* gnu/build/vm.scm (initialize-root-partition, initialize-hard-disk): Use the 'umount' procedure instead of invoking the 'umount' command. * gnu/system/vm.scm (qemu-image): Remove UTIL-LINUX from INPUTS.
2014-12-09system: Don't make /boot/grub/grub.cfg a symlink to the store.Ludovic Courtès
This would not work when /boot is a separate partition, as reported by Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>. This fixes a regression introduced in 39d1f82. * gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of symlinking it, as was the case before 39d1f82. * gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter. Make it a permanent GC root instead of an indirect GC root. (initialize-hard-disk): Adjust accordingly. * guix/scripts/system.scm (install-grub*): Replace use of 'add-indirect-root' by the addition of a permanent GC root in %GC-ROOTS-DIRECTORY.
2014-12-04system: Make /boot/grub/grub.cfg an indirect GC root.Ludovic Courtès
Fixes <http://bugs.gnu.org/19160>. * guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an indirect GC root. * gnu/build/install.scm (install-grub): Make TARGET a symlink. * gnu/build/vm.scm (register-grub.cfg-root): New procedure. (initialize-hard-disk): Use it.