libkrun icon indicating copy to clipboard operation
libkrun copied to clipboard

Support non-TTY use cases

Open slp opened this issue 2 years ago • 2 comments

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

slp avatar Mar 31 '23 09:03 slp

I would like to give this a try

jakecorrenti avatar Aug 02 '24 01:08 jakecorrenti

@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.

slp avatar Aug 05 '24 08:08 slp