Latest Posts



Translate

Total Pageviews

Wednesday, 11 September 2013

Resolving the CID mismatch error: The parent virtual disk has been modified since the child was created (1007969)

riptor files affected

There are several methods to log into an ESX host to review content of utilized datastores, depending on the version of ESX utilized. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
Notes:
  • The datastore browser provided in the VMware vSphere Client or VMware Infrastructure Client do not distinguish between virtual machine descriptor (1) and flat or delta files (2). They are collapsed into singular entities to make datastore browsing simpler. As you need to distinguish between the two files, use the additional access methods provided in the referenced article.
  • The web-based Datastore Browser, accessible via https://server-ip, is used to browse VMFS datastores and distinguish between the virtual machine descriptor files and their corresponding associated binary files. You can copy the relevant file from the Datastore Browser for editing. The edited file can be uploaded to the datastore again via the vSphere Client.
  • Due to the nature of the problem experienced, the quickest method for resolving the issue is with the Command Line Interface available on the individual ESX host. Utilize this method if you have sufficient background knowledge on command-line usage. Alternatively, you can use the VMware vSphere Command Line Interface (CLI) or VMware vSphere Management Assistant appliance (vMA) to obtain the virtual machine disk descriptor files for review.
  • If you are unable proceed, please file a support request with VMware Technical Support. For more information, see Filing a Support Request in My VMware (2006985).
After locating the virtual machine's files and directory:
  1. The virtual machine's vmware.log file contains information which identifies the specific disk chain affected. Review the logs and note the location and files affected.

    Example:

    vmx| DISKLIB-LINK : Attach: Content ID mismatch (d0fdb25b != ef4854ee).
    vmx| DISKLIB-CHAIN : "/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm.vmdk" : failed to open (The parent virtual disk has been modified since the child was created).
    vmx| DISKLIB-VMFS : "/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm-000002-delta.vmdk" : closed.
    vmx| DISKLIB-VMFS : "/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm-000001-delta.vmdk" : closed.
    vmx| DISKLIB-VMFS : "/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm-flat.vmdk" : closed.
    vmx| DISKLIB-LIB : Failed to open '/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm-000002.vmdk' with flags 0xa (The parent virtual disk has been modified since the child was created).
    vmx| DISK: Cannot open disk "/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm-000002.vmdk": The parent virtual disk has been modified since the child was created (18).
    vmx| Msg_Post: Error
    vmx| [msg.disk.noBackEnd] Cannot open the disk '/vmfs/volumes/4a365b5d-eceda119-439b-000cfc0086f3/examplevm/examplevm-000002.vmdk' or one of the snapshot disks it depends on.
    vmx| [msg.disk.configureDiskError] Reason: The parent virtual disk has been modified since the child was created.----------------------------------------
    vmx| Module DiskEarly power on failed.

    Note: This indicates that the file examplevm-000002.vmdk references its parent (which in itself references another parent file), one of which has been modified some time after examplevm-000002.vmdk was created. You must take corrective measures on any of these files: examplevm.vmdkexamplevm-000001.vmdk , and examplevm-000002.vmdk.
  2. With the problem point (or points) determined, make backup copies of the disk descriptor files that require corrections or editing. In the example above, backups of examplevm.vmdkexamplevm-000001.vmdk , and examplevm-000002.vmdk are required.
  3. Review the contents of each affected descriptor file and compare the mismatching values. For example:

    examplevm.vmdk:
    CID= 12a9ffab
    parentCID=ffffffff
    examplevm-000001.vmdk:
    CID=69a1c662
    parentCID= 7b7644b2
    examplevm-000002.vmdk:
    CID=59fab513
    parentCID=69a1c662

    Disk examplevm-000002.vmdk links to examplevm-000001.vmdk without error. However, the base disk examplevm.vmdk has been modified, causing the error.

Correcting the Content ID mismatch

