From ee2a5da80a9bda25542c00a7a35a9ddddcbd58af Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 19 Jan 2021 18:09:28 +0100 Subject: scripts: system: Remove 'vm-image' command. Remove the 'vm-image' command that has been superseded by the 'image' command. * gnu/system/vm.scm (system-qemu-image): Remove it. * guix/scripts/system.scm (system-derivation-for-action): Mark 'vm-image' command as deprecated and use the image API to produce the VM image. (perform-action, show-help): Adapt accordingly. * tests/guix-system.sh: Ditto. * doc/guix.texi (Invoking guix system, Running Guix in a VM): Ditto. * etc/completion/fish/guix.fish: Ditto. * etc/completion/zsh/_guix: Ditto. --- gnu/system/vm.scm | 63 ------------------------------------------------------- 1 file changed, 63 deletions(-) (limited to 'gnu/system/vm.scm') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 1afae6b4ed..d7ae048b81 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -73,7 +73,6 @@ (define-module (gnu system vm) #:export (expression->derivation-in-linux-vm qemu-image virtualized-operating-system - system-qemu-image system-qemu-image/shared-store system-qemu-image/shared-store-script @@ -557,68 +556,6 @@ (define build #:single-file-output? #t #:references-graphs `((,graph ,os))))) - -;;; -;;; VM and disk images. -;;; - -(define* (system-qemu-image os - #:key - (file-system-type "ext4") - (disk-image-size (* 900 (expt 2 20)))) - "Return the derivation of a freestanding QEMU image of DISK-IMAGE-SIZE bytes -of the GNU system as described by OS." - (define file-systems-to-keep - ;; Keep only file systems other than root and not normally bound to real - ;; devices. - (remove (lambda (fs) - (let ((target (file-system-mount-point fs)) - (source (file-system-device fs))) - (or (string=? target "/") - (and (string? source) - (string-prefix? "/dev/" source)) - (uuid? source) - (file-system-label? source)))) - (operating-system-file-systems os))) - - (define root-uuid - ;; UUID of the root file system. - (operating-system-uuid os - (if (string=? file-system-type "iso9660") - 'iso9660 - 'dce))) - - - (let* ((os (operating-system - (inherit os) - - ;; As in 'virtualized-operating-system', use BIOS-style GRUB. - (bootloader (bootloader-configuration - (bootloader grub-bootloader) - (target "/dev/vda"))) - - ;; Assume we have an initrd with the whole QEMU shebang. - - ;; Force our own root file system. Refer to it by UUID so that - ;; it works regardless of how the image is used ("qemu -hda", - ;; Xen, etc.). - (file-systems (cons (file-system - (mount-point "/") - (device root-uuid) - (type file-system-type)) - file-systems-to-keep)))) - (bootcfg (operating-system-bootcfg os))) - (qemu-image #:os os - #:bootcfg-drv bootcfg - #:bootloader (bootloader-configuration-bootloader - (operating-system-bootloader os)) - #:disk-image-size disk-image-size - #:file-system-type file-system-type - #:file-system-uuid root-uuid - #:inputs `(("system" ,os) - ("bootcfg" ,bootcfg)) - #:copy-inputs? #t))) - ;;; ;;; VMs that share file systems with the host. -- cgit v1.2.3 From 60fd4118f7f01ac88bae1b44811afb34ea565685 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 25 Feb 2021 11:25:57 +0100 Subject: system: vm: Use Guile 3.0 in Docker images. * gnu/system/vm.scm (system-docker-image): Use GUILE-3.0. --- gnu/system/vm.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/system/vm.scm') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index d7ae048b81..3d0935b3af 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2016 Christopher Allan Webber ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Mathieu Othacehe @@ -480,7 +480,7 @@ (define boot-program (program-file "boot-program" #~(let ((system (cadr (command-line)))) (setenv "GUIX_NEW_SYSTEM" system) - (execl #$(file-append guile-2.2 "/bin/guile") + (execl #$(file-append guile-3.0 "/bin/guile") "guile" "--no-auto-compile" (string-append system "/boot"))))) -- cgit v1.2.3