Git Product home page Git Product logo

vhdtool's Introduction

VHDtool
==========

A tool to examine and manipulate VHD images. Initially
meant as a way to test dynamic VHD support in my
Linux kernel loop VHD parser support. Images mount
in Win7.

Why would you use this instead of qemu-img? VHDtool
lets you tweak more parameters and create funky
VHDs (and will support differencing disks soon too!).

One more reason is that qemu-img actually produces
corrupt images that don't fit the VHD spec. Unsure
if they event mount on Win7.

Stay tuned.

Building
========

Builds on recent Linux (i.e. not RHEL5, *sigh*), and
needs libuuid (you probably have it, but look for
libuuid-devel or some similar package).

To build:

$ make

Examples
========

$ ./vhdtool 
./vhdtool [-s size] [-b block_size] [-c] [-t type] create|convert ...

$ ./vhdtool create
./vhdtool -s size [-b block_size] [-c] [-t type] create vhd-file-name
command 'create' failed

$ ./vhdtool convert
./vhdtool [-b block_size] [-c] [-t type] convert source-file-name dest-file-name
command 'convert' failed

Generate a 512-byte fixed VHD:

$ vhdtool -s 512 create test.vhd

Generate a 50 sector fixed VHD:

$ vhdtool -s 512s create test.vhd

Generate a 12mb dynamic VHD:

$ vhdtool -s 12m -t dyn create test.vhd

Generate a 12mb dynamic VHD with non-default (2mb) block size:

$ vhdtool -s 12m -b 4m create test.vhd

Convert a raw image to a VHD

$ vhdtool convert test.raw test.vhd

Valid size modifiers are:
b/B/*nothing* -> bytes
k/K           -> kilobytes
m/M           -> megabytes
g/G           -> gigabytes
t/T           -> terabytes
s/S           -> sectors

Special Considerations
======================

You need to pass the '-c' option if you are creating images < 127GiB
in size and the following apply to you:

1) You are converting a RAW disk imag and will be using it with the
   emulated IDE controller in Hyper-V.

2) You are creating a new VHD and are expecting to use it both with
   the emulated IDE controller and the virtual SCSI adapter in
   Hyper-V.

The '-c' option, will ensure that the disk size implied by C/H/S
calculations will never be less than the desired image size, with
the side effect of making the image a little larger.

Contact Info
============

Andrei Warkentin ([email protected], [email protected], [email protected])

vhdtool's People

Contributors

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