Skip to content

Commit a8a6474

Browse files
committed
stratovirt: always run in a fake tty
1 parent 94b93a1 commit a8a6474

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/runners/stratovirt.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ let
6767
in {
6868
inherit tapMultiQueue;
6969

70-
command = lib.escapeShellArgs (
71-
[
70+
# `-serial stdio' panics if not running in a tty, so fake one with
71+
# `script'.
72+
command = lib.escapeShellArgs [
73+
"${pkgs.util-linux}/bin/script" "-qfec"
74+
75+
(lib.escapeShellArgs ([
7276
"${pkgs.stratovirt}/bin/stratovirt"
7377
"-name" hostName
7478
"-machine" machine
@@ -153,8 +157,8 @@ in {
153157
lib.optionals (lib.hasPrefix "q35" machine) [
154158
"-drive" "file=${pkgs.OVMF.fd}/FV/OVMF_CODE.fd,if=pflash,unit=0,readonly=true"
155159
"-drive" "file=${pkgs.OVMF.fd}/FV/OVMF_VARS.fd,if=pflash,unit=1,readonly=true"
156-
]
157-
);
160+
]))
161+
];
158162

159163
# Not supported for the `microvm` machine model
160164
canShutdown = false;

0 commit comments

Comments
 (0)