MirageOS add custom commandline arguments for mirage configure via config.ml?


Is it possible to add custom options so values can be passed during mirage configure?

Similar to how having default_network in config.ml enables --ipv4 and --ipv4-gateway options.

Many thanks!

Yes, these are called “keys” in MirageOS terms.

See the hello key example to see how to define these. Once this is define, mirage configure --help and the generated binary will show these options. You can access these at runtime using the Key_gen auto-generated module.

1 Like


I did feel like I’ve seen them at some point but forgot what they are called. Thanks very much!