VMware Cloud Community
mbmast
Enthusiast
Enthusiast

The virtual disk is invalid or needs to be repaired AND vmware-vdiskmanager does NOT fix the problem

I'm running vmware-vdiskmanager -R against a VMDK file that produces "the virtual disk is invalid or needs to be repaired" errors in VCenter Converter.  vmware-vdiskmanager does NOT report anything; it just silently returns to the command prompt after a second or two and does not fix the problem.

vdisk-vdiskmanager -e reports: Disk chain is consistent.

Now what?  What to do when vmware-vdiskmanager -R does not fix the problem?

0 Kudos
8 Replies
continuum
Immortal
Immortal

What to do when vmware-vdiskmanager -R does not fix the problem?

1. run it again and again and again ... - check vmware-vdiskmanager.log wether the amount of reported errors go down

2. run chkdsk on the host and try to copy the vmdk to another disk

3. do NOT use compressed NTFS, exFat, Fat32, Storage-spaces and other new Windows-storage features

4. try vmware-vdiskmanager -r corrupt.vmdk fixed.vmdk ( sometimes useful )

5. try to use vmware-vdiskmanager from older Workstation-versions

6. if it still fails - try thirdparty tools like Starwind V2V converter

In case the VM still works ... attach a new vmdk

1. boot the VM into a Linux LiveCD and use ddrescue to clone the bad.disk  to a new.disk


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
mbmast
Enthusiast
Enthusiast

So I'm not having very good luck with vmware-vdiskmanager -R.  When I run it, it runs for at most 2 seconds and then completes silently.  There is no vmware-vdiskmanager.log file anywhere on the hard drive.  If I give vmware-vdiskmanager a fictitious file name, it completes exactly the same way; runs for under 2 seconds and then silently completes.  Does not complain that the file can't be found.  E.g. vmware-vdiskmanger -R nosuchfile.xyz ( a non-existent file ) completes silently, with no errors and no log file.

What is with this utility?

0 Kudos
continuum
Immortal
Immortal

Do you have vmware-vdiskmanager that comes with Workstation or do you use the one that came with ancient VDDK versions ?


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
mbmast
Enthusiast
Enthusiast

I'm using the one that came with Workstation 14 Pro (14.1.2).

0 Kudos
continuum
Immortal
Immortal

I consider that version as a bluff - I have not seen that the -R options works at all.
Last know good one came with Workstation 7. (yes - version seven)
Have you tried to copy the VMDK to another disk ?
At the moment I think that use Starwind V2V converter is one of your best options if the VM no longer works at all.
If the VM still works - try the workaround I already mentioned above.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
a_p_
Leadership
Leadership

You can find version 7 attached to KB article https://kb.vmware.com/s/article/1023856​.

Make sure you backup the VM's files prior to running the repair!

If this still doesn't help, then provide a complete list of files in the VM's folder (i.e. the output of dir *.*), and attach the VM's vmware.log file to a reply post. Depending on the damage it might be possible to fix the .vmdk file(s) manually.

André

0 Kudos
marcosmanoel
Contributor
Contributor

Hi continuum, I'm Marcos, I'm from Brazil. You helped me a lot today with your tips in this post.
My environment is a 53GB VMWare, which on reboot displayed the error: "The specified virtual disk needs repair", I tried the command at the prompt "C: \ Program Files (x86) \ VMware \ VMware Workstation> vmware-vdiskmanager.exe - R + name file " but returned the error message:" The virtual disk ... is corrupted and cannot be repaired ", I tried to recover the virtual machine from backup but it was old. With your tip of running StarWind V2V Converter on the bad machine, everything went well. It worked! Just had to remove Hard Disk and add another Hard Disk associated with the recovered.
I am very grateful to you for your post.

0 Kudos
jgoldvm
Contributor
Contributor

I had this same problem yesterday.  StarWind costs money but I was able to use the disk conversion utility from Virtualbox (VBoxManage) to fix my vmdk file.  I converted it to a VirtualBox vdi format and then back to a vmdk.

>VBoxManage clonehd --format VDI [myfile.vmkd] [myfile.vdi]

Next...

>VBoxManage clonehd --format VMDK [myfile.vdi] [myfile.vmdk]

I renamed the orignal vmdk file so I'd still have a copy of it. This fixed my corrupt disk issue.

0 Kudos