Skip to content

Commit 1965077

Browse files
committed
firecracker: add warning for volume serial and direct config
1 parent 117112c commit 1965077

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

lib/runners/firecracker.nix

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ let
3737
is_root_device = false;
3838
is_read_only = true;
3939
io_engine = "Async";
40-
} ] ++ map ({ image, ... }: {
41-
drive_id = image;
42-
path_on_host = image;
43-
is_root_device = false;
44-
is_read_only = false;
45-
io_engine = "Async";
46-
}) volumes;
40+
} ] ++ map ({ image, serial, direct, ... }:
41+
lib.warnIf (serial != null) ''
42+
Volume serial is not supported for firecracker
43+
''
44+
lib.warnIf direct ''
45+
Volume direct IO is not supported for firecracker
46+
'' {
47+
drive_id = image;
48+
path_on_host = image;
49+
is_root_device = false;
50+
is_read_only = false;
51+
io_engine = "Async";
52+
}) volumes;
4753
network-interfaces = map ({ type, id, mac, ... }:
4854
if type == "tap"
4955
then {

0 commit comments

Comments
 (0)