VHD support

Support and general discussion.
User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: VHD support

Post by resle » Mon 04 Jun, 2018 8:25 am

shermanp wrote: That's alright, I've found a way of doing it using the method suggested here. Simple, and doesn't require compile time or run time checking. And since the only purpose is to read/write a one-time footer, performance is hardly an issue either.

I think I've got the VHD footer reading working. The next step is to figure out what I need to store where to get the info into the config file etc. That looks like it's part of the HdSizeDlg stuff. I shall persevere with it...

If I want to implement creating VHD's (which I do), I've discovered another little spanner in the works -- UUID. For whatever reasons, most implementations of UUID generation (in C) appear to use OS calls. So what the heck to do with MinGW? Where's a nice portable C (not C++) library for generating a valid UUID? Or do we just fake it for the purposes of creating a VHD file?

But to those interested, yes, I am making progress. I'm just trying to wrap my head around the wxWidgets stuff.

(As an aside, working with C makes me that much more appreciative of higher level languages!)
Sherman, Sarah, thanks a lot.

I didn't even actually intend this as a "request" (I don't really get the idea of requests, within the scope of something that is being given away for free), just a feature suggestion from some one who uses PCem literally every single day.

I wish I was more familiar with the toolchain and libraries used by you guys so that I could contribute myself, this is definitely one of those things that I would have enjoyed developing!

r.

shermanp
Posts: 62
Joined: Sat 18 Feb, 2017 2:09 am

Re: VHD support

Post by shermanp » Mon 04 Jun, 2018 9:56 am

I've been thinking about VHD support for PCem for a while. Having never contributed any code to PCem before, it looked like adding VHD support wouldn't be too difficult, so I finally decided to have a go.

shermanp
Posts: 62
Joined: Sat 18 Feb, 2017 2:09 am

Re: VHD support

Post by shermanp » Thu 07 Jun, 2018 9:04 am

A new patch has been posted, now with more VHD creation capabilities.

User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: VHD support

Post by resle » Mon 11 Jun, 2018 10:01 pm

I have tested the newly implemented VHD support in how many scenarios as possible without a hitch. Old VHDs created under Virtualbox and Hyper-V were mounted and operated normally, and vice-versa PCem-made VHDs mount just fine everywhere else.

Great thanks to Sherman, Sarah, and everyone who was involved.

shermanp
Posts: 62
Joined: Sat 18 Feb, 2017 2:09 am

Re: VHD support

Post by shermanp » Tue 12 Jun, 2018 4:50 am

resle wrote:
Mon 11 Jun, 2018 10:01 pm
I have tested the newly implemented VHD support in how many scenarios as possible without a hitch. Old VHDs created under Virtualbox and Hyper-V were mounted and operated normally, and vice-versa PCem-made VHDs mount just fine everywhere else.

Great thanks to Sherman, Sarah, and everyone who was involved.
Thanks for testing. No promises, but I've been thinking about how one might implement support for dynamic VHD's. The format itself doesn't look to difficult, it's whether or not I have the skills to implement it that I'm not too sure about...

The other option is to use an external library, but there doesn't appear to be much in the way of a standalone C library. There's a library called libvhdi, but that is labeled 'alpha', and I don't really know how stable and feature complete it is. Also, attempting my own implementation sounds like it could be an interesting problem to solve.

shermanp
Posts: 62
Joined: Sat 18 Feb, 2017 2:09 am

Re: VHD support

Post by shermanp » Sat 23 Jun, 2018 7:28 am

Just thought I'd post a quick update.

I have got dynamic VHD support semi-working. Current status is that I can attach a pre-formatted image to PCem as a secondary drive, and copy some files to/from Windows 98.

I have just tried installing Win 98 to a fresh (dynamic) VHD (including formatting).... It did not go well.

Obviously have more work to do yet!

I'll probably release a patch for testing purposes once I've got to the point of being able to install and run an OS to a dynamic VHD.

Post Reply