libkrun
libkrun copied to clipboard
Support non-TTY use cases
In its current form, the way in which stdin/stdout are tied to virtio-console only plays nice with interactive TTY-like sessions. This means, in may scenarios, libkrun-based VMMs can't be used from scripts.
We need to revamp the way in which stdin/stdout, virtio-console and init.c interact between them to also support non-TTY use cases. This means we need to:
- Stop tying the VM lifetime to the availability of stdin.
- Implement a handshake between virtio-console and init.c to ensure no bytes are lost while the VM is booting.
- Extend init.c so, when a non-TTY use case is detected, is kept alive acting as proxy between the app running in the VM and virtio-console.
This will fix #130 #97
I would like to give this a try
@jakecorrenti This should be mostly covered by https://github.com/containers/libkrun/pull/157, but it'd be nice confirming we aren't missing anything to cover this use case.