Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Troubleshooting parent virtual disk errors in Fusion (1018832)

Symptoms

  • You are unable to power on a virtual machine
  • Fusion presents this error:

    Cannot open the disk ".../<Virtual Disk>.vmdk"
    Reason: The parent virtual disk has been modified since the child was created.

Resolution

This article provides information about:

The parent/child relationship

 
Each time a snapshot is taken, a parent/child relationship is created and a snapshot chain is created (or expanded, in the case of subsequent snapshots). When the snapshot is taken, the main disk (or the snapshot that you had been running off of previously) becomes the parent and the (new) snapshot becomes the child. This parent/child relationship of all of the virtual disks and snapshots in the virtual machine make up the snapshot chain. For more information on snapshots, see Understanding Snapshots and AutoProtect in VMware Fusion (1014509).

Here is an example, with snapshots numbered in the order in which they were taken:
 
Windows XP.vmdk is the main disk and parent of Windows XP-000001.vmdk
Windows XP-000001.vmdk is the child of Windows XP.vmdk and parent of Windows XP-000002.vmdk
Windows XP-000002.vmdk is the child of Windows XP-000001.vmdk and parent of Windows XP-000003.vmdk
Windows XP-000003.vmdk is the child of Windows Windows XP-000002.vmdk
 
Note: Snapshots are numbered in the order they are taken, but numbers are re-used as available. Therefore, it is possible to delete one snapshot (from the middle of a chain), take a new snapshot, and get a new snapshot with a lower number than other snapshots.

Each virtual disk (.vmdk file) has both its own disk identifier (CID) and the identifier of its parent virtual disk (parentCID). Because the main disk does not have a parent, its parentCID is set to ffffffff.
 
In some cases (often the result of a failed snapshot creation/restoration), the virtual disk identifier (CID) or the identifier of the parent virtual disk (parentCID) of the main disk or one of the snapshots may be changed. It is these CIDs and parentCIDs that constitute the snapshot chain (since the snapshot numbers are unreliable). A change to one CID but not to its corresponding parentCID (or vice-versa) breaks the snapshot chain.  
If the problem is only an incorrect CID or parentCID, then the issue can be resolved by repairing the snapshot chain. If the problem is because the data contained in the parent virtual disk has actually been changed, then this issue cannot be resolved by repairing the snapshot chain. In both instances, you must go through this method to resolve the issue or to determine that the disk has been modified.
 
Note: VMware recommends backing up the entire virtual machine bundle before making changes to avoid possible data loss. For information on backups, see Best practices for virtual machine backup (programs and data) in VMware Fusion (1013628).  

Extracting the information required to investigate

To determine if there is a break in the snapshot chain due to an incorrect CID / parentCID, you must extract the CID information from the virtual disks. This can be done by using the head command in Terminal. The head command can be used on both monolithic and split disks. It simply reads the first 10 lines of the relevant file, so that the information from every virtual disk can be concatenated into one document. The support bundle can easily be used to determine where the virtual machine bundle is and what the virtual disk names are so that the terminal command can be customized.
 
In the case of virtual disks that have been split into 2 GB files, this information is in the disk descriptor file. That is, any files ending in .vmdk that do not have the letters s or f followed by three digits at the end of their name. For more information on the various virtual disk files, see Contents of the virtual machine bundle in Fusion (1021016).
 
In the case of monolithic disks, the information is contained in the disk itself.
 
In either case, the information is contained in the first 10 lines of the file. Use the head command to extract the information:
  1. Open Terminal. For instructions on opening Terminal, see Opening a command or shell prompt (1003892).
  2. Type head, press space, then drag each descriptor file (or monolithic . vmdk) into the Terminal window. After dragging the files into the Terminal window, type > ~/Desktop/CID.txt, then hit return.

    For example (with line breaks added for clarity):

    head /Users/yourname/Documents/Virtual\ Machines.localized/Windows\ XP.vmwarevm/Windows\ XP.vmdk
    /Users/yourname/Documents/Virtual\ Machines.localized/Windows\ XP.vmwarevm/Windows\ XP-000001.vmdk
    /Users/yourname/Documents/Virtual\ Machines.localized/Windows\ XP.vmwarevm/Windows\ XP-000002.vmdk
    /Users/yourname/Documents/Virtual\ Machines.localized/Windows\ XP.vmwarevm/Windows\ XP-000003.vmdk > ~/Desktop/CID.txt
This extracts the first 10 lines from these descriptor files and sends the results to a text document called CID.txt, which is created on your desktop.  

Investigating the Parent/Child CID relationship using the extracted information

The following extracted information is relevant:
 
Relevant information Example of how it would appear in the CID.txt
Child Name Windows XP Professional-000001.vmdk
Child CID CID=1afb355b
Parent CID parentCID=0f5d6e92
Parent Name parentFileNameHint="Windows XP Professional.vmdk"

The information contained in the CID.txt file is used to compare the parentCID of the child virtual disk to the CID of the parent virtual disk. Use parentFileNameHint to determine which virtual disk is the parent of the child disk, and then write out the snapshot chain so that you can easily see which . vmdk is the parent. When you determine the parent, compare the parentCID of the child to the CID of the parent. If the numbers differ, then there is a break in the relationship that must be corrected.

