Skip to content

Commit e3e2220

Browse files
Merge pull request #433 from bjackman/firecracker-driveioengine
firecracker: Add option to set up io_engine for drives
2 parents fa89701 + 617713d commit e3e2220

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/runners/firecracker.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let
3838
path_on_host = storeDisk;
3939
is_root_device = false;
4040
is_read_only = true;
41-
io_engine = "Async";
41+
io_engine = microvmConfig.firecracker.driveIoEngine;
4242
} ] ++ map ({ image, serial, direct, readOnly, ... }:
4343
lib.warnIf (serial != null) ''
4444
Volume serial is not supported for firecracker
@@ -50,7 +50,7 @@ let
5050
path_on_host = image;
5151
is_root_device = false;
5252
is_read_only = readOnly;
53-
io_engine = "Async";
53+
io_engine = microvmConfig.firecracker.driveIoEngine;
5454
}) volumes;
5555
network-interfaces = map ({ type, id, mac, ... }:
5656
if type == "tap"

nixos-modules/microvm/options.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ in
590590
description = "Custom CPU template passed to firecracker.";
591591
};
592592

593+
firecracker.driveIoEngine = mkOption {
594+
type = types.enum [ "Async" "Sync" ];
595+
default = "Async";
596+
description = "Type of IO engine to use for Firecracker drives (disks).";
597+
};
598+
593599
prettyProcnames = mkOption {
594600
type = types.bool;
595601
default = true;

0 commit comments

Comments
 (0)