diff --git a/.gitignore b/.gitignore index 9f970225a..606639ec7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -target/ \ No newline at end of file +target/ +.flox diff --git a/crates/bcvk-qemu/src/virtiofsd.rs b/crates/bcvk-qemu/src/virtiofsd.rs index c993b1f55..a4ff848b0 100644 --- a/crates/bcvk-qemu/src/virtiofsd.rs +++ b/crates/bcvk-qemu/src/virtiofsd.rs @@ -21,6 +21,8 @@ pub struct VirtiofsConfig { pub readonly: bool, /// Optional log file path for virtiofsd output. pub log_file: Option, + /// Optional explicit path to virtiofsd binary (overrides auto-detection). + pub virtiofsd_binary: Option, } impl Default for VirtiofsConfig { @@ -32,6 +34,7 @@ impl Default for VirtiofsConfig { // We don't need to write to this, there's a transient overlay readonly: true, log_file: None, + virtiofsd_binary: None, } } } @@ -61,32 +64,42 @@ pub async fn spawn_virtiofsd_async(config: &VirtiofsConfig) -> Result Result, } impl CommonVmOpts { @@ -1171,6 +1178,7 @@ pub(crate) async fn run_impl(opts: RunEphemeralOpts) -> Result<()> { debug: false, readonly: is_readonly, log_file: Some(format!("/run/virtiofsd-{}.log", mount_name_str).into()), + virtiofsd_binary: opts.common.virtiofsd_binary.as_deref().map(Into::into), }; additional_mounts.push((virtiofsd_config, tag.clone())); @@ -1329,6 +1337,7 @@ StandardOutput=file:/dev/virtio-ports/executestatus main_virtiofsd_config.debug = std::env::var("DEBUG_MODE").is_ok(); // Always log virtiofsd output for debugging main_virtiofsd_config.log_file = Some("/run/virtiofsd.log".into()); + main_virtiofsd_config.virtiofsd_binary = opts.common.virtiofsd_binary.as_deref().map(Into::into); std::fs::create_dir_all(CONTAINER_STATEDIR)?;