Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/kit/src/run_ephemeral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ pub struct RunEphemeralOpts {
#[clap(flatten)]
pub podman: CommonPodmanOptions,

/// Do not run the default entrypoint directly, but
/// instead invoke the provided command (e.g. `bash`).
#[clap(long)]
pub debug_entrypoint: Option<String>,

#[clap(
long = "bind",
value_name = "HOST_PATH[:NAME]",
Expand Down Expand Up @@ -520,7 +525,8 @@ fn prepare_run_command_with_temp(
cmd.args(["-e", &format!("BOOTC_DISK_FILES={}", disk_specs)]);
}

cmd.args([&opts.image, ENTRYPOINT]);
let entrypoint = opts.debug_entrypoint.as_deref().unwrap_or(ENTRYPOINT);
cmd.args([&opts.image, entrypoint]);

Ok((cmd, td))
}
Expand Down
1 change: 1 addition & 0 deletions crates/kit/src/to_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ pub fn run(opts: ToDiskOpts) -> Result<()> {
opts.additional.format.as_str()
)], // Attach target disk
kernel_args: Default::default(),
debug_entrypoint: None,
};

// Phase 5: SSH-based VM configuration and execution
Expand Down
4 changes: 4 additions & 0 deletions docs/src/man/bcvk-ephemeral-run-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ Run ephemeral VM and SSH into it

Set environment variables in the container (key=value)

**--debug-entrypoint**=*DEBUG_ENTRYPOINT*

Do not run the default entrypoint directly, but instead invoke the provided command (e.g. `bash`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It would be helpful to add a note here explaining that using --debug-entrypoint with run-ssh will cause the command to time out waiting for SSH. This is because this option prevents the VM from starting, so SSH will never become available. This will help users understand the expected behavior when using this debug flag.

Suggested change
Do not run the default entrypoint directly, but instead invoke the provided command (e.g. `bash`)
Do not run the default entrypoint directly, but instead invoke the provided command (e.g. `bash`). Note that using this option will prevent the VM from starting, and the `run-ssh` command will time out waiting for a connection.


**--bind**=*HOST_PATH[:NAME]*

Bind mount host directory (RW) at /run/virtiofs-mnt-<name>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/man/bcvk-ephemeral-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ This design allows bcvk to provide VM-like isolation and boot behavior while lev

Set environment variables in the container (key=value)

**--debug-entrypoint**=*DEBUG_ENTRYPOINT*

Do not run the default entrypoint directly, but instead invoke the provided command (e.g. `bash`)

**--bind**=*HOST_PATH[:NAME]*

Bind mount host directory (RW) at /run/virtiofs-mnt-<name>
Expand Down