VMware Communities
Josef2020
Contributor
Contributor
Jump to solution

'Virtual Disk.vmdk' has one or more internal errors that cannot be fixed.

Cannot run  a virtual machinea(Mac OSX windows7 x64 .vmware) after a force quit.

Error message:

The disk '/Applications/2018-11-20VMware Windows 7 x64.vmwarevm/Virtual Disk.vmdk' has one or more internal errors that cannot be fixed.

Note:

Restore from a backup copy of this disk.

The specified virtual disk needs repair

Cannot open the disk '/Applications/2018-11-20VMware Windows 7 x64.vmwarevm/Virtual Disk.vmdk' or one of the snapshot disks it depends on.

Module 'Disk' power on failed.

Failed to start the virtual machine.

 

Attached logs file.

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

The file contains one mismatch in its grain tables, and is ~512MB too large, i.e. none of the grains point to the additional space.

To fix this, run the following commands:

printf '\x00' | dd of="Virtual Disk.vmdk" bs=1 seek=72 count=1 conv=notrunc

printf '\x80' | dd of="Virtual Disk.vmdk" bs=1 seek=8114408 count=1 conv=notrunc
printf '\x2B' | dd of="Virtual Disk.vmdk" bs=1 seek=8114409 count=1 conv=notrunc
printf '\xF1' | dd of="Virtual Disk.vmdk" bs=1 seek=8114410 count=1 conv=notrunc
printf '\x01' | dd of="Virtual Disk.vmdk" bs=1 seek=8114411 count=1 conv=notrunc

dd if=/dev/null of="Virtual Disk.vmdk" bs=1 seek=23543873536 count=1

Line 1 will reset the "uncleanShutdown" flag
Lines 2-5 will fix the grain table mismatch
Line 6 will truncate the .vmdk file to the expected size

Since the root cause of this corruption isn't known, I strongly recommend that you backup the .vmdk file before making the modifications. There's also a chance of file system corruption within the guest OS.

André

View solution in original post

0 Kudos
7 Replies
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

from a first look at the logfile it seems as if the file is truncated by approximately a half MB.

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="Virtual Disk.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
Josef2020
Contributor
Contributor
Jump to solution

Thank you!

Attached .zip archive for review.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

According to the .vmdk file's header data, the metadata occupies 25.728 blocks (512 Bytes each).

Please run:

dd if="Virtual Disk.vmdk" of="Metadata-full.bin" bs=512 count=25728

to extract the metadata, then compress/zip it and attach the .zip archive to your next reply.

André

0 Kudos
Josef2020
Contributor
Contributor
Jump to solution

 

Please see the attachment named Metadata-full.bin.zip, Thank you!

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The file contains one mismatch in its grain tables, and is ~512MB too large, i.e. none of the grains point to the additional space.

To fix this, run the following commands:

printf '\x00' | dd of="Virtual Disk.vmdk" bs=1 seek=72 count=1 conv=notrunc

printf '\x80' | dd of="Virtual Disk.vmdk" bs=1 seek=8114408 count=1 conv=notrunc
printf '\x2B' | dd of="Virtual Disk.vmdk" bs=1 seek=8114409 count=1 conv=notrunc
printf '\xF1' | dd of="Virtual Disk.vmdk" bs=1 seek=8114410 count=1 conv=notrunc
printf '\x01' | dd of="Virtual Disk.vmdk" bs=1 seek=8114411 count=1 conv=notrunc

dd if=/dev/null of="Virtual Disk.vmdk" bs=1 seek=23543873536 count=1

Line 1 will reset the "uncleanShutdown" flag
Lines 2-5 will fix the grain table mismatch
Line 6 will truncate the .vmdk file to the expected size

Since the root cause of this corruption isn't known, I strongly recommend that you backup the .vmdk file before making the modifications. There's also a chance of file system corruption within the guest OS.

André

0 Kudos
Josef2020
Contributor
Contributor
Jump to solution

 

Awesomeጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ!

Issue has been fixed with the commands, thank you for the great help ४*ପ꒰⑅︎•ᴗ•。꒱໊੭.

0 Kudos
Thamper
Contributor
Contributor
Jump to solution

The same error, but Im using Windows 10 as host. Can you help me?

Which commands I need to enter for windows 10?

0 Kudos