Before I lose them somewhere on my harddrive… here are the compiled x86 and x64 libyal libraries.
libyal articles.
libyal github here.
Download here.
I had done a few proxies for ImDisk in the past based on the libyal libraries (vmdk, qcow, vhd, ewf).
This time, as the VDI image format is quite simple, I made my own proxy for VDI images.
Imdisk + Discutils could achieve the same except that discutils requires .Net 4.0 which is not always available.
As always the command line :
Download/Discuss here.
In a previous article, I showed how to setup a « proxy » for ImDisk thru devio to mount an EWF file.
This time, lets do it with a VHDI file (using external libyal library).
The command lines for the proxy and ImDisk are below :
To launch the proxy : devio –dll=proxy.dll;dllopen shm:test_proxy c:\test.vhd.
To use the proxy from ImDisk : imdisk -a -t proxy -o shm -o ro -f test_proxy -m Z: .
Been a while since last article.
A quick one to post a tool I have been using lately to quickly convert VMDK to raw disks.
Indeed it is sometimes easier/quicker to install an operating system in a virtual environement but afterwards you may want to convert the vmware disk (vmdk) to a raw disk so that you can write it to another physical media (usb, hard drive, etc).
Thanks to libvmdk, a library written by Joachim Metz, it is easy to write a quick graphical frontend that will read a vmdk and write it back to a raw image.
VMDK2RAW can be downloaded here.
Erwan
In a previous article, I showed how to setup a « proxy » for ImDisk thru devio to mount an EWF file.
This time, lets do it with a QCOW file (using external libyal library).
The command lines for the proxy and ImDisk are below :
devio --dll=proxy.dll;dllopen shm:test_proxy c:\test.qcow
imdisk -a -t proxy -o shm -o ro -f test_proxy -m Z:
Find the proxy here : PROXY_QCOW .
In a previous article, I showed how to setup a « proxy » for ImDisk thru devio to mount an EWF file.
This time, lets do it with a VMDK file (using external libyal library).
The command lines for the proxy and ImDisk are below :
devio --dll=proxy.dll;dllopen shm:test_proxy c:\test.vmdk
imdisk -a -t proxy -o shm -o ro -f test_proxy -m Z:
Find the proxy here : proxy_VMDK .
In a previous article, I have shared a delphi unit for libewf.
Now lets code a proxy for ImDisk using that external libyal library to mount an EWF file.
I initially used this template from reboot.pro and came with the below basic delphi unit.
Once I had done that, it was pretty easy to fill in the missing parts to mount and EWF reusing my previous libewf delphi unit.
See code attached.proxy_EWF
library proxy; uses SysUtils, Classes,windows; {$R *.res} type dllread_proc = function (handle:thandle; buf:pointer; size:cardinal; offset:int64): integer; cdecl; dllwrite_proc = function (handle:thandle; buf:pointer; size:cardinal; offset:int64): integer; cdecl; dllclose_proc = function (handle:thandle): integer; cdecl; var file_handle:thandle; function SetFilePointerEx (hFile: THandle; lDistanceToMove: int64; lpNewFilePointer: Pointer; dwMoveMethod: DWORD): BOOL; stdcall; external 'kernel32.dll'; function GetFileSizeEx(hFile: THandle; var lpFileSize: Int64): BOOL; stdcall; external 'kernel32.dll' name 'GetFileSizeEx'; function my_read_proc(handle:thandle; buf:pointer; size:cardinal; offset:int64): integer; cdecl; var bytes_read:cardinal; begin writeln('Read request - size:'+inttostr(size)+' offset:'+inttostr(offset)); SetFilePointerEx(handle, offset, nil, FILE_BEGIN); ReadFile(handle, buf^, size, bytes_read, nil); result:=bytes_read; end; function my_write_proc(handle:thandle; buf:pointer; size:cardinal; offset:int64): integer; cdecl; var bytes_written:cardinal; begin writeln('Write request - size:'+inttostr(size)+' offset:'+inttostr(offset)); SetFilePointerEx(handle, offset, nil, FILE_BEGIN); WriteFile(handle, buf^, size, bytes_written, nil); result:=bytes_written; end; function my_close_proc(handle:thandle): integer; cdecl; begin writeln('Close request'); CloseHandle(handle); result:=0; end; function dllopen(filename:pchar; read_only:integer; var dllread:dllread_proc; var dllwrite:dllwrite_proc; var dllclose:dllclose_proc; var size:int64):thandle;cdecl; begin writeln('File to open: '+filename); dllread := my_read_proc; dllwrite := my_write_proc; dllclose := my_close_proc; file_handle := CreateFile(filename, GENERIC_READ or GENERIC_WRITE, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); GetFileSizeEx(file_handle, size); result:=file_handle; end; exports dllopen index 1; begin end.
The command lines for the proxy and ImDisk are below :
devio --dll=proxy.dll;dllopen shm:test_proxy c:\test.vmdk
imdisk -a -t proxy -o shm -o ro -f test_proxy -m Z: