diff --git a/src/qemu.rs b/src/qemu.rs index d5b256f..1dade93 100644 --- a/src/qemu.rs +++ b/src/qemu.rs @@ -24,6 +24,10 @@ pub struct BootCmd { #[clap(long)] forward: Vec, + /// Pass a `guestfwd=...` argument to qemu `-nic` argument. + #[clap(long)] + guestfwd: Vec, + /// Override the command to exec in the VM (base64-encoded on the kernel /// cmdline as `boco.cmd=`). Overrides the CMD inferred at build time. #[clap(long)] @@ -49,6 +53,7 @@ pub(crate) fn boot( name, memory, forward, + guestfwd, cmd, mount, extra, @@ -153,6 +158,9 @@ pub(crate) fn boot( for forward in &forward { _ = write!(&mut network, ",hostfwd={forward}"); } + for guestfwd in &guestfwd { + _ = write!(&mut network, ",guestfwd={guestfwd}"); + } let mut command = Command::new("qemu-system-x86_64");