VHD support

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

VHD support

Postby resle » Tue 24 Feb, 2015 1:21 pm

Hi, first and foremost thanks for PCEm: the feeling of having my first PC ever up and running is so genuine that it's giving me the chills.

Quick question: is there a reason why for hard disks the IMG format was chosen over VHD? Is support for VHD eventually planned?

Thanks
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: VHD support

Postby nerd73 » Tue 24 Feb, 2015 2:53 pm

resle wrote:Hi, first and foremost thanks for PCEm: the feeling of having my first PC ever up and running is so genuine that it's giving me the chills.

Quick question: is there a reason why for hard disks the IMG format was chosen over VHD? Is support for VHD eventually planned?

Thanks



You can convert VHD to img very easily I think.
User avatar
resle
Posts: 23
Joined: Mon 23 Feb, 2015 8:00 am

Re: VHD support

Postby resle » Tue 24 Feb, 2015 3:18 pm

nerd73 wrote:
resle wrote:Hi, first and foremost thanks for PCEm: the feeling of having my first PC ever up and running is so genuine that it's giving me the chills.

Quick question: is there a reason why for hard disks the IMG format was chosen over VHD? Is support for VHD eventually planned?

Thanks


You can convert VHD to img very easily I think.



True but VHDs have the advantage that on Windows 8 and onward, they're mountable and hence editable without the need for tools of any kind. They're seen by the OS just as a physical hdd.
SarahWalker
Site Admin
Posts: 1335
Joined: Thu 24 Apr, 2014 4:18 pm

Re: VHD support

Postby SarahWalker » Tue 24 Feb, 2015 6:36 pm

I didn't support the VHD format because I'd never heard of it! Just had a look at the specification, looks like the fixed size format shouldn't be too difficult to support.
User avatar
leilei
Posts: 436
Joined: Fri 25 Apr, 2014 4:47 pm

Re: VHD support

Postby leilei » Tue 24 Feb, 2015 10:02 pm

VHD was used in VirtualPC as well and Windows 7 can also mount them in its disk manager, and I think WinImage can dump whole drives to VHD
User avatar
resle
Posts: 23
Joined: Mon 23 Feb, 2015 8:00 am

Re: VHD support

Postby resle » Wed 25 Feb, 2015 12:30 am

Used in VirtualBox, too, which is able to use them even as they are mounted under Windows - effectively creating the perfect way of swapping files from the virtual to the real environment and vice-versa.

Hope you'll give VHD a shot, Tom :)
startmenu
Posts: 103
Joined: Sat 29 Nov, 2014 7:39 am

Re: VHD support

Postby startmenu » Wed 25 Feb, 2015 5:47 am

Using those utilities like WinImage instead.
User avatar
ppgrainbow
Posts: 402
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: VHD support

Postby ppgrainbow » Wed 25 Feb, 2015 7:10 am

leilei wrote:VHD was used in VirtualPC as well and Windows 7 can also mount them in its disk manager, and I think WinImage can dump whole drives to VHD


What's notable is that VHDs were first used under Connectix Virtual PC under older versions of MacOS. The first version of Connectix Virtual PC was designed for Windows NT 4.0 and Windows 98 respectively. I don't have Windows 7, but VHD images can be mounted using ImDisk.
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: VHD support

Postby ender » Wed 25 Feb, 2015 12:57 pm

resle wrote:Used in VirtualBox, too, which is able to use them even as they are mounted under Windows - effectively creating the perfect way of swapping files from the virtual to the real environment and vice-versa.
That sounds like an effective way to get disk corruption in VHD.
User avatar
resle
Posts: 23
Joined: Mon 23 Feb, 2015 8:00 am

Re: VHD support

Postby resle » Wed 25 Feb, 2015 1:36 pm

I don't know: I have been doing the above for almost 5 years now, with no issue..
Orchidsworn
Posts: 59
Joined: Sun 22 Mar, 2015 10:16 pm

Re: VHD support

Postby Orchidsworn » Sun 05 Apr, 2015 8:30 pm

As reliability and ease of use for moving large amounts of data I would rather have VHD, but being stuck at a 8GB limit for now I think IMG is fine. As we increase the HDD limit it might be nice to have easier access to the image from the host system. Either by this or networking the emulator and the host for file transfers directly (If there is a way for this right now let me know I am just assuming there is not because I have yet to see any news about it).
ecksemmess
Posts: 122
Joined: Wed 18 Mar, 2015 5:27 am

Re: VHD support

Postby ecksemmess » Mon 06 Apr, 2015 5:15 am

In theory, you should be able to use a build with SA1988's NE2000 emulation patched in to do exactly what you describe with no major difficulty. I haven't waded into networking at all, but plenty of people here seem to have gotten it to work, which should be sufficient to set up any kind of file transfer system you'd like.
Orchidsworn
Posts: 59
Joined: Sun 22 Mar, 2015 10:16 pm

Re: VHD support

Postby Orchidsworn » Tue 07 Apr, 2015 12:58 am

