pub(crate) enum Command {
Show 22 variants
Complete(Complete),
Completions(Completions),
Shell {
shell: String,
args: Vec<String>,
},
Run {
command: String,
args: Vec<String>,
},
Inspect {
recursive: bool,
limit: Option<usize>,
json: bool,
poll: bool,
period: f64,
count: Option<usize>,
path: Option<String>,
update: Option<String>,
timeout: u64,
},
Update {
path: String,
value: String,
},
Start {
env: Vec<EnvString>,
unset: Vec<String>,
args: Vec<String>,
},
Kmsg {
follow: bool,
reconnect: bool,
verbose: bool,
},
File {
follow: bool,
file_path: String,
},
Gdbserver {
pid: Option<i32>,
multi: bool,
},
Gdbstub {
port: u32,
},
Crash {
crash_type: CrashType,
pid: Option<i32>,
name: Option<String>,
},
CoreDump {
verbose: bool,
pid: Option<i32>,
name: Option<String>,
dst: Option<PathBuf>,
},
Restart,
PerfTrace {
output: Option<PathBuf>,
},
VsockTcpRelay {
vsock_port: u32,
tcp_port: u16,
allow_remote: bool,
reconnect: bool,
},
Pause,
Resume,
DumpSavedState {
output: Option<PathBuf>,
},
PacketCapture {
output: PathBuf,
seconds: Duration,
snaplen: u16,
},
MemoryProfileTrace {
pid: Option<i32>,
name: Option<String>,
output: Option<PathBuf>,
},
EfiDiagnostics {
log_level: EfiDiagnosticsLogLevel,
output: EfiDiagnosticsOutput,
},
}Variants§
Complete(Complete)
Completions(Completions)
Shell
Starts an interactive terminal in VTL2.
Fields
Run
Runs a process in VTL2.
Inspect
Inspects the Underhill state.
Fields
Update
Updates an inspectable value.
Start
Starts the VM if it’s waiting for the signal to start.
Underhill must have been started with –wait-for-start or OPENHCL_WAIT_FOR_START set.
Fields
Kmsg
Writes the contents of the kernel message buffer, /dev/kmsg.
Fields
File
Writes the contents of the file.
Gdbserver
Starts GDB server on stdio.
Use this with gdb’s target command:
target remote |ohcldiag-dev.exe gdbserver my-vmOr for multi-process debugging:
target extended-remote |ohcldiag-dev.exe gdbserver --multi my-vmFields
Gdbstub
Starts the GDB stub for debugging the guest on stdio.
Use this with gdb’s target command:
target remote |ohcldiag-dev.exe gdbstub my-vmCrash
Crashes the VM.
Must specify the VM name, as well as the crash type.
Fields
CoreDump
Streams the ELF core dump file of a process to the host.
Streams the core dump file of a process to the host where the file
is saved as dst.
Fields
Restart
Restarts the Underhill worker process, keeping VTL0 running.
PerfTrace
Get the current contents of the performance trace buffer, for use with https://ui.perfetto.dev.
VsockTcpRelay
Sets up a relay between a virtual socket and a TCP client on the host.
Fields
Pause
Pause the VM (including all devices)
Resume
Resume the VM
DumpSavedState
Dumps the VM’s VTL2 state without servicing or tearing down Underhill.
PacketCapture
Starts a network packet capture trace.
Fields
MemoryProfileTrace
Memory usage profile tracing.
Fields
EfiDiagnostics
Processes EFI diagnostics from guest memory and outputs the logs.
The log level filter controls which UEFI log entries are emitted. The buffer already contains all log levels; this filter selects which ones to display.
Fields
log_level: EfiDiagnosticsLogLevelThe log level filter to apply.
Accepted values: “default” (errors+warnings), “info” (errors+warnings+info), “full” (all levels).
output: EfiDiagnosticsOutputThe output destination.
Accepted values: “stdout”, “tracing”.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand