GithubHelp home page GithubHelp logo

eriklax / xva-img Goto Github PK

View Code? Open in Web Editor NEW
89.0 89.0 26.0 59 KB

XVA (Citrix Xen format) virtual disk tool. Supports RAW disk image exports and imports.

License: GNU General Public License v2.0

C++ 94.08% CMake 1.18% Roff 4.74%

xva-img's People

Contributors

eriklax avatar fvcr avatar imanolbarba avatar linrock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xva-img's Issues

please add option to static link xva-img to be used on any machine for forensics.

Hi having some problems with deleted files and needing to do forensics on a client machine,
I want to run xva-img directly on xenserver but the distribution is very limited and building on that machine is no fun at all.
So I build externallly on a debian machine.
As xva-img is a smalll tool and disk space is not the big deal today I like to have rescue tools to be statically linked.
So please add an option to statically link xva-img.

Thanks in advance!

Levush

Please don't hardcode /usr/local/bin/ into CMakeLists.txt

I don't know how this is done with CMake, but I'm sure there are some standard methods to derive the correct directory from some defaults plus environment or commandline options with CMake, too.

Actually, if I want to install it into /usr/bin/ instead of /usr/local/bin/, the common way to achieve this with CMake is to pass -DCMAKE_INSTALL_PREFIX=/usr on the commandline. But with xva-img, this setting is completely ignored.

invalid xxh64 checksum

Hi!
I try to recover a XVA, but when i export a disk, an error shows:
xva-img: invalid xxh64 checksum for 00039419
can i do anything?

Thanks in advance.

To compile:

Install g++ cmake make libssl-dev
cmake .
make
make install

You're welcome.

cmake error version

are you able to update your project accordingly or not?

CMake Warning (dev) at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:6 (PROJECT):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!

fatal error: xxhash.h

When running make install I get the error:

