-
-
Notifications
You must be signed in to change notification settings - Fork 143
Description
Issue
The cloud-hypervisor runner unconditionally sets --serial
and --console
.
Motivation
...but there are other values that could be useful (at least for myself)
--console <console>
Control (virtio) console: "off|null|pty|tty|file=</path/to/a/file>,iommu=on|off" [default: tty]
--serial <serial>
Control serial port: off|null|pty|tty|file=</path/to/a/file>|socket=</path/to/a/file> [default: null]
Also see the slow boot problem caused by the default --serial tty
in #366
Current behavior
If you try to set --serial
for example, you get the error:
$ nix run .#packages.x86_64-linux.cloud-hypervisor-example --show-trace
warning: Git tree '/home/ramblurr/src/microvm.nix' is dirty
error: the argument '--serial <serial>' cannot be used multiple times
Usage: microvm@cloud-hypervisor-microvm [OPTIONS]
For more information, try '--help'.
Possible solutions
I understand the goal not to have an additional nixos module option for every single CLI flag for the VMMs, that would just get out of hand.
I think a good solution is to detect if the user passed a flag in the extraArgs
list, and if so, do not add the default that microvm otherwise would.
This is easy to implement now using the extractOptValues
function I implemented over in #336
If you approve this, then I can prepare a PR that does exactly that.
A PR for this is over in #377 so you can see exactly what this looks like.