BCVK-EPHEMERAL-RUN-SSH(8)
π bcvk-ephemeral-run-ssh(8) π
okay bestie, welcome to the section 8 manual page for bcvk-ephemeral-run-ssh β the little command that boots a whole ephemeral VM and drops you straight into an SSH session like it's nothing π¦
β¨ SYNOPSIS β¨
bcvk ephemeral run-ssh [OPTIONS] IMAGE [SSH_ARGS]
πΈ DESCRIPTION πΈ
So here's the vibe: you take a bootc container, you run it as an ephemeral VM, and the moment it's up you're SSH'd into it. No cap. And the second your SSH session ends? The VM gets stopped and cleaned up automatically. It's giving responsible. It's giving self-cleaning. We love her π
This is the recommended command for quick testing and iteration, fr fr. It's basically bcvk ephemeral run and bcvk ephemeral ssh fused into one single command with automatic lifecycle management, and honestly? iconic.
π Lifecycle Behavior π
Okay so listen β this is NOT the same as bcvk ephemeral run -d. That one starts a background VM that just... persists. Forever. Until you explicitly stop it. Meanwhile run-ssh ties the VM's whole lifecycle to your SSH session, like a bestie who leaves the party when you leave the party π«Ά
Here's the order of operations:
- VM boots and waits for SSH to become available
- SSH session is established
- When you exit the SSH session (or the connection drops), the VM is stopped
- The container is automatically removed
So run-ssh is ideal for:
- Quick one-off testing of container images
- Rapid build-test iteration cycles
- Running a single command in a VM environment
- Demos and exploration
But if you need a longer-running VM where you reconnect multiple times? Different beast, bestie. Use bcvk ephemeral run -d --rm -K instead.
π OPTIONS π
IMAGEβ the container image you're running as an ephemeral VM. This argument is required, no skipping it πSSH_ARGSβ the SSH command to execute. Optional! Defaults to an interactive shell if you don't say anything.--itype=ITYPEβ instance type, likeu1.nano,u1.small,u1.medium. Heads up: this overridesvcpus/memoryif you specify it.--memory=MEMORYβ memory size, e.g.4G,2048M, or just a plain number for MB. Default:4G--vcpus=VCPUSβ number of vCPUs. (Gets overridden by--itypeif you specified that.)--consoleβ connect the QEMU console to the container's stdio (you can see it viapodman logs/attach)--debugβ enable debug mode, which drops you to a shell instead of running QEMU--virtio-serial-out=NAME:FILEβ add a virtio-serial device with output to a file (format:name:/path/to/file)--execute=EXECUTEβ execute a command inside the VM via systemd and capture the output-K,--ssh-keygenβ generate an SSH keypair and inject it via systemd credentials β¨--virtiofsd=VIRTIOFSD_BINARYβ path to thevirtiofsdbinary (this overrides auto-detection)--output=OUTPUTβ select how VM output is presented
Possible values:
consolejournal
Default: console
--log-dir=STREAMS=DIRβ write VM log streams to files in DIR-t,--ttyβ allocate a pseudo-TTY for the container-i,--interactiveβ keep STDIN open for the container-d,--detachβ run the container in the background--rmβ automatically remove the container when it exits--name=NAMEβ assign a name to the container--network=NETWORKβ configure the network for the container--label=LABELβ add metadata to the container inkey=valueform-e,--env=ENVβ 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 a host directory (RW) at/run/virtiofs-mnt-<name>--ro-bind=HOST_PATH[:NAME]β bind mount a host directory (RO) at/run/virtiofs-mnt-<name>--systemd-units=SYSTEMD_UNITS_DIRβ directory with systemd units to inject (it expects asystem/subdirectory)--bind-storage-roβ mount host container storage (RO) at/run/virtiofs-mnt-hoststorage--add-swap=ADD_SWAPβ allocate a swap device of the provided size--mount-disk-file=FILE[:NAME]β mount a disk file as a virtio-blk device at/dev/disk/by-id/virtio-<name>--karg=KERNEL_ARGSβ additional kernel command line arguments--ignition=IGNITION_CONFIGβ path to an Ignition config file (JSON format) to inject viafw_cfg
π EXAMPLES π
π Basic Usage
Test a public bootc image:
bcvk ephemeral run-ssh quay.io/fedora/fedora-bootc:42
Test a CentOS bootc image:
bcvk ephemeral run-ssh quay.io/centos-bootc/centos-bootc:stream10
π§ Build and Test Workflow
The most common development pattern is building and then immediately testing, obviously:
# Build your container
podman build -t localhost/mybootc .
# Boot it and SSH in (auto-cleanup on exit)
bcvk ephemeral run-ssh localhost/mybootc
And for rapid iteration, just combine it all in one command, chef's kiss:
podman build -t localhost/mybootc . && bcvk ephemeral run-ssh localhost/mybootc
β Running Commands
Execute a specific command and exit:
bcvk ephemeral run-ssh localhost/mybootc 'systemctl status'
Check what services are running:
bcvk ephemeral run-ssh localhost/mybootc 'systemctl list-units --type=service --state=running'
Verify your custom configuration:
bcvk ephemeral run-ssh localhost/mybootc 'cat /etc/myapp/config.yaml'
π₯ Resource Allocation
For memory-intensive testing:
bcvk ephemeral run-ssh --memory 8G --vcpus 4 localhost/mybootc
Using instance types:
bcvk ephemeral run-ssh --itype u1.medium localhost/mybootc
π¦ With Bind Mounts
Mount source code for testing:
bcvk ephemeral run-ssh --bind /home/user/project:src localhost/mybootc
# Inside VM: ls /run/virtiofs-mnt-src
π Debugging
Enable console output to see boot messages:
bcvk ephemeral run-ssh --console localhost/mybootc
π TIPS π
- Fast iteration: keep your container builds small and layered so rebuilds are faster. The VM boots in seconds, so the container build is usually the bottleneck, ngl.
- SSH arguments: any arguments after the image name get passed to SSH. Use this for commands, port forwarding, or SSH options.
- Exit cleanly: use
exitor Ctrl+D to cleanly end the SSH session and trigger VM cleanup.
β οΈ Careful bestie: Ctrl+C may not clean up properly. Exit the nice way, okay? π
π SEE ALSO π
bcvk(8), bcvk-ephemeral(8), bcvk-ephemeral-run(8), bcvk-ephemeral-ssh(8)
π VERSION π
v0.21.0
and that's the whole page, bestie π this is bcvk-ephemeral-run-ssh(8) from v0.21.0 β go forth, boot ephemeral VMs, and clean up after yourself like the main character you are. periodt πβ¨
π¦ where this page comes from
- fedora 43: bcvk 0.21.0-1.fc43 Β· Apache-2.0 OR MIT
- fedora 44: bcvk 0.21.0-1.fc44 Β· Apache-2.0 OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms