VMware Communities
EchoCalls
Contributor
Contributor

Virtual Disk.vmdk' has one or more internal errors that cannot be fixed (Orphaned Grains)

I figured instead of making anew post for this, I would just piggy back on the OP one lol. I'm having this same problem as of yesterday. I've attached the problem zip file, and I'm about to go through all the command prompts to get the other info for you. Thanks in advance!

0 Kudos
13 Replies
EchoCalls
Contributor
Contributor

Here is the .vmdk file as well.

0 Kudos
a_p_
Leadership
Leadership

Welcome to the Community,

issues may look similar, but in your case, one of the files contains almost 3,000 errors.

Let's see whether this can be fixed.

Please run:

dd if="Virtual Disk-s008.vmdk" of="Metadata-w10.bin" bs=512 count=1024

and attach the Metadata file to your net reply.

I may take some time until I can take a detailed look at this later today, so please be patient.

André

Moderator note: I've branched this to a new discussion.

0 Kudos
EchoCalls
Contributor
Contributor

Run the entire line? I ran it in terminal and it shows no such file or directory.

0 Kudos
a_p_
Leadership
Leadership

You need to run the command from within the VM's folder/package.

André

0 Kudos
EchoCalls
Contributor
Contributor

Are you referring to the log files? I'm already in the virtual machines folder in Finder.

0 Kudos
EchoCalls
Contributor
Contributor

Here are the logs and ls.txt files.

0 Kudos
a_p_
Leadership
Leadership

In the Terminal you need to use the cd command to change to the /Users/Engraver/Documents/Virtual Machines.localized/Windows 7.vmwarevm folder, and run the command from there. The command ls -l will show you all the files in the folder, including the corrupted .vmdk file, from which I need the metadata.


André

0 Kudos
EchoCalls
Contributor
Contributor

Did you just need the .bin file name?

0 Kudos
EchoCalls
Contributor
Contributor

Scratch that last reply, I had to un hide my files in folders.

0 Kudos
EchoCalls
Contributor
Contributor

Got an update?

0 Kudos
a_p_
Leadership
Leadership

I told you that you need to be patient 😉

Anyway, here we go. What needs to be done is to reduce the .vmdk's file size, and fix some metadata errors.

I assume that you have sufficient (~4GB) free disk space.

Please follow the steps in the exact order:

  1. open a Terminal, and change to the VM's folder
  2. rename "Virtual Disk-s008.vmdk" to "Virtual Disk-s008.old"
  3. run the following command to clone the required data (exactly 4,073,783,296 Bytes)
    dd if="Virtual Disk-s008.old" of="Virtual Disk-s008.vmdk" bs=64k count=62161
  4. extract "Metadata-w7.fixed" from the attached archive, and save it to the VM's folder, then inject the fixed metadata using
    dd if="Metadata-w7.fixed" of="Virtual Disk-s008.vmdk" bs=512 count=1024 conv=notrunc

Due to the file corruption, it might be a good idea to take a snapshot before you power on the VM, and then run a file system check within the guest OS. If everything looks as expected, then don't forget to delete the snapshot again. As a last step you may want to delete the renamed "Virtual Disk-s008.old" to free up disk space.

André

PS: It's up to you to do a complete backup prior to running the above commands!

0 Kudos
EchoCalls
Contributor
Contributor

Outstanding! It fixed everything with no problems doing it either. Thank you so much! Now, is there something specific that caused the corruption, or is there something I can do to make sure it doesn't happen again?

0 Kudos
a_p_
Leadership
Leadership

Glad to hear that.

I can't unfortunately tell you what may have caused this to happen. What I can recommend is, that you maintain an up-to-date backup (please note other users mentioned that TimeMachine may be unreliable for VMs) for cases where fixing such issues may not be possible.

André

0 Kudos