Page 1 of 1

File corruption inside .vhd

Posted: 20. Oct 2020, 06:43
by OrtEppi
Hi

I tried to create hard disk from a Ghost image inside the virtual machine. Every time I tried to clone the HD the file inside the VM from the Ghost image, the file was broken. I did several different kind of tests to make sure I didn't do anything wrong during the process.

Here is how I did things.

1. I created new .vhd image file in Windows host computer with Disk manager (diskmgmt.msc).
2. When the .vhd was mounted on the Windows host computer, I copied a known working copy if Ghost image inside this .vhd.
3. After the copy was done I checked this file with Ghost integrity check. The file was intact.
2. Unmounted the .vhd from Windows host computer
4. Mounted the .vhd to guest OS as a second hard drive (secondary master)
5. Started the guest computer from a virtual CD with Hirens Boot CD
6. When Hirens was started I checked the image inside the .vhd. Ghost integrity checks shows CRC errors at the very begin of the checking process.
7. Finaly I did a hash calculation from the file in host computer and then in the guest computer. Hash calculations shows different checksum when the calculation is done inside the Guest OS.
8. When remounting the .vdi back to Windows host computer, the hashes are fine again.

The last thing I tried to do was to use .vdi image for bringing the Ghost image available for the guest OS. I converted the .vhd image to the .vdi image with the tools provided with VirtualBox. This cloning process ended without erroros. But when this disk is mounted on a guest OS, the same CRC and hash-errors occures with the Ghost image file.

I have Symantec Ghost executable files on the same hard disk with the Ghost image file. I don't see any problems running the Ghost from this disk; these files don't get corrupted.

The Ghost image file size is about 86,9 GB

The subject of this question is partially wrong since the file inside the .vhd doesn't actually get corrupted, but it just seems this way when reading it in the guest OS.

I eventually ended up using HyperV....
I really wanted to use VirtualBox because I need to use the hardware serial ports and they work much better in VirtualBox

Re: File corruption inside .vhd

Posted: 21. Oct 2020, 17:47
by scottgus1
Hashing inside a Virtualbox guest is known to have trouble while Hyper-V is enabled. One thing you don't appear to state in your post is Minimum Info Needed for Assistance, which would help us help you better.

If you are still on Virtualbox 6.1.14 or earlier, try the new 6.1.16, it is based on test builds which were supposed to have a fix for this issue.

Or disable Hyper-V when running the Virtualbox guest. See I have a 64bit host, but can't install 64bit guests, especially the bcdedit command.

Finally, be sure to make a fixed-size VHD when using VHD's. There is a design flaw with dynamically-sizing VHD that can result in loss of the entire drive file if a host error occurs while the VHD is expanding.