At this point, the problem point has been identified, the virtual machine's files have backups, and corrections must be applied.
To correct the Content ID mismatch:
Warnings:
  • The CID mechanism is in place to prevent data corruption. Depending on the changes incurred upon the parent file or files, the guest operating system may be unable to boot successfully even after making corrections. A backup recovery should be made available for such circumstances.
  • The steps outlined here are potentially hazardous for your environment if they are not followed exactly. If you are not comfortable performing these steps, contact VMware Technical Support and work with them to resolve the issue.
  1. Confirm that the disks reference each other:

    Example descriptor file for a base disk examplevm.vmdk:

    # Disk DescriptorFile
    version=1
    CID= 12a9ffab
    parentCID=ffffffff
    createType="vmfs"

    # Extent description
    RW 20971520 VMFS examplevm-flat.vmdk"

    # The Disk Data Base
    #DDB
    ddb.toolsVersion = "0"
    ddb.adapterType = "lsilogic"
    ddb.geometry.sectors = "63"
    ddb.geometry.heads = "255"
    ddb.geometry.cylinders = "1305"
    ddb.uuid = "60 00 C2 9f ae de ba e9-95 4e a7 a6 4e 95 c1 c1"
    ddb.virtualHWVersion = "4"
    Example descriptor file for delta diskexamplevm-000001.vmdk:

    # Disk DescriptorFile
    version=1
    CID= 69a1c662
    parentCID= 7b7644b2
    createType="vmfsSparse"
    parentFileNameHint= "examplevm.vmdk"
    # Extent description
    RW 20971520 VMFSSPARSE "examplevm-000001-delta.vmdk"
    # The Disk Data Base
    #DDB
    ddb.toolsVersion = "7302"
    Example descriptor file for child delta disk examplevm-000002.vmdk:
    # Disk DescriptorFile
    version=1
    CID=59fab513
    parentCID= 69a1c662
    createType="vmfsSparse"
    parentFileNameHint= "examplevm-000001.vmdk"
    # Extent description
    RW 20971520 VMFSSPARSE "examplevm-000002-delta.vmdk"
    # The Disk Data Base
    #DDB
    ddb.toolsVersion = "7302"

    Note: The linking or chain references are highlighted in blue. This example shows that examplevm-000002.vmdk as a child ofexamplevm-000001.vmdk, which in turn is a child of examplevm.vmdk. These three disk files make up a singular virtual disk from the perspective of the virtual machine and guest operating system.
  2. Using a text editor, correct the mismatch at either of the two problem points. For more information, see Preferred Editors in Editing configuration files in VMware ESXi and ESX (1017022). You may either correct examplevm.vmdk, per this example, or theexamplevm-000001.vmdk disk file. In either circumstance, the parentCID and CID relationship must be valid.

    Exampleexamplevm.vmdk can have its CID changed to 7b7644b2, making it match examplevm-000001.vmdk's expectedparentCID value. Alternatively, examplevm-000001.vmdk's parentCID value can be changed to 12a9ffab to matchexamplevm.vmdk's base disk descriptor file's CID. You may also consider creating a CID value on your own.

    Note: The CID consists of eight (8) hexadecimal lower-case digits (00000000-ffffffff) with no delimiter characters.

Verifying the CID corrections

The corrections made to the virtual machine files are usually not immediately acknowledged in the remainder of the product. As such, subsequent power-on attempts may not succeed as yet.
To verify the CID corrections:
  1. Log into the VMware vSphere Client or VMware Infrastructure Client.
  2. Select the virtual machine in the Inventory and click the Summary tab.
  3. Under Resources, right-click the datastore that contains the virtual machine's configuration file and select Browse. The Datastore Browser opens.
  4. Locate the virtual machine's directory and files. You can minimize it for now, as it will be used in step 7.
  5. Right-click the virtual machine and choose Remove from inventory.
  6. When prompted, confirm your selection by clicking Yes. The virtual machine disappears from the inventory on the left.
  7. Restore the Datastore Browser from step 4, right-click the virtual machine's configuration file (for example, examplevm.vmx), and choose Add to Inventory.
  8. Follow the on-screen prompts to bring the virtual machine back into the inventory.

    Warning
    : Do not power on the virtual machine unless you have a valid copy or backup of all of its files. When the virtual machine has been powered on, further irreversible changes are applied to the disk structure.
  9. When ready, power on the virtual machine and verify the guest operating system's status. A file system integrity check may be performed to seek out and repair any complications that arise from the disk chain changes that caused the initial CID mismatch.

You can also verify if the CID mismatch has been corrected by running this command against the highest level snapshot .vmdk :

vmkfstools -q snapshot_ xxxxxx#.vmdk -v10 | less

or

For ESXi 5.1:

vmkfstools -e snapshot_ xxxxxx #.vmdk

Note: If there are failed messages in the results, the CID mismatch has not been corrected or there is still a mismatch in the snapshot hierarchy.

Alternative procedure

At this point, the virtual machine should start successfully if the changes incurred were minimal. The guest operating system can exhibit varying symptoms, depending on what occurred in the snapshot.
However, if the virtual machine is not in an acceptable state, you may be required to restore from a backup copy. If one is not available, you can consider starting the virtual machine on older disks.
Example: The virtual disk referenced for the provided example is examplevm-000002.vmdk . If necessary, the virtual machine's configuration file can be modified to boot from examplevm-000001.vmdk, permanently invalidating examplevm-000002.vmdk. This may allow the guest operating system to proceed as intended, but at the cost of losing all information contained in the examplevm-000002.vmdk delta file.
You can log into a VMware ESX or VMware Command Line Interface to edit the virtual machine's configuration file, and you can copy the file from the datastore for editing on another system using a preferred text editor.
For additional information on this topic, see Editing configuration files in VMware ESXi and ESX (1017022).
If you are unable proceed, please file a support request with VMware Technical Support. For more information, see Filing a Support Request in My VMware (2006985).
THE CONTENT OF THIS ARTICLE IS PROVIDED "AS-IS," AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, VMWARE DISCLAIMS ALL OTHER REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS CONTENT, INCLUDING THEIR FITNESS FOR A PARTICULAR PURPOSE, THEIR MERCHANTABILITY, OR THEIR NONINFRINGEMENT. VMWARE SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF THIS CONTENT, INCLUDING DIRECT, INDIRECT, CONSEQUENTIAL DAMAGES, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF VMWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

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