And I think it is something that is wanted enough that it will be inevitable and I am fully willing to wait for it to happen. Just like all the other future goodies I dream of coming out. I still think eventual VHD support would still be a good idea and one I don't think is as inevitable.
shermanp
Posts: 14
Joined: Sat 18 Feb, 2017 2:09 am

Re: VHD support

Postby shermanp » Thu 15 Jun, 2017 12:51 am

Hi Sarah, I know this is an old thread, but have you had any further thoughts on adding official VHD support to PCEM?

Even though it's not a supported format, fixed VHD disks already "work" with PCem, although there's no guarantees that there are no issues (there are probably slight disk size calculation errors)

Looking at the specifications from MS, basic support for fixed VHD seems to be as simple as treating the file as an IMG file, but ignoring the last 512 bytes, although the footer does contain CHS info that could be useful.

Fixed VHD creation support looks to be not much more complex than generating a footer and appending it to the image.

I would look into doing it myself, but I'm not quite sure where I would need to start: 'allegro-gui-hdconf.c' looks a likely candidate, but I'm not sure if any of the "disc" code would also need updating.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: VHD support

Postby Battler » Thu 15 Jun, 2017 3:22 pm

- shermap: The "disc" stuff is for floppies. The hard disk images are handled separately by every single hard disk controller, so there's quite a few files you'd need to change.
szadycbr
Posts: 187
Joined: Mon 21 Nov, 2016 6:23 pm

Re: VHD support

Postby szadycbr » Fri 15 Sep, 2017 2:35 pm

I was searching where to post this, so it is for here. i had virtual machine on vbox i linux and annoying fact that i could not get fallout screen to fill whole screen as vbox will display small 640 "full screen" on 1366 screen. so i thought , well PCem should handle fallout easy, but i didn fell like to creating new disk for PCem and installing win98, so i just renamed 2GB .vhd image to .img and attached it to PCem, PCem launcher found automatically disk geometry , and 430vx found and boot up with no problems, ha ha ? i wonder does it work both ways? ill try but i doubt, but if so, then .vhd appears to behave in same way as .img.
szadycbr
Posts: 187
Joined: Mon 21 Nov, 2016 6:23 pm

Re: VHD support

Postby szadycbr » Fri 15 Sep, 2017 2:54 pm

so yeah, i did rename it to original .vhd and vbox runs win no probs, then that very .vhd image created by vbox i did again rename to .img and run on PCem , no probs. Then i left that img and try to mount it in vbox without renaming that file, although vbox 4.1 in linux have no .img option so i chose "show all files" and select that .img, and it accept it no probs, and now i can run one img file in PCem and vbox at the same time. cool. But each time i start win then of course few drivers must reinstall as they are different machines. so whats the problem? whats the difference if .vhd after renaming to .img runs in PCem and in vbox?
i wonder , does .img created by PCem run in vbox , same way?
Will see later, but now i did checked one more thing, PCem have only .img option but after choosing "show all files" i can select .vhd and PCem accept it without a word and it boot up without even rename the file.
I used 2GB vhd file from vbox and PCem get it as S63 H16 Cyl.4214 size 2074mb.
So what are really the differences between .img and .vhd?
shermanp
Posts: 14
Joined: Sat 18 Feb, 2017 2:09 am

Re: VHD support

Postby shermanp » Sat 16 Sep, 2017 9:35 pm

The only difference between the IMG files that PCEM creates (they are raw disk images), and (fixed) VHD files is that VHD files have a 512 byte footer appended to the end of the file.

My only worry with using VHD files with PCEM is if PCEM decides to write some data at the very end of the disk image. It could potentially overwrite the footer.
szadycbr
Posts: 187
Joined: Mon 21 Nov, 2016 6:23 pm

Re: VHD support

Postby szadycbr » Sun 17 Sep, 2017 6:42 am

aha, thanks, so only if i use the vhd extensively in PCem it might get unusable by Vbox, i tried original PCem .img in vbox, and it could not get storage format from the file.
conclusion? .vhd can be used by PCem with caution.
I wonder, could anyone of you guys try to "teach" PCem to do not write on this last 512 bytes? only if PCem could read each time proper geometry from .vhd.
Ill try to fill this disk to full in PCem and see what Vbox will say.
szadycbr
Posts: 187
Joined: Mon 21 Nov, 2016 6:23 pm

Re: VHD support

Postby szadycbr » Sun 17 Sep, 2017 7:19 am

so Vbox didnt accept the small 256MB img file created by PCem, so I did fill up the 2GB disk to full under DOS and place it in Vbox, it still accept the disk but it was:
FATAL : Could not read from the boot medium! system halted.
So yeah, probably that was footer fault. Still , you can use .vhd with OS created in Vbox in PCem, but not other way around, at lest in my case on 2GB fixed .vhd .
User avatar
omarsis81
Posts: 545
Joined: Thu 17 Dec, 2015 6:20 pm

Re: VHD support

Postby omarsis81 » Tue 19 Sep, 2017 7:02 pm

A really good feature that would help to install new files into the emulator could be the ability to have an emulated drive linked to a specific folder into a host drive.
That would be a huge help, since what I do now to inject files into the emulated HD is to open the virtual HD with WinImage, but this is big pain...
What do you think Sarah?

Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests