Crates.io | vmw_backdoor |
lib.rs | vmw_backdoor |
version | 0.2.4 |
source | src |
created_at | 2020-03-21 20:05:23.727783 |
updated_at | 2023-06-02 03:11:08.900364 |
description | A pure-Rust library for VMware host-guest protocol ("VMXh backdoor") |
homepage | |
repository | https://github.com/coreos/vmw_backdoor-rs |
max_upload_size | |
id | 221060 |
size | 58,162 |
A pure-Rust library for VMware host-guest protocol ("VMXh backdoor").
This library provides helpers to access and use the VMware backdoor from a guest VM. It allows bi-directional interactions with the VMWare hypervisor and host environment.
The "backdoor" protocol does not have official specifications, but it has been widely analyzed and there are multiple projects documenting it:
let is_vmw = vmw_backdoor::is_vmware_cpu();
println!("VMware CPU detected: {}.", is_vmw);
let mut guard = vmw_backdoor::access_backdoor().unwrap();
println!("Raised I/O access to reach backdoor port.");
let found = guard.probe_vmware_backdoor().unwrap_or(false);
println!("VMware backdoor detected: {}.", found);
let mut erpc = guard.open_enhanced_chan().unwrap();
let key = "guestinfo.ignition.config.data";
let guestinfo = erpc.get_guestinfo(key.as_bytes()).unwrap();
if let Some(val) = guestinfo {
println!("Got value for key '{}':", key);
println!("{}", String::from_utf8_lossy(&val));
};
Some more examples are available under examples.
Licensed under either of
at your option.