pub struct InstanceSpec {Show 16 fields
pub box_id: String,
pub vcpus: u8,
pub memory_mib: u32,
pub rootfs_path: PathBuf,
pub exec_socket_path: PathBuf,
pub pty_socket_path: PathBuf,
pub attest_socket_path: PathBuf,
pub fs_mounts: Vec<FsMount>,
pub entrypoint: Entrypoint,
pub console_output: Option<PathBuf>,
pub workdir: String,
pub tee_config: Option<TeeInstanceConfig>,
pub port_map: Vec<String>,
pub user: Option<String>,
pub network: Option<NetworkInstanceConfig>,
pub resource_limits: ResourceLimits,
}Expand description
Complete configuration for a VM instance.
Serialized and passed to the shim subprocess, which uses it to configure and start the VM via the underlying hypervisor.
Fields§
§box_id: StringUnique identifier for this box instance
vcpus: u8Number of vCPUs (default: 2)
memory_mib: u32Memory in MiB (default: 512)
rootfs_path: PathBufPath to the root filesystem
exec_socket_path: PathBufPath to the Unix socket for exec communication
pty_socket_path: PathBufPath to the Unix socket for PTY communication
attest_socket_path: PathBufPath to the Unix socket for TEE attestation communication
fs_mounts: Vec<FsMount>Filesystem mounts (virtio-fs shares)
entrypoint: EntrypointGuest agent entrypoint
console_output: Option<PathBuf>Optional console output file path
workdir: StringWorking directory inside the VM
tee_config: Option<TeeInstanceConfig>TEE configuration (None for standard VM)
port_map: Vec<String>TSI port mappings: [“host_port:guest_port”, …]
user: Option<String>User to run as inside the VM (from OCI USER directive). Format: “uid”, “uid:gid”, “user”, or “user:group”
network: Option<NetworkInstanceConfig>Network configuration for passt-based networking. None = TSI mode (default), Some = passt virtio-net mode.
resource_limits: ResourceLimitsResource limits (PID limits, CPU pinning, ulimits, cgroup controls).
Trait Implementations§
Source§impl Clone for InstanceSpec
impl Clone for InstanceSpec
Source§fn clone(&self) -> InstanceSpec
fn clone(&self) -> InstanceSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more