qcow-rs
A Rust library for working with qcow images.
Example
// open qcow
let qcow = open.unwrap;
// print out list of snapshots in the qcow
for snapshot in qcow.snapshots
// create a reader for accessing the virtual hard disk
let mut file = new;
let qcow2 = qcow.unwrap_qcow2;
let mut reader = qcow2.reader;
// read the first 10 bytes of the virtual hard disk
let mut buf = ;
reader.read_exact?;
Features
- Parse qcow files
- Full qcow version 1 support
- Support for parsing the header and some associated data
- Full qcow version 2-3 support
- Header parsing, including extra version 3 header data
- Header extension parsing, allowing you to use addition data they provide
- Lookup table (L1 and L2) parsing, only loading L2 tables on demand
- Snapshot parsing, including snapshot L1 lookup tables
- Support for reading the contents of the virtual disk
- Includes compression support (for both zlib and zstd)
- Cluster lookup caching, backtracking on cache miss
- Allows arbitrary seeking within the guest