Coder Social home page Coder Social logo

stjordanis / xcp-ng-vdi-stream Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xcp-ng/xcp-ng-vdi-stream

0.0 1.0 0.0 51 KB

Library to stream virtual disk images and differencing disks.

License: GNU General Public License v3.0

CMake 8.76% C 90.06% Shell 1.18%

xcp-ng-vdi-stream's Introduction

xcp-ng-vdi-stream

Library to stream virtual disk images and differencing disks.

Only QCOW2 images are supported for the moment and contrary to qemu-img a readable stream can be created directly from a QCow2 image chain without using a temporary file. It's the main goal of this lib: Create a stream without writing to disk.

Dependencies

xcp-ng-generic-lib is required to build this project. You must build it before the next step.

Build

Run these commands in the project directory:

mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=<path_to_xcp-ng-generic-build_dir>
make

Tools

Two tools linked to this library are provided:

  • dump-info to extract metadata of an image
  • stream-to-file to stream an image chain to a file

Examples:

# Show metadata of the differencing image 10.qcow2.
> ./tools/dump-info qcow2 ../tests/images/10.qcow2
QCOW Image Header
version: 3
header length: 104
virtual size: 2147483648 bytes
backing file: 9.qcow2
crypt method: 0
cluster size: 2097152 bytes
nb sectors per cluster: 4096
refcount table size (max nb of entries): 262144
refcount block size: 1048576
l1 size (current nb of entries): 1
l2 size (max nb of entries): 262144
nb snapshots: 0
incompatible features: 0
compatible features: 0
autoclear features: 0

# Write in output.qcow the full export of 9.qcow2.
./tools/stream-to-file output.qcow2 qcow2 ../tests/images/9.qcow2

# Write in output.qcow the delta between 12.qcow2 and 11.qcow2.
./tools/stream-to-file output.qcow2 qcow2 ../tests/images/12.qcow2 ../tests/images/11.qcow2

# Write in output.qcow the delta between 5.qcow2 and 5.qcow2.
# So... The output image cannot contains data in this case.
./tools/stream-to-file output.qcow2 qcow2 ../tests/images/5.qcow2 ../tests/images/5.qcow2

xcp-ng-vdi-stream's People

Contributors

wescoeur avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.