Scanning dependencies of target xva-img
[ 11%] Building CXX object CMakeFiles/xva-img.dir/src/disk.cpp.o
[ 22%] Building CXX object CMakeFiles/xva-img.dir/src/main.cpp.o
[ 33%] Building CXX object CMakeFiles/xva-img.dir/src/package.cpp.o
[ 44%] Building CXX object CMakeFiles/xva-img.dir/src/progress.cpp.o
[ 55%] Building CXX object CMakeFiles/xva-img.dir/src/readfile.cpp.o
[ 66%] Building CXX object CMakeFiles/xva-img.dir/src/sha1.cpp.o
[ 77%] Building CXX object CMakeFiles/xva-img.dir/src/writefile.cpp.o
[ 88%] Building CXX object CMakeFiles/xva-img.dir/src/xxh64.cpp.o
/home/user/xva-img/src/xxh64.cpp:34:10: fatal error: xxhash.h: No such file or directory
#include <xxhash.h>
^~~~~~~~~~
compilation terminated.
CMakeFiles/xva-img.dir/build.make:230: recipe for target 'CMakeFiles/xva-img.dir/src/xxh64.cpp.o' failed
make[2]: *** [CMakeFiles/xva-img.dir/src/xxh64.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/xva-img.dir/all' failed
make[1]: *** [CMakeFiles/xva-img.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Please grant a license exemption for linking xva-img against OpenSSL

I'm currently looking into packaging xva-img for Debian, see https://bugs.debian.org/854490.

Your code is under GPL and the GPL is incompatible with some terms of the OpenSSL license. This makes Debian (and probably other distributions, too) not allowing GPL-licensed code to be linked with OpenSSL libraries unless there is a license exception explicitly permitting this.

To grant such an exception, it should suffice to add these paragraphs to whereever the GPL preamble is used (and probably also to the LICENSE file):

In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file, and distribute linked combinations including the two.

You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here.

Alternatively (but surely more effort) would be to also support GnuTLS as alternative to OpenSSL.

2 Gig Limit

hello,

it seems like the compiled program has a size limitation on 2 GigaByte on 32-bit systems when packaging a xva file.
While the packaging process the program throws the error "unable to write data for myvm:Ref:25/00002044". If I check the output file it says 2 GigaByte of size (detailed view: 2.147.483.648 / the exact size of an 32-bit integer).

Something about C++11

Sorry about the vague title but I am not too familiar with how version selection works with CMake or C++ in general.

I just built xva-img on Ubuntu Xenial.

Initially I got errors, these with GCC:

[ 12%] Building CXX object CMakeFiles/xva-img.dir/src/disk.cpp.o
In file included from xva-img-1.4.2/src/disk.cpp:48:0:
xva-img-1.4.2/src/disk.hpp:45:5: warning: identifier ‘noexcept’ is a keyword in C++11 [-Wc++0x-compat]
     noexcept(false);
     ^
xva-img-1.4.2/src/disk.hpp:44:43: error: expected ‘;’ at end of member declaration
    bool Export(const std::string& diskpath)
                                           ^
xva-img-1.4.2/src/disk.hpp:45:14: error: expected identifier before ‘false’
     noexcept(false);
              ^
xva-img-1.4.2/src/disk.hpp:45:14: error: expected ‘,’ or ‘...’ before ‘false’
xva-img-1.4.2/src/disk.hpp:45:19: error: ISO C++ forbids declaration of ‘noexcept’ with no type [-fpermissive]
     noexcept(false);
                   ^
xva-img-1.4.2/src/disk.hpp:46:43: error: expected ‘;’ at end of member declaration
    bool Import(const std::string& diskpath)
                                           ^
xva-img-1.4.2/src/disk.hpp:47:14: error: expected identifier before ‘false’
     noexcept(false);
              ^
xva-img-1.4.2/src/disk.hpp:47:14: error: expected ‘,’ or ‘...’ before ‘false’
xva-img-1.4.2/src/disk.hpp:47:19: error: ISO C++ forbids declaration of ‘noexcept’ with no type [-fpermissive]
     noexcept(false);
                   ^
xva-img-1.4.2/src/disk.hpp:47:5: error: ‘int XVA::Disk::noexcept(int)’ cannot be overloaded
     noexcept(false);
     ^
xva-img-1.4.2/src/disk.hpp:45:5: error: with ‘int XVA::Disk::noexcept(int)’
     noexcept(false);
     ^
xva-img-1.4.2/src/disk.cpp:60:2: error: expected initializer before ‘noexcept’
  noexcept(false)
  ^
CMakeFiles/xva-img.dir/build.make:62: recipe for target 'CMakeFiles/xva-img.dir/src/disk.cpp.o' failed

and these with Clang:

[ 12%] Building CXX object CMakeFiles/xva-img.dir/src/disk.cpp.o
In file included from xva-img-1.4.2/src/disk.cpp:48:
xva-img-1.4.2/src/disk.hpp:44:44: error: expected ';' at end of declaration list
                        bool Export(const std::string& diskpath)
                                                                ^
                                                                ;
xva-img-1.4.2/src/disk.hpp:46:44: error: expected ';' at end of declaration list
                        bool Import(const std::string& diskpath)
                                                                ^
                                                                ;
xva-img-1.4.2/src/disk.cpp:60:2: error: expected function body after function declarator
        noexcept(false)
        ^
3 errors generated.
CMakeFiles/xva-img.dir/build.make:62: recipe for target 'CMakeFiles/xva-img.dir/src/disk.cpp.o' failed

The solution was to run cmake -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON . instead of just cmake .. This makes it build with both GCC and Clang.

Problem installing on Ubuntu Server 14.10

Successfully ran cmake .:

$> cmake .
-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /vmstorage/01/playground/xva-img-master

but the make install failed:

$> make install
[ 14%] Building CXX object CMakeFiles/xva-img.dir/src/sha1.o
/vmstorage/01/playground/xva-img-master/src/sha1.cpp:20:25: fatal error: openssl/sha.h: No such file or directory
 #include <openssl/sha.h>
                         ^
compilation terminated.
CMakeFiles/xva-img.dir/build.make:54: recipe for target 'CMakeFiles/xva-img.dir/src/sha1.o' failed
make[2]: *** [CMakeFiles/xva-img.dir/src/sha1.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/xva-img.dir/all' failed
make[1]: *** [CMakeFiles/xva-img.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

Looks like there are problems with openssl?

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.