Jump to content











Photo
- - - - -

VHD Proxy for ImDisk

vhd proxy imdisk

  • Please log in to reply
5 replies to this topic

#1 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 22 July 2014 - 11:06 AM

Hi,

 

Another proxy for ImDisk, this time to support VHD files (fixed, dynamic, differencing).

ImDisk already had support for fixed type, but not for dynamic or differencing (unless one used DiscUtils).

This is based on libvhdi Joachim Metz work.

 

Find here attached the proxy.dll (and the source code) for ImDisk (and other software using sharedmemory proxy such as ImgMount / Arsenal driver).

 

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

 

Note the RO flag as the libvhdi does not support writing for now.

 

 

Regards,

Erwan

Attached Files



#2 aenaon

aenaon
  • Members
  • 1 posts
  •  
    Cyprus

Posted 26 October 2014 - 08:07 PM

Excellent work! 

 

I noticed that when mounting without the -ro flag, it looks like it write to some sort of temp file (I havent found where that is) giving it pseudo-write permission on the VHD. That is awesome!

 

Have been looking forever for a way to mount network VHDs/VMDKs in a pseudo-write mode. Is this how vhdi library works, or is it how your wrote the proxy? If so, can you elaborate please?

 

I also tried Arsenal (different beast, I know) as it promises 'write temporary' mode for mounting, but no luck, it is always grayed out, and there isn't the slightest info on how to use that tool.



#3 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 26 October 2014 - 08:18 PM

Excellent work! 

 

I noticed that when mounting without the -ro flag, it looks like it write to some sort of temp file (I havent found where that is) giving it pseudo-write permission on the VHD. That is awesome!

 

Have been looking forever for a way to mount network VHDs/VMDKs in a pseudo-write mode. Is this how vhdi library works, or is it how your wrote the proxy? If so, can you elaborate please?

 

I also tried Arsenal (different beast, I know) as it promises 'write temporary' mode for mounting, but no luck, it is always grayed out, and there isn't the slightest info on how to use that tool.

 

Actually this is an unfortunate (or lucky) side effect : my proxy will "accept" the write requests but will simply do nothing with these requests.

Hence me advising to use the -ro flag as I dont know what the consequences can be in write mode : at best all write requests will be discarded and lost when un mounting, at worse the OS or apps will crash.



#4 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 03 November 2014 - 09:05 PM

Excellent work! 
 
I noticed that when mounting without the -ro flag, it looks like it write to some sort of temp file (I havent found where that is) giving it pseudo-write permission on the VHD. That is awesome!


If you create a virtual disk volume with properties that indicate write support and if write requests then fail on this disk volume, you would get something like that effect. Practically, you would fill up filesystem internal cache and the filesystem driver will keep trying to write out this data once in a while. There is always a risk for blue-screen on system freezing when you fill up filesystem cache completely, though.
 

Have been looking forever for a way to mount network VHDs/VMDKs in a pseudo-write mode. Is this how vhdi library works, or is it how your wrote the proxy? If so, can you elaborate please?


Why don't you simply create a differencing vhd/vmdk file and mount that one? That would give this effect and this is how I accomplish this myself when I need to mount a virtual disk file in write-temporary mode.
 

I also tried Arsenal (different beast, I know) as it promises 'write temporary' mode for mounting, but no luck, it is always grayed out, and there isn't the slightest info on how to use that tool.


Write-temporary mode with Arsenal Image Mounter is only supported for libewf.dll mounted images, such as enCase, .e01, .ex01 etc. This is implemented in libewf.dll so that if you open an image file in read/write mode it automatically creates a temporary .d01 file where it stores differencing data.

But I have some positive news too, the next version of Arsenal Image Mounter will support write-temporary mode for many other image formats mounted through DiscUtils.dll. This will be implemented by creating a temporary differencing file and mounting that one in read/write mode instead of the original image file, which means that this will be supported for image file format for which DiscUtils.dll supports creating a differencing file.

#5 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 03 November 2014 - 09:15 PM

Another thing I would like to mention in this thread is that devio.exe also natively supports mounting fixed and dynamic vhd files in read/write mode, but not differencing vhd files. But it could be worth mentioning this if someone need a simple way to modify a vhd file without using .NET libraries and/or on a system that for example does not support native vhd mounting. No particular command line switches are needed for this, devio.exe automatically detects vhd headers so this works by simply passing a file path to a vhd file directly to devio.exe.

devio shm:test_proxy c:\test.vhd



#6 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 03 May 2015 - 01:42 PM

A new version build with latest libvhdi .

 

Built so that it depends on msvcrt.dll and no longer on msvcrtxxx.dll.

 

Proxy.dll size down to 45k.

 

Zip contains latest devio.exe and a batch example to launch devio and imdisk in one go.

 

 

Attached Files







Also tagged with one or more of these keywords: vhd, proxy, imdisk

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users