pub(crate) enum Command {
Show 20 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,
},
}
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-vm
Or for multi-process debugging:
target extended-remote |ohcldiag-dev.exe gdbserver --multi my-vm
Fields
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-vm
Crash
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.
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