Skip to content

Commit

Permalink
firecracker: add warning for volume serial and direct config
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Nov 20, 2024
1 parent 117112c commit 1965077
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/runners/firecracker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ let
is_root_device = false;
is_read_only = true;
io_engine = "Async";
} ] ++ map ({ image, ... }: {
drive_id = image;
path_on_host = image;
is_root_device = false;
is_read_only = false;
io_engine = "Async";
}) volumes;
} ] ++ map ({ image, serial, direct, ... }:
lib.warnIf (serial != null) ''
Volume serial is not supported for firecracker
''
lib.warnIf direct ''
Volume direct IO is not supported for firecracker
'' {
drive_id = image;
path_on_host = image;
is_root_device = false;
is_read_only = false;
io_engine = "Async";
}) volumes;
network-interfaces = map ({ type, id, mac, ... }:
if type == "tap"
then {
Expand Down

0 comments on commit 1965077

Please sign in to comment.