VMware Communities
mfaster
Contributor
Contributor

VMDK has one or more internal errors that cannot be fixed

Please help.  I get this error after aborted clean up of VM.

Running Fusion 12.1.0 on Mac OS Catalina 10.15.7

I am attaching zipped log files.  

0 Kudos
7 Replies
a_p_
Leadership
Leadership

Welcome to the Community,

I can't promise you anything, but if you don't have a recent backup, I can take a deeper look at this.

As a first step, and to see what can be done,

  • open a terminal window, and go to the VM's .vmwarevm folder
  • run: ls -l > filelist.txt (to create a file listing, which contains all of the VM's files with their file names, sizes, time stamps, ...)
  • run: dd if="Windows 7 x64.vmdk" of="Metadata-1536.bin" bs=1536 count=1
  • then compress/zip filelist.txt, an Metadata-1536.bin, and attach the .zip archive to a reply post.

Based on the results, I will then provide you with another dd command, to extract all metadata (no userdata) from the .vmdk file.

André

0 Kudos
mfaster
Contributor
Contributor

Thank you for the reply/response.   While I do not have a back up, I do still have access to all of the user data as I was sharing the disk between the Mac OS Host and the Win10 Documents folders.

I will perform the steps you suggested and upload later today or this week.

I am weighing path of least effort to recover:

  • if some cmds executed against VMDK can bring it back to life
  • rebuild clean Win10 VM with apps and reconnect to Data
  • Abandon all hope on Win10 VM and convert app functionality all to Mac(basic office apps) only remaining requirement for windows is redirected printing from a windows server to the local Windows network printer, and I may get that working on the Mac as well.

Sorry for the TMI(too much info) but wanted to provide context/priority guidance as I don't consider my situation to be the emergency some other folks faced on this thread

0 Kudos
mfaster
Contributor
Contributor

Here are the requested files

0 Kudos
a_p_
Leadership
Leadership

According to the file, the metadata occupies 53,888 sectors, so please run

dd if="Windows 7 x64.vmdk" of="Metadata-full.bin" bs=512 count=53888

then compress/zip Metadata-full.bin, and attach the .zip archive to a reply post.

André

Evaluation result:

    Offset Lenght Value Dezimal
         
unint32 magicNumber; 0 4 56 4D 44 4B VMDK
unint32 version; 4 4 00 00 00 01 1
unint32 flags; 8 4 00 00 00 03 3
SectorType capacity; 12 8 00 00 00 00 1A 40 00 00 440.401.920
SectorType grainSize; 20 8 00 00 00 00 00 00 00 80 128
SectorType descriptorOffset; 28 8 00 00 00 00 00 00 00 01 1
SectorType descriptorSize; 36 8 00 00 00 00 00 00 00 14 20
unint32 numGTEsPerGT; 44 4 00 00 02 00 512
SectorType rgdOffset; 48 8 00 00 00 00 00 00 00 15 21
SectorType gdOffset; 56 8 00 00 00 00 00 00 69 4A 26.954
SectorType overHead; 64 8 00 00 00 00 00 00 D2 80 53.888
Bool uncleanShutdown; 72 1 01 1
char singleEndLineChar; 73 1 0A 10
char nonEndLineChar; 74 1 20 32
char doubleEndLineChar1; 75 1 0D 13
char doubleEndLineChar2; 76 1 0A 10
uint16 compressAlgorithm; 77 2 00 00 0
0 Kudos
mfaster
Contributor
Contributor

Here's the resulting Metadata-full.bin

0 Kudos
mfaster
Contributor
Contributor

oops I didn't mean to mark this as Corrected...can you incorrect this for now?

 

Thanks,  Mike

0 Kudos
a_p_
Leadership
Leadership

With the aborted clean operation, it's unpredictable in which exact state the cleanup has been terminated, and I had to make a couple of assumptions to at least fix the metadata, so that the virtual disk should be recognized as such again.

Please extract the "Metadata-fixed.bin" from the attached .zip archive, copy it to the VM's folder, and run the following two commands.
dd if="Metadata-fixed.bin" of="Windows 7 x64.vmdk" bs=512 count=53888 conv=notrunc
dd if=/dev/null of="Windows 7 x64.vmdk" bs=1 seek=111530147840 count=1

Line 1 will replace the corrupted metadata
Line 2 will truncate the .vmdk file to the expected size

I strongly recommend that - unless already done - you backup the .vmdk file before making the modifications.
Please note that there's also a high chance of file system corruption within the guest OS.

Prior to powering on the VM with the fixed metadata, take a VM snapshot, so that you can revert to it in case it's necessary.

André

0 Kudos