Note: The names of the snapshots can vary so they cannot be relied upon to determine the order of the snapshots in the chain or which disk is the child and which disk is the parent. For example, Snapshot-00012.vmdk can come before Snapshot-00006.vmdk. When creating snapshots, Fusion uses the lowest number available, so if some snapshots have been deleted, those names become available for use and would be reused later on. In all cases, use parentFileNameHint to determine what the parent disk is.

Here is an example CID.txt:
 

In this example, the main disk is Windows XP Professional.vmdk and it has 3 snapshots:
  • Windows XP Professional-000001.vmdk
  • Windows XP Professional-000002.vmdk
  • Windows XP Professional-000003.vmdk
Using the parentFileNameHint, the snapshot chain can be mapped from top to bottom by putting the earliest child first so that the chain can be investigated from the beginning to the end:
Windows XP Professional.vmdk
^
Windows XP Professional-000001.vmdk
^
Windows XP Professional-000002.vmdk
^
Windows XP Professional-000003.vmdk
When the snapshot tree is outlined, you then know the parentCIDs and CIDs that need to be compared.
 
In this case:
  • Compare the parentCID in Windows XP Professional-000003.vmdk to the CID in Windows XP Professional-000002.vmdk.
  • Compare the parentCID in Windows XP Professional-000002.vmdk to the CID in Windows XP Professional-000001.vmdk.
  • Compare the parentCID in Windows XP Professional-000001.vmdk to the CID in Windows XP Professional.vmdk.

There may be multiple breaks in the chain, so make sure to go through the entire chain to determine all possible breaks.

Breaks can include:
  • A difference between the parentCID and the expected CID.
  • A virtual disk that has an identical CID and parentCID.

    Note: This basically means that it is referencing itself. However, the parentFileNameHint will reference the correct (different) virtual disk.
Note: It is expected that the parentCID of the main disk is ffffffff.
 
In this example, the chain has been broken between Windows XP Professional-000002.vmdk and Windows XP Professional-000001.vmdk.
 
When you find all of the breaks in the chain, you can repair them.  

Repairing the Parent/Child CID relationship

The incorrect CID of the parent disk must be made to match the parentCID of the child virtual disk that points to it (in the parentFileNameHint). To do so, replace the CID of the parent by copying the parentCID number of the child and pasting it over the CID of the parent.
 
Disk descriptor files can be opened in TextEdit, but monolithic disks must be modified using the dd terminal command. Open a Terminal window and perform the following:
 

To output the contents, run this Terminal command:

dd if=<virtual machine.vmdk> of=<descriptor.txt> skip=1 count=1

where if= indicates the input file, of= indicates the output file (where you want to see the results; you can omit this section to print the results to the screen), we are skipping the first section of the file (with irrelevant information), and then printing a count of 1 section (with the information we need).

To input the modified contents, run this Terminal command:

dd conv=notrunc,nocreat if=<descriptor.txt> of=<virtual machine.vmdk> seek=1 count=1

 
Ensure that no two .vmdk files have the exact same CID (minor differences are fine).
 
In rare cases, when the CID and the parentCID of one virtual disk are the same, there may not be enough CID numbers in the chain to complete the repair. In these circumstances, a new CID can be created. The new CID needs to be an 8-digit hexadecimal number.
 
To do the repair:
  1. Open both the Parent disk and the Child disk.
  2. Make the appropriate changes in the Parent or Child by replacing the CID of the Parent with the parentCID of the child.
  3. Save the modified file.
  4. Repeat steps 1-3 for all breaks in the snapshot chain.
Using the example above, the CID of Windows XP Professional-000001.vmdk would be replaced with the parentCID in Windows XP Professional-000002.vmdk

Verifying the results

Once all the breaks in the snapshot chain have been repaired, the virtual machine is ready to be tested. Power on the virtual machine; if all the breaks have been repaired, then the virtual machine powers on correctly.  

If the issue persists after performing the preceding steps, confirm that that the same error is occurring. If so, go back and verify that all the breaks have been repaired correctly.
 
If no breaks remain and the error persists, then the parent disk was in fact modified and the child snapshot (all snapshots below the modified parent in the chain) must be deleted. The changes/data they represent is lost, as they cannot be applied back to the parent disk due to the irregular modification.
 
To proceed, use vmware-vdiskmanager -r in Terminal to systematically go backwards through the snapshot chain. The exact same error is given in Terminal as when powering on the virtual machine if the snapshot you used it on does not work.

For example:
  1. Open Terminal from /Applications/Utilities.
  2. Run this command:

    /Library/Application\ Support/VMware\ Fusion/vmware-vdiskmanager -r ~/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional-000002.vmdk -t 0 ~/Desktop/XPPro.vmdk
This command, if successful, begins to create a new .vmdk file on the Mac desktop called XPPro.vmdk. However, if the parent of that snapshot or one of the parents earlier in the chain has been modified then the same error occurs as when powering on the virtual machine. You need to try each snapshot, in order, until the conversion completes and the .vmdk is created successfully. A new virtual machine can then be created, using that virtual disk.

Tags

cannot-power-on cannot-power-on-vm parent-disk-modified parent-virtual-disk-modified power-on-fails vm-power-on-fails

Update History

06/01/2012 - Added information on using the dd command in terminal

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 5 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 5 Ratings
Actions
KB: