pub struct VmConfig {
pub vcpu_count: u32,
pub memory_size: u64,
pub arch: CpuArch,
pub kernel_path: Option<String>,
pub kernel_cmdline: Option<String>,
pub initrd_path: Option<String>,
pub enable_rosetta: bool,
pub nested_virt: bool,
}Expand description
Virtual machine configuration.
Fields§
§vcpu_count: u32Number of virtual CPUs.
memory_size: u64Memory size in bytes.
arch: CpuArchCPU architecture (defaults to native).
kernel_path: Option<String>Path to the kernel image.
kernel_cmdline: Option<String>Kernel command line arguments.
initrd_path: Option<String>Path to the initial ramdisk.
enable_rosetta: boolEnable Rosetta 2 translation (macOS ARM only).
nested_virt: boolLet the guest run its own hypervisor (macOS ARM only).
Each nested-capable VM pins a hypervisor address space that plain
VMs share among themselves, and Hypervisor.framework asserts inside
hv_vm_create once they run out (about a dozen per host). Only a
VM that will host sandboxes should ask for it.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmConfig
impl RefUnwindSafe for VmConfig
impl Send for VmConfig
impl Sync for VmConfig
impl Unpin for VmConfig
impl UnsafeUnpin for VmConfig
impl UnwindSafe for VmConfig
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