Crate vboxhelper[−][src]
This crate is probably not what you hoped it was – in fact, it’s probably exactly what you feared. Rather than integrate against VirtualBox’s COM interfaces it will call the command line tools and parse their outputs.
Perhaps not surprisingly, this crate originally began as a bash script and slowly morphed into what it is today.
Examples
Terminate a virtual machine named myvm and revert it to a snapshot named mysnap.
use std::time::Duration; use vboxhelper::*; let vm = "myvm".parse::<VmId>().unwrap(); controlvm::kill(&vm).unwrap(); let ten_seconds = Duration::new(10, 0); wait_for_croak(&vm, Some((ten_seconds, TimeoutAction::Error))); // revert to a snapshot let snap = "mysnap".parse::<snapshot::SnapshotId>().unwrap(); snapshot::restore(&vm, Some(snap)).unwrap();
VirtualBox Versions
This crate will generally attempt to track the latest version of VirtualBox.
Re-exports
pub use vmid::VmId; |
Modules
controlvm | Control the run state of a virtual machine. |
nics | |
snapshot | Manage virtual machine snapshots. |
vmid | Abstraction of a virtual machine identifier. |
Structs
VmInfo | A structured representation of a virtual machine’s state and configuration. |
Enums
RunContext | In what context a virtual machine is run. |
TimeoutAction | |
VmState | VirtualBox virtual machine states. |
Functions
get_vm_info | Get structured information about a virtual machine. |
get_vm_info_map | Get information about a virtual machine as a map. |
get_vm_list | |
have_vm | |
is_vm_state | Check whether a virtual machine is currently in a certain state. |
wait_for_croak | Wait for a virtual machine to self-terminate. |