me
/
guix
Archived
1
0
Fork 0

services: virtual-build-machine: Add ‘configuration’ action.

* gnu/services/virtualization.scm (build-vm-shepherd-services): Add
‘configuration’ action.
* doc/guix.texi (Virtualization Services): Document it.

Change-Id: I4734e096d744b3cda0d523692498a73c0029e188
master
Ludovic Courtès 2024-02-18 12:39:26 +01:00
parent cd0dc17e43
commit 1cff19d8d4
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 21 additions and 1 deletions

View File

@ -36396,7 +36396,11 @@ set to a date several years in the past, and on a CPU model that
corresponds to that date---a model possibly older than that of your
machine. This lets you rebuild today software from the past that would
otherwise fail to build due to a time trap or other issues in its build
process.
process. You can view the VM's config like this:
@example
herd configuration build-vm
@end example
You can configure the build VM, as in this example:

View File

@ -1342,6 +1342,22 @@ authpriv.*;auth.info /var/log/secure
(kill (- pid) SIGTERM)
(apply throw key args)))))))
(stop #~(make-kill-destructor))
(actions
(list (shepherd-action
(name 'configuration)
(documentation
"Display the configuration of this virtual build machine.")
(procedure
#~(lambda (_)
(format #t "CPU: ~a~%"
#$(virtual-build-machine-cpu config))
(format #t "number of CPU cores: ~a~%"
#$(virtual-build-machine-cpu-count config))
(format #t "memory size: ~a MiB~%"
#$(virtual-build-machine-memory-size config))
(format #t "initial date: ~a~%"
#$(date->string
(virtual-build-machine-date config))))))))
(auto-start? (virtual-build-machine-auto-start? config)))))
(define (authorize-guest-substitutes-on-host)