pub struct SandboxConfig {Show 13 fields
pub data_dir: Option<String>,
pub cpus: usize,
pub memory_mb: u64,
pub disk_size_mb: u64,
pub mounts: Vec<MountConfig>,
pub allow_net: bool,
pub secrets: HashMap<String, SecretConfig>,
pub allowed_hosts: Vec<String>,
pub ports: Vec<PortMapping>,
pub expose_host: Vec<ExposeHostMapping>,
pub from: Option<String>,
pub storage: StorageMode,
pub env: HashMap<String, String>,
}Expand description
Configuration for booting a sandbox VM.
Fields§
§data_dir: Option<String>Data directory containing kernel, rootfs, initramfs.
Defaults to ~/.hanzo/vm.
cpus: usizeNumber of CPUs. Default: 2.
memory_mb: u64Memory in MB. Default: 2048.
disk_size_mb: u64Disk size in MB. Default: 4096.
mounts: Vec<MountConfig>Host → guest directory mounts (VirtioFS).
allow_net: boolEnable networking via proxy.
secrets: HashMap<String, SecretConfig>Secrets for proxy injection.
allowed_hosts: Vec<String>Allowed domain patterns for network access.
ports: Vec<PortMapping>Port forwards (host → guest).
expose_host: Vec<ExposeHostMapping>Host ports exposed to the guest via host.vm.internal.
from: Option<String>Boot from a named checkpoint instead of base rootfs.
storage: StorageModeStorage backend mode. Default: Direct (flat file with CoW).
env: HashMap<String, String>Default environment variables for all commands. Merged with proxy placeholders; caller extra_env overrides both.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§impl Debug for SandboxConfig
impl Debug for SandboxConfig
Auto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnsafeUnpin for SandboxConfig
impl UnwindSafe for SandboxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more