pub struct DevicesCommand {
    pub async_executor: Option<ExecutorKind>,
    pub disable_sandbox: bool,
    pub jail: JailConfig,
    pub serial: Vec<VhostUserParams<SerialParameters>>,
    pub block: Vec<VhostUserParams<DiskOption>>,
    pub vsock: Vec<VhostUserParams<VsockConfig>>,
    pub net: Vec<VhostUserParams<NetParameters>>,
    pub control_socket: Option<PathBuf>,
}
Expand description

Start one or several jailed device processes.

Fields§

§async_executor: Option<ExecutorKind>

configure async executor backend to “uring” or “epoll” (default).

§disable_sandbox: bool

disable sandboxing. Will nullify the –jail option if it was present.

§jail: JailConfig

set up the jail configuration.
Possible key values:
pivot-root=/path - Path to empty directory to use for
sandbox pivot root.
seccomp-policy-dir=/path - Path to seccomp .policy files seccomp-log-failures=(true|false) - Log seccomp filter
failures instead of them being fatal.

§serial: Vec<VhostUserParams<SerialParameters>>

start a serial device.
Possible key values:
vhost=PATH - Path to a vhost-user socket to listen to.
This parameter must be given in first position.
type=(stdout,syslog,sink,file) - Where to route the
serial device
hardware=(serial,virtio-console) - Which type of serial hardware to emulate. Defaults to 8250 UART (serial). num=(1,2,3,4) - Serial Device Number. If not provided,
num will default to 1.
path=PATH - The path to the file to write to when
type=file
input=PATH - The path to the file to read from when not stdin
console - Use this serial device as the guest console.
Can only be given once. Will default to first
serial port if not provided.
earlycon - Use this serial device as the early console. Can only be given once.
stdin - Direct standard input to this serial device.
Can only be given once. Will default to first serial port if not provided.
pci-address - Preferred PCI address, e.g. “00:01.0”.
Only applies to virtio-console hardware type.

§block: Vec<VhostUserParams<DiskOption>>

start a block device.
Possible key values:
vhost=PATH - Path to a vhost-user socket to listen to.
This parameter must be given in first position.
block options:
See help from crosvm run command.

§vsock: Vec<VhostUserParams<VsockConfig>>

start a vsock device.
Possible key values:
vhost=PATH - Path to a vhost-user socket to listen to.
This parameter must be given in first position.
cid=CID - CID to use for the device.
device=VHOST_DEVICE - path to the vhost-vsock device to use (Linux only). Defaults to /dev/vhost-vsock.

§net: Vec<VhostUserParams<NetParameters>>

start a network device.
Possible key values:
vhost=PATH - Path to a vhost-user socket to listen to.
This parameter must be given in first position.
network options:
See help from the crosvm run command.

§control_socket: Option<PathBuf>

path to put the control socket.

Trait Implementations§

source§

impl Debug for DevicesCommand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgs for DevicesCommand

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( __cmd_name: &[&str], __args: &[&str] ) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but without the values of the options and arguments. This can be useful as a means to capture anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl SubCommand for DevicesCommand

source§

const COMMAND: &'static CommandInfo = _

Information about the subcommand.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T, Global>) -> Arc<dyn Any + Sync + Send, Global>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> SubCommands for Twhere T: SubCommand,

§

const COMMANDS: &'static [&'static CommandInfo<'static>] = &[T::COMMAND]

Info for the commands.
§

fn dynamic_commands() -> &'static [&'static CommandInfo<'static>]

Get a list of commands that are discovered at runtime.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V