summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
authorAttila Lendvai <attila@lendvai.name>2021-12-02 20:18:56 +0100
committerMathieu Othacehe <othacehe@gnu.org>2021-12-03 14:18:32 +0100
commitb42bfbdfe55eea56234a91c33ef12b9fe198766d (patch)
treeae145a5b85512783bc075157abf47cb641165349 /gnu/system/vm.scm
parent5a18cf360454bef20f00facb51b45daabe31dad2 (diff)
guix system vm: Add --no-graphic CLI argument.
It configures QEMU to use the tty it was started in for IO (as opposed to opening a separate graphical window). This enables copy-pasting and scrollback. Exit QEMU with C-a x. * gnu/system/vm.scm (system-qemu-image/shared-store-script): Also add the '-nographic' QEMU argument when called with #:graphic? #false. * guix/scripts/system.scm (system-derivation-for-action): Propagate the #:graphic? keyword arg. (perform-action): Add and propagate the #:graphic? keyword arg. (show-help): Add --no-graphic CLI arg. (%options): Process the new --no-graphic CLI arg. (process-action): Feed in the CLI arg through the #:graphic? keyword arg. * doc/guix.texi (Invoking guix system): Add example to combine guix system and invoking the vm start script into one command. Split the description of the various options into separate paragraphs. Add a paragraph to describe --no-graphic. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 1e2d8b47c2..0a95302584 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -754,6 +754,8 @@ it is mostly useful when FULL-BOOT? is true."
(define qemu-exec
#~(list #+(file-append qemu "/bin/"
(qemu-command (or target system)))
+ ;; Tells qemu to use the terminal it was started in for IO.
+ #$@(if graphic? '() #~("-nographic"))
#$@(if full-boot?
#~()
#~("-kernel" #$(operating-system-kernel-file os)