aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/vm.scm
Commit message (Collapse)AuthorAge
* Remove traces of "GuixSD".Ludovic Courtès2019-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove mentions of "GuixSD". * gnu/bootloader/grub.scm (install-grub-efi): Likewise. * gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to "Guix_image". (initialize-hard-disk): Search for the "Guix_image" label. * gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD". * gnu/installer/newt/welcome.scm (run-welcome-page): Likewise. * gnu/packages/audio.scm (supercollider)[description]: Likewise. * gnu/packages/curl.scm (curl): Likewise. * gnu/packages/emacs.scm (emacs): Likewise. * gnu/packages/gnome.scm (network-manager): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/linux.scm (alsa-plugins): Likewise. (powertop, wireless-regdb): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/polkit.scm (polkit): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/services/base.scm (file-systems->fstab): Likewise. * gnu/services/cups.scm (%cups-activation): Likewise. * gnu/services/mail.scm (%dovecot-activation): Likewise. * gnu/services/messaging.scm (prosody-configuration)[log]: Likewise. * gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise. * gnu/system/install.scm (installation-os)[file-systems]: Change root file system label to "Guix_image". * gnu/system/mapped-devices.scm (check-device-initrd-modules): Remove "GuixSD". * gnu/system/vm.scm (system-docker-image): Likewise. (system-disk-image)[root-label]: Change to "Guix_image". * gnu/tests/install.scm (run-install): Remove "GuixSD". * guix/modules.scm (guix-module-name?): Likewise. * nix/libstore/optimise-store.cc: Likewise.
* vm: Re-enable KVM on i386.Ludovic Courtès2018-12-19
| | | | | | | | The workaround is apparently no longer needed with Linux-libre 4.19.2 in the host. * gnu/build/vm.scm (load-in-linux-vm): Remove special case for "qemu-system-i386", thereby re-enabling KVM.
* vm: Add padding in the ISO image.Ludovic Courtès2018-12-06
| | | | | | | | Fixes <https://bugs.gnu.org/33639>. Thanks to Ricardo Wurmus and Thomas Schmitt for their suggestions! * gnu/build/vm.scm (make-iso9660-image): Pass "-padding 10m" to xorriso.
* pack: Import (guix store database) only when '--localstatedir' is passed.Ludovic Courtès2018-11-06
| | | | | | | | | | | | | This is another way to address <https://bugs.gnu.org/32184>, which was previously addressed in commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * gnu/build/install.scm (register-closure): Move to... * gnu/build/vm.scm (register-closure): ... here. New procedure. * guix/scripts/pack.scm (self-contained-tarball)[build]: Remove now unneeded 'with-extensions' form and custom (guix config) module. * tests/guix-pack.sh: Revert the strategy from commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * tests/pack.scm ("self-contained-tarball"): Likewise.
* vm: Disable KVM on i386.Ludovic Courtès2018-07-04
| | | | * gnu/build/vm.scm (load-in-linux-vm): Disable KVM on i386.
* vm: 'make-iso9660-image' makes 'grub.cfg' a GC root.Ludovic Courtès2018-06-26
| | | | | * gnu/build/vm.scm (make-iso9660-image): Add call to 'register-bootcfg-root'.
* vm: 'make-iso9660-image' no longer includes unreferenced store items.Ludovic Courtès2018-06-26
| | | | | | | 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=…".
* vm: Don't try to modify the bind-mounted store.Ludovic Courtès2018-06-26
| | | | | | | | | 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'.
* Remove 'guix-register' and its traces.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | * 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.
* install: Use 'reset-timestamps' from (guix store database).Ludovic Courtès2018-06-14
| | | | | * gnu/build/install.scm (reset-timestamps): Remove. * gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database).
* install: Use (guix store database) instead of 'guix-register'.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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).
* vm: Pass "panic=1" to Linux.Ludovic Courtès2018-05-25
| | | | * gnu/build/vm.scm (load-in-linux-vm): Always pass "panic=1" after '-append'.
* vm: Print the label and UUID of partitions.Ludovic Courtès2018-05-23
| | | | * gnu/build/vm.scm (create-ext-file-system): Print the label and UUID.
* gnu: When building in a VM, share a temporary directory.Chris Marusich2018-03-24
| | | | | | * 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.
* vm: Allow control of deduplication in root-partition-initializer.Chris Marusich2018-03-24
| | | | | * gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate? keyword argument.
* vm: Pass "-append ..." only once.Danny Milosavljevic2018-03-16
| | | | * gnu/build/vm.scm (load-in-linux-vm): Pass "-append ..." only once.
* vm: Use 'invoke' instead of 'system*'.Ludovic Courtès2018-03-15
| | | | | | | * 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 ...)).
* gnu: Consistently Write ‘file system(s)’.Tobias Geerinckx-Rice2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.Leo Famulari2017-12-18
| | | | | * gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci. * gnu/system/vm.scm (common-qemu-options): Likewise.
* vm: Adapt qemu command to ARM.Mathieu Othacehe2017-12-15
| | | | | | | | | | | * 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.
* vm: Use qemu drive device parameter.Mathieu Othacehe2017-12-13
| | | | | * gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive device.
* vm: ISO9660 images include /etc and other standard files.Ludovic Courtès2017-11-29
| | | | | | * 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.
* build: Do not store two copies of the ISO-9660 superblock anymore.Danny Milosavljevic2017-09-22
| | | | | * gnu/build/vm.scm (make-iso9660-image): Do not store two copies of the ISO-9660 superblock anymore.
* file-systems: Introduce (gnu system uuid).Ludovic Courtès2017-09-11
| | | | | | | | | | | | | | | * 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.
* vm: Allow partitions to be initialized with a given UUID.Ludovic Courtès2017-09-11
| | | | | | | | * 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.
* vm: Add comment about deduplication in make-iso9660-image.Christopher Baines2017-09-10
| | | | | * gnu/build/vm.scm (make-iso9660-image): Add comment about the use of #:deduplicate #f when calling register-closure.
* vm: Create /mnt in the generated ISO image in make-iso9660-image.Christopher Baines2017-09-06
| | | | | | | | 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.
* vm: Add support for registering closures to make-iso9660-image.Christopher Baines2017-09-06
| | | | | | | | 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.
* vm: 'iso9660-image' produces a single-file output.Ludovic Courtès2017-07-18
| | | | | | | | | * 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.
* vm: Increase disk size overhead estimate.Tobias Geerinckx-Rice2017-07-18
| | | | * gnu/build/vm.scm (estimated-partition-size): Add 25% to the graph size.
* build, vm: Use a less common label.Tobias Geerinckx-Rice2017-07-17
| | | | | | * 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.
* build: Make ISO-9660 image bootable from USB flash drive.Danny Milosavljevic2017-07-12
| | | | | * gnu/build/vm.scm (make-iso9660-image): Make image bootable from USB flash drive.
* build, vm: Use "GuixSD" or "GUIXSD" as volume label.Danny Milosavljevic2017-07-10
| | | | | | | | | * 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>
* build: Add (gnu build file-systems) import.Danny Milosavljevic2017-07-03
| | | | * gnu/build/vm.scm: Add (gnu build file-systems) import.
* build: Clarify error message when make-iso9660-image fails.Danny Milosavljevic2017-07-03
| | | | * gnu/build/vm.scm (make-iso9660-image): Clarify error message.
* build: Allow specifying volume-uuid with make-iso9660-image.Danny Milosavljevic2017-07-03
| | | | | * gnu/build/file-systems.scm (iso9660-uuid->string): Export. * gnu/build/vm.scm (make-iso9660-image): Add volume-uuid.
* build: Add iso9660 system image generator.Danny Milosavljevic2017-07-03
| | | | | | | * 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.
* vm: Use 'fold2' from (guix combinators).Ludovic Courtès2017-06-30
| | | | | * gnu/build/vm.scm: Use (guix combinators). (fold2): Remove.
* vm: Estimate the disk size by default.Ludovic Courtès2017-06-30
| | | | | | | | | | | | | | | * 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.
* vm: Display the disk and partition sizes.Ludovic Courtès2017-06-30
| | | | | | | * 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.
* vm: Fix 'load-in-linux-vm' docstring.Ludovic Courtès2017-06-30
| | | | | | * 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.
* vm: Add UEFI loader to disk images.Marius Bakke2017-05-19
| | | | | | * 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.
* vm: Support creating FAT partitions.Marius Bakke2017-05-19
| | | | | | | * 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.
* vm: Support arbitrary partition flags.Marius Bakke2017-05-19
| | | | | | | * 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.
* bootloader: Adapt vm to new bootloader API.Mathieu Othacehe2017-05-16
| | | | | | | | | | | | * 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.
* vm: Reword grub.cfg to bootcfg.Mathieu Othacehe2017-04-15
| | | | | | | | | | * 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>
* vm: Add missing module.Mathieu Othacehe2017-04-07
| | | | | | | | | | | | | | | | | | | * 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>
* vm: Avoid needless file copy in 'load-in-linux-vm'.Ludovic Courtès2016-11-28
| | | | | | | Reported by Chris Webber. * gnu/build/vm.scm (load-in-linux-vm)[image-file]: Remove. Directly refer to OUTPUT instead.
* vm: 'qemu-command' honors its argument.Ludovic Courtès2016-06-20
| | | | | * gnu/build/vm.scm (qemu-command): Refer to SYSTEM rather than %HOST-TYPE in the body.
* vm: Only pass "-enable-kvm" to qemu if /dev/kvm is present.Christopher Allan Webber2016-02-22
| | | | | | | | 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.