HOWTO: Resolve CID_MISMATCH error with VMware virtual machine

This HOWTO describes how to resolve a situation where a running virtual machine suddenly abruptly powers off and when you attempt to start it again, you are given the error “the content ID of the parent virtual disk does not match the corresponding parent content ID of the child”.

In this instance, a virtual machine called FSRVCLOAPP17 failed in the middle of the night.  An attempt to manually power the VM back on resulted in the error:

image

The VM had a warning on it that stated “disk consolidation is required”  If you tried to complete this consolidation however, you will be given an error “CID_MISMATCH”.  There is an imposing VMware KB article on how to resolve this issue here:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007969

The rest of this HOWTO will basically provide a picture walkthrough of the VMware KB Article. 

Warning:  If you are not comfortable with the VMware CLI or the concepts presented here, do not proceed and instead call VMware.  It would be very easy to permanently corrupt the VM if these steps are followed incorrectly.

  • The first thing we need to do is log into the CLI and open the folder where the VM resides
  • Export a list to Excel of all of the VMDK files, excluding the –flat and –clk files
  • Identify what you have for files.  Typically you’ll have a file for the C: and E: drives, another for the C: and E: drives for the first snapshot and then most likely another snapshot only for one of the disks for the second snapshot
  • Run the command vmkfstools –e [vmdkfile] on each of the files
  • If the file is configured properly, you should get a response Disk chain is consistent

clip_image004

  • If the file is broken however, you’ll get a much longer error message as presented below

clip_image006

  • Repeat this process for all VMDKs and note which ones were valid and which ones were not in your Excel file
  • Identify the base disk for the snapshots that have an inconsistent chain and edit the vmdk file
  • Edit this base disk VMDK file and record the CID and parentCID noted in the file in your Excel spreadsheet
    (note the screenshot below was taken after the issue was resolved so the CID will not match the rest of the documentation as it was changed once the consolidation was successful)

clip_image008

  • Repeat this process for all broken snapshots
  • Review your results.  What you need to do is make sure that the CID/Parent CID relationship “flows” properly whereby:
    • The base disk has a CID1 and a parent id of ffffffff (since it’s the root)
    • Snapshot 1 has CID2 and a parent id that matches CID1 (Base disk)
    • Snapshot 2 has CID3 and a parent id that matches CID2 (Snapshot 1)

clip_image010

  • Once you have identified what hex value changes are required, make a backup of the vmdk files you will change and then edit the required vmdk files and make the necessary changes
  • Once again run the command vmkfstools –e [vmdkfile] on the affected files.  You should find they are no longer reporting broken

clip_image012

  • From the VI Client / Web Client, perform a disk consolidation.  Unlike before this should now complete successfully
  • Power on the virtual machine.  If all went well, the VM should now power up successfully

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.