Git Product home page Git Product logo

vhd-tool's Introduction

vhd-tool

Command-line tools to manipulate, transcode and stream vhd format data.

Basic command-line tool examples

To create an empty dynamic (i.e. grows on demand) vhd:

vhd-tool create filename.vhd --size 16GiB

To create an empty difference vhd:

vhd-tool create filename.vhd --size 16GiB --parent otherfile.vhd

To query all the parameters of a vhd:

vhd-tool info filename.vhd

To query a specific parameter:

vhd-tool get filename.vhd current-size

Example: incremental backup

(This is a work in progress)

When running VMs on a hypervisor like XenServer, it is important to have a backup strategy for your important virtual disks. One possibility is to perform periodic disk snapshots and archive the "deltas" (or differences) between the new snapshot and the last.

First take a snapshot (this will be the first backup):

xe vdi-snapshot uuid=<uuid>

Next download the snapshot as a single .vhd:

xe vdi-export uuid=<uuid>

This will print a filename to the terminal.

Periodically (e.g. from cron), perform a new snapshot:

xe vdi-snapshot uuid=<uuid>

Next download the differences from a previous snapshot as a single .vhd:

xe vdi-export uuid=<uuid> relative-to=<previous-uuid>

Next, to avoid using too much disk space, count the number of snapshots and delete the oldest if you have too many:

xe vdi-destroy uuid=<oldest-uuid>
vhd-tool commit filename.vhd --into older.vhd

To restore a backup onto a fresh system use:

vhd-tool stream --source filename.vhd
                --source-format vhd
                --destination http://user:password@xenserver/import_vdi
                --destination-format vhd
                --progress

vhd-tool's People

Contributors

avsm avatar djs55 avatar edwintorok avatar euanh avatar gaborigloi avatar johnelse avatar jonludlam avatar kc284 avatar krizex avatar lindig avatar mcclurmc avatar mseri avatar nraynaud avatar simonjbeaumont avatar thomassa avatar yarsincitrix avatar

Watchers

 avatar  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.