diff --git a/crates/vm-manager/src/backends/mod.rs b/crates/vm-manager/src/backends/mod.rs index 0a6f186..6a2a6d2 100644 --- a/crates/vm-manager/src/backends/mod.rs +++ b/crates/vm-manager/src/backends/mod.rs @@ -30,11 +30,21 @@ impl RouterHypervisor { /// On illumos, creates a PropolisBackend with the given ZFS pool. #[allow(unused_variables)] pub fn new(bridge: Option, zfs_pool: Option) -> Self { + Self::with_data_dir(bridge, zfs_pool, None) + } + + /// Build a router with a custom data directory for VM work files. + #[allow(unused_variables)] + pub fn with_data_dir( + bridge: Option, + zfs_pool: Option, + data_dir: Option, + ) -> Self { #[cfg(target_os = "linux")] { RouterHypervisor { noop: noop::NoopBackend, - qemu: Some(qemu::QemuBackend::new(None, None, bridge)), + qemu: Some(qemu::QemuBackend::new(None, data_dir, bridge)), } } #[cfg(target_os = "illumos")]