diff --git a/crates/kit/scripts/entrypoint.sh b/crates/kit/scripts/entrypoint.sh index 06474ff2f..ecb8094a8 100644 --- a/crates/kit/scripts/entrypoint.sh +++ b/crates/kit/scripts/entrypoint.sh @@ -67,7 +67,9 @@ trap 'kill -TERM $BWRAP_PID 2>/dev/null; exit 0' INT TERM # Run bwrap in background so we can handle signals; xref # https://github.com/containers/bubblewrap/pull/586 # But probably really we should switch to systemd -bwrap --as-pid-1 --unshare-pid "${BWRAP_ARGS[@]}" --bind /run /run -- ${SELFEXE} container-entrypoint "$@" & +# Bash normally gives a background command /dev/null on stdin, so +# keep stdin attached so QEMU can receive input. +bwrap --as-pid-1 --unshare-pid "${BWRAP_ARGS[@]}" --bind /run /run -- ${SELFEXE} container-entrypoint "$@" <&0 & BWRAP_PID=$! # Wait for bwrap to complete diff --git a/docs/src/man/bcvk-ephemeral-run.md b/docs/src/man/bcvk-ephemeral-run.md index 7de1c3e04..a00a264d9 100644 --- a/docs/src/man/bcvk-ephemeral-run.md +++ b/docs/src/man/bcvk-ephemeral-run.md @@ -67,6 +67,7 @@ This design allows bcvk to provide VM-like isolation and boot behavior while lev **--console** Connect the QEMU console to the container's stdio (visible via podman logs/attach) + Add **-i -t** to send keyboard input to the guest console. **--debug** @@ -216,7 +217,7 @@ run and SSH into one command with automatic cleanup. **Debugging boot issues**: - bcvk ephemeral run --console --name debugvm localhost/mybootc + bcvk ephemeral run --console -it --name debugvm localhost/mybootc ## Understanding the Flags