pub struct Config {
pub(crate) extra_args: Vec<String>,
pub(crate) o_direct: bool,
pub(crate) log_level: Level,
pub(crate) log_file: Option<String>,
pub(crate) wrapper_cmd: Option<String>,
pub(crate) kernel_url: Url,
pub(crate) initrd_url: Option<Url>,
pub(crate) rootfs_url: Option<Url>,
pub(crate) rootfs_rw: bool,
pub(crate) rootfs_compressed: bool,
pub(crate) console_hardware: String,
}
Expand description
Configuration to start TestVm
.
Fields§
§extra_args: Vec<String>
Extra arguments for the run
subcommand.
o_direct: bool
Use O_DIRECT
for the rootfs.
log_level: Level
Log level of TestVm
log_file: Option<String>
File to save crosvm log to
wrapper_cmd: Option<String>
Wrapper command line for executing TestVM
kernel_url: Url
Url to kernel image
initrd_url: Option<Url>
Url to initrd image
rootfs_url: Option<Url>
Url to rootfs image
rootfs_rw: bool
If rootfs image is writable
rootfs_compressed: bool
If rootfs image is zstd compressed
console_hardware: String
Console hardware type
Implementations§
source§impl Config
impl Config
sourcepub fn extra_args(self, args: Vec<String>) -> Self
pub fn extra_args(self, args: Vec<String>) -> Self
Uses extra arguments for crosvm run
.
sourcepub fn disable_sandbox(self) -> Self
pub fn disable_sandbox(self) -> Self
Uses disable-sandbox
argument for crosvm run
.
pub fn from_env() -> Self
pub fn with_kernel(self, url: &str) -> Self
pub fn with_initrd(self, url: &str) -> Self
pub fn with_rootfs(self, url: &str) -> Self
pub fn rootfs_is_rw(self) -> Self
pub fn rootfs_is_compressed(self) -> Self
pub fn with_stdout_hardware(self, hw_type: &str) -> Self
pub fn with_vhost_user(self, device_type: &str, socket_path: &Path) -> Self
pub fn with_vhost_user_fs(self, socket_path: &Path, tag: &str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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