libmicrovmi

Crates.io Join the chat at https://gitter.im/libmicrovmi/community tokei repo size standard-readme compliant

A cross-platform unified interface on top of hypervisor's VMI APIs

Table of Contents

Overview

libmicrovmi simply aims to provide a cross-platform unified Virtual Machine Introspection API and the necessary drivers to be compatible with the diversity of hypervisors available today.

The term micro (μ) refers to the library's simplicity as well as the letter U standing for Unified interface.

The grand goal is to be the foundation for a VMI abstraction library that will be - multi-hypervisor - multi-emulator - cross-plaform - high-level API - OS-level semantics - stealth breakpoints - virtual address translation

libmicrovmi_image

Virtual Machine Introspection Apps

Drivers

VMI API

For more detailed information, please check the Wiki

Requirements

Build

To build the library, simply run

cargo build

By default, only the Dummy driver will be available (it does nothing).

To enable a driver, for example xen, enable the corresponding feature (Cargo.toml)

cargo build --features xen

Example

mem-dump

A small binary is available to demonstrate what the libmicrovmi can do: mem-dump

It will dump the raw memory of the specified domain in a domain_name.dump file.

Example with the xen driver: ~~~ $ cargo run --features xen --example mem-dump winxp ~~~

A memory dump should have been written in winxp.dump.

API example

~~~Rust // select drive type (Dummy, Xen, KVM, ...) let drvtype = DriverType::Dummy; // init library let mut drv: Box = microvmi::init(drvtype, domainname); // pause VM drv.pause() .expect("Failed to pause VM"); // get max physical address let maxaddr = drv.getmaxphysicaladdr() .expect("Failed to get max physical address"); // read physical memory let mut buffer: [u8; 4096] = [0; 4096]; let result = drv.readphysical(0x804d7000, &mut buffer); // resume VM drv.resume() .expect("Failed to resume VM"); ~~~

References

Maintainers

@Wenzel

Contributing

PRs accepted.

Small note: If editing the Readme, please conform to the standard-readme specification.

License

GNU General Public License v3.0