Add --guestfwd arg to boco boot
CI / build (push) Successful in 14s

This commit is contained in:
hulthe committed 2026-10-27 12:45:11 +01:00
1 parent 3eb5cd434c
commit 27b18a778e
1 file changed
+8
+8
View File
@@ -24,6 +24,10 @@ pub struct BootCmd {
#[clap(long)] #[clap(long)]
forward: Vec<PortForward>, forward: Vec<PortForward>,
/// Pass a `guestfwd=...` argument to qemu `-nic` argument.
#[clap(long)]
guestfwd: Vec<String>,
/// Override the command to exec in the VM (base64-encoded on the kernel /// Override the command to exec in the VM (base64-encoded on the kernel
/// cmdline as `boco.cmd=<b64>`). Overrides the CMD inferred at build time. /// cmdline as `boco.cmd=<b64>`). Overrides the CMD inferred at build time.
#[clap(long)] #[clap(long)]
@@ -49,6 +53,7 @@ pub(crate) fn boot(
name, name,
memory, memory,
forward, forward,
guestfwd,
cmd, cmd,
mount, mount,
extra, extra,
@@ -153,6 +158,9 @@ pub(crate) fn boot(
for forward in &forward { for forward in &forward {
_ = write!(&mut network, ",hostfwd={forward}"); _ = write!(&mut network, ",hostfwd={forward}");
} }
for guestfwd in &guestfwd {
_ = write!(&mut network, ",guestfwd={guestfwd}");
}
let mut command = Command::new("qemu-system-x86_64"); let mut command = Command::new("qemu-system-x86_64");