@@ -754,6 +754,8 @@ (define kernel-arguments
(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)
@@ -689,6 +689,7 @@ (define file-systems
(define* (system-derivation-for-action image action
#:key
full-boot?
+ (graphic? #t)
container-shared-network?
mappings)
"Return as a monadic value the derivation for IMAGE according to ACTION."
@@ -706,6 +707,7 @@ (define* (system-derivation-for-action image action
((vm)
(system-qemu-image/shared-store-script os
#:full-boot? full-boot?
+ #:graphic? graphic?
#:disk-image-size
(if full-boot?
image-size
@@ -772,6 +774,7 @@ (define* (perform-action action image
dry-run? derivations-only?
use-substitutes? target
full-boot?
+ (graphic? #t)
container-shared-network?
(mappings '())
(gc-root #f))
@@ -825,6 +828,7 @@ (define bootcfg
(mlet* %store-monad
((sys (system-derivation-for-action image action
#:full-boot? full-boot?
+ #:graphic? graphic?
#:container-shared-network? container-shared-network?
#:mappings mappings))
@@ -1012,6 +1016,8 @@ (define (show-help)
register it as a garbage collector root"))
(display (G_ "
--full-boot for 'vm', make a full boot sequence"))
+ (display (G_ "
+ --no-graphic for 'vm', use the tty that we are started in for IO"))
(display (G_ "
--skip-checks skip file system and initrd module safety checks"))
(display (G_ "
@@ -1081,6 +1087,9 @@ (define %options
(option '("full-boot") #f #f
(lambda (opt name arg result)
(alist-cons 'full-boot? #t result)))
+ (option '("no-graphic") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'no-graphic? #t result)))
(option '("save-provenance") #f #f
(lambda (opt name arg result)
(alist-cons 'save-provenance? #t result)))
@@ -1266,6 +1275,7 @@ (define (graph-backend)
#:validate-reconfigure
(assoc-ref opts 'validate-reconfigure)
#:full-boot? (assoc-ref opts 'full-boot?)
+ #:graphic? (if (assoc-ref opts 'no-graphic?) #f #t)
#:container-shared-network?
(assoc-ref opts 'container-shared-network?)
#:mappings (filter-map (match-lambda