perhaps the op needs to support < win7?
OP,
VHD is a container. The structures in your post refer to what he VHD needs
to keep it’s own meta data, it has nothing to do with what the container
contains, that is, the data region of the VHD.
The data area will be a representation of the HDD layout, but VHD has
stripes of container data and then a region for itrs meta data, this goes
on repeatedly (IIRC).
So, to read the VHD, you will need to know the VHD format and design a
translator yourself that should be able to fetch you sector data from
inside the container.
Now remember, Windows will be expecting LBAs and your driver will have to
translate those LBA into virtual sectors inside the VHD.
If you dont want to support any file system unknown to Windows, then you
are better off by writing a disk emulation driver like we suggested before.
it makes it easier. that way u dont need to worry abt the FS inside it at
all.
On Thu, May 23, 2013 at 9:09 PM, Don Burn wrote:
> I guess I am more confused than ever? If you are really using the
> Microsoft VHD format what is your driver for? I.E. what is the special
> thing that is needed that does not allow you to use the standard Microsoft
> tools.
>
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/ WinDrvr http:
>
>
>
> “Max Xavier” wrote in message news:xxxxx@ntfsd:
>
> Thank you all for the suggestions!!!
>>
>> Don
>> I need a driver which can mount a vhd image like we can do using
>> diskmgmt.msc or automatically
>> without need of diskmgmt.msc.for that i am going with fastfat way but at
>> the initial stage i am getting some problems like according to vhd spec we
>> are having only three structure 1 for _VHDFooter,2 for
>> _ParentLocatorEntry,
>> 3 _VHDDynamicDiskHeader.now my confusion is that with the help of these
>> strctures may i’ll be able to make FS to mount my VHD? or i have to embed
>> my structures into fat defined one and then start my implementation.but
>> how
>> to do that please give me some pointers.
>>
>> Thanks in advance.
>>
>>
>> On Tue, May 21, 2013 at 10:00 PM, A B wrote:
>>
>> > yes, Don’s point is valid…my suggestion to mount will only work for
>> FSs
>> > recognised by MS. And again, if I am on a mordern OS like win 7 then
>> this
>> > facility is inbuilt into the OS…
>> >
>> >
>> >
>> >
>> > On Tue, May 21, 2013 at 9:47 PM, Don Burn wrote:
>> >
>> >> This all assumes that the VHD is created on a Windows machine with a
>> >> Windows file system. If not as Pete pointed out this is two drivers.
>> More
>> >> to the point since the OP had to ask what kind of driver, he really
>> needs
>> >> some training since messing around in the storage stack is a great way
>> to
>> >> crash the system.
>> >>
>> >>
>> >> Don Burn
>> >> Windows Filesystem and Driver Consulting
>> >> Website: http://www.windrvr.com
>> >> Blog: http://msmvps.com/blogs/** WinDrvrhttp:<
>> http://msmvps.com/blogs/**WinDrvr http:>
>>
>> >>
>> >>
>> >>
>> >> “A B” wrote in message news:xxxxx@ntfsd:
>> >>
>> >>
>> >> +1 to what Fernando said.
>> >>>
>> >>> One way to go would be to create this driver on the root bus, and then
>> >>> upon
>> >>> an user command to perform the mount operation, this driver will
>> create a
>> >>> DISK device. Your disk device, which is virtual and emulating what a
>> real
>> >>> disk should, would have to handle a few IOCTLS targetted for the disk
>> and
>> >>> mount manager, but those are very few, and easy to emulate.
>> >>>
>> >>> Now, once you successfully show the disk (this would be by actually
>> >>> reading
>> >>> the VHD file and converting the virtual sectors to valid LBAs, Windows
>> >>> will
>> >>> automatically mount an FS on it, and explorer will start showing this
>> as
>> >>> it
>> >>> does for any other drive.
>> >>>
>> >>> Please remember, all IOs to this disk will come to your disk driver
>> >>> device,
>> >>> so you will have to handle the translation of those IOs and fetching
>> the
>> >>> data from the actual backing up VHD.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Tue, May 21, 2013 at 9:18 PM, wrote:
>> >>>
>> >>> > Hi Xavier,
>> >>> >
>> >>> > Assuming VHD extends for Virtual Hard Disk, I think you should
>> develop
>> >>> a
>> >>> > disk driver for this image instead of a file system driver. A
>> regular
>> >>> file
>> >>> > system driver will recognize and mount the volume after having this
>> new
>> >>> > disk working.
>> >>> >
>> >>> > Regards,
>> >>> > –
>> >>> > Fernando Roberto da Silva
>> >>> > DriverEntry Kernel Development
>> >>> > http://www.driverentry.com.br
>> >>> >
>> >>> > —
>> >>> > NTFSD is sponsored by OSR
>> >>> >
>> >>> > OSR is hiring!! Info at http://www.osr.com/careers
>> >>> >
>> >>> > For our schedule of debugging and file system seminars visit:
>> >>> > http://www.osr.com/seminars
>> >>> >
>> >>> > To unsubscribe, visit the List Server section of OSR Online at
>> >>> > http://www.osronline.com/page.****cfm?name=ListServerhttp:
>> http:
>> >
>>
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> –
>> >>>
>> >>> - ab
>> >>>
>> >>
>> >>
>> >> —
>> >> NTFSD is sponsored by OSR
>> >>
>> >> OSR is hiring!! Info at http://www.osr.com/careers
>> >>
>> >> For our schedule of debugging and file system seminars visit:
>> >> http://www.osr.com/seminars
>> >>
>> >> To unsubscribe, visit the List Server section of OSR Online at
>> >> http://www.osronline.com/page. **cfm?name=ListServerhttp:
>> http:
>> >
>>
>> >>
>> >
>> >
>> >
>> > –
>> >
>> > - ab
>> > — NTFSD is sponsored by OSR OSR is hiring!! Info at
>> > http://www.osr.com/careers For our schedule of debugging and file
>> system
>> > seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
>> > List Server section of OSR Online at
>> > http://www.osronline.com/page. cfm?name=ListServerhttp:
>> >
>>
>
>
> —
> NTFSD is sponsored by OSR
>
> OSR is hiring!! Info at http://www.osr.com/careers
>
> For our schedule of debugging and file system seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.**cfm?name=ListServerhttp:
>
–
- ab</http:></http:></http:></http:></http:></http:></http:></http:></http:>