diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-11-17 14:09:57 -0500 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-11-17 15:20:03 -0500 |
| commit | 19d4693939322e7e59bb33c0af3e202bd4027092 (patch) | |
| tree | 28f5f27c11bd1f3304424aed0335e5cbd89ae427 /gnu/system | |
| parent | 41f27bf8702838f19b1dc5ffee8eec1d4315d4e6 (diff) | |
system: vm: Remove unused system-disk-image-in-vm.
* gnu/system/vm.scm (system-disk-image-in-vm): Remove.
Reported-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/vm.scm | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 07a59a3cd2a..1afae6b4edf 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm | |||
| @@ -77,7 +77,6 @@ | |||
| 77 | 77 | ||
| 78 | system-qemu-image/shared-store | 78 | system-qemu-image/shared-store |
| 79 | system-qemu-image/shared-store-script | 79 | system-qemu-image/shared-store-script |
| 80 | system-disk-image-in-vm | ||
| 81 | system-docker-image | 80 | system-docker-image |
| 82 | 81 | ||
| 83 | virtual-machine | 82 | virtual-machine |
| @@ -563,77 +562,6 @@ the operating system." | |||
| 563 | ;;; VM and disk images. | 562 | ;;; VM and disk images. |
| 564 | ;;; | 563 | ;;; |
| 565 | 564 | ||
| 566 | (define* (system-disk-image-in-vm os | ||
| 567 | #:key | ||
| 568 | (name "disk-image") | ||
| 569 | (file-system-type "ext4") | ||
| 570 | (disk-image-size (* 900 (expt 2 20))) | ||
| 571 | (volatile? #t) | ||
| 572 | (substitutable? #t)) | ||
| 573 | "Return the derivation of a disk image of DISK-IMAGE-SIZE bytes of the | ||
| 574 | system described by OS. Said image can be copied on a USB stick as is. When | ||
| 575 | VOLATILE? is true, the root file system is made volatile; this is useful | ||
| 576 | to USB sticks meant to be read-only. | ||
| 577 | |||
| 578 | SUBSTITUTABLE? determines whether the returned derivation should be marked as | ||
| 579 | substitutable." | ||
| 580 | (define root-label | ||
| 581 | "Guix_image") | ||
| 582 | |||
| 583 | (define (root-uuid os) | ||
| 584 | ;; UUID of the root file system, computed in a deterministic fashion. | ||
| 585 | ;; This is what we use to locate the root file system so it has to be | ||
| 586 | ;; different from the user's own file system UUIDs. | ||
| 587 | (operating-system-uuid os 'dce)) | ||
| 588 | |||
| 589 | (define file-systems-to-keep | ||
| 590 | (remove (lambda (fs) | ||
| 591 | (string=? (file-system-mount-point fs) "/")) | ||
| 592 | (operating-system-file-systems os))) | ||
| 593 | |||
| 594 | (let* ((os (operating-system (inherit os) | ||
| 595 | ;; Since this is meant to be used on real hardware, don't | ||
| 596 | ;; install QEMU networking or anything like that. Assume USB | ||
| 597 | ;; mass storage devices (usb-storage.ko) are available. | ||
| 598 | (initrd (lambda (file-systems . rest) | ||
| 599 | (apply (operating-system-initrd os) | ||
| 600 | file-systems | ||
| 601 | #:volatile-root? volatile? | ||
| 602 | rest))) | ||
| 603 | |||
| 604 | (bootloader (operating-system-bootloader os)) | ||
| 605 | |||
| 606 | ;; Force our own root file system. (We need a "/" file system | ||
| 607 | ;; to call 'root-uuid'.) | ||
| 608 | (file-systems (cons (file-system | ||
| 609 | (mount-point "/") | ||
| 610 | (device "/dev/placeholder") | ||
| 611 | (type file-system-type)) | ||
| 612 | file-systems-to-keep)))) | ||
| 613 | (uuid (root-uuid os)) | ||
| 614 | (os (operating-system | ||
| 615 | (inherit os) | ||
| 616 | (file-systems (cons (file-system | ||
| 617 | (mount-point "/") | ||
| 618 | (device uuid) | ||
| 619 | (type file-system-type)) | ||
| 620 | file-systems-to-keep)))) | ||
| 621 | (bootcfg (operating-system-bootcfg os))) | ||
| 622 | (qemu-image #:name name | ||
| 623 | #:os os | ||
| 624 | #:bootcfg-drv bootcfg | ||
| 625 | #:bootloader (bootloader-configuration-bootloader | ||
| 626 | (operating-system-bootloader os)) | ||
| 627 | #:disk-image-size disk-image-size | ||
| 628 | #:disk-image-format "raw" | ||
| 629 | #:file-system-type file-system-type | ||
| 630 | #:file-system-label root-label | ||
| 631 | #:file-system-uuid uuid | ||
| 632 | #:copy-inputs? #t | ||
| 633 | #:inputs `(("system" ,os) | ||
| 634 | ("bootcfg" ,bootcfg)) | ||
| 635 | #:substitutable? substitutable?))) | ||
| 636 | |||
| 637 | (define* (system-qemu-image os | 565 | (define* (system-qemu-image os |
| 638 | #:key | 566 | #:key |
| 639 | (file-system-type "ext4") | 567 | (file-system-type "ext4") |
