A virtual machine cannot boot after resizing a base virtual machine disk (VMDK) that is part of a snapshot chain
search cancel

A virtual machine cannot boot after resizing a base virtual machine disk (VMDK) that is part of a snapshot chain

book

Article ID: 332680

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • A virtual machine fails to power on if you extend the base disk of a snapshot which is part of a redo hierarchy
  • In the VI client, you see the error:

    The parent virtual disk has been modified since the child was created
  • In the virtual machine's vmware.log file, you see entries similar to:

    <YYYY-MM-DD>T<time>.304Z| vmx| DISKLIB-LIB : Failed to open '/vmfs/volumes/EXAMPLE-DATSTORE/EXAMPLE-VM/EXAMPLE-VM_4-000004.vmdk' with flags 0xa The capacity of the parent virtual disk and the capacity of the child disk are different (67).</time>
    <YYYY-MM-DD>T<time></time>.304Z| vmx| DISK: Cannot open disk "/vmfs/volumes/EXAMPLE-DATSTORE/EXAMPLE-VM/EXAMPLE-VM_4-000004.vmdk": The capacity of the parent virtual disk and the capacity of the child disk are different (67).
    '/vmfs/volumes/EXAMPLE-DATSTORE/EXAMPLE-VM/EXAMPLE-VM_4-000004.vmdk' or one of the snapshot disks it depends on.

    <YYYY-MM-DD>T<time></time>.304Z| vmx| [msg.disk.configureDiskError] Reason: The capacity of the parent virtual disk and the capacity of the child disk are different.


Resolution

This issue may occur if the size of the base disk does not match the logical size of the redo log.
  • To determine the original size of the base disk, look at the .vmdk file corresponding to the delta disk redo log. For example, an entry for a delta disk in the .vmdk file looks like:

    RW 2048 VMFSSPARSE "foo-43489354-delta.vmdk"

    Note: The disk size is expressed in number of sectors. In this example, the disk size is 2048, or 1MB.
     
    • The corresponding base disk descriptor file foo.vmdk looks like:

      # Extent description
      RW 2048 VMFS "foo-flat.vmdk"

       
    • If you extend the base disk to 2MB, the foo.vmdk file looks like:

      # Extent description
      RW 4096 VMFS "foo-flat.vmdk"

       
  • To reset the logical size of the base disk, replace 4096 with 2048 so that the foo.vmdk file looks like:
# Extent description
RW 2048 VMFS "foo-flat.vmdk"

 
Note: Additional datastore space is required to clone the disk.

To resolve this issue, perform one of these options:

Note: The size of the flat file for the base disk is the actual size of the virtual disk. This value divided by 512 must be equal to the RW value in the descriptor files of either the base disk or the snapshots. If this is not true, see option 3.
  • If the RW value of the base disk is smaller than that of the snapshot(s), reset that value to the RW value in the snapshot descriptor files.
  • If the RW value of the base disk is greater than that of the snapshot(s), keep the new base disk size, and change ALL associated delta disk descriptor files to the new size.
  • If the actual size of the base disk flat file (as reported by the kernel) divided by 512 is different from the RW values in the descriptor files of the base disk and the snapshot files, then this is pathological and requires deep analysis. This indicates data corruption.

    For information on how to modify a virtual machine disk descriptor file, see Editing configuration files in VMware ESXi and ESX (1017022).
Use this procedure to modify the virtual machine disk properties:
  1. Shutdown the virtual machine.
  2. Back-up each vmdk descriptor file in turn, and modify the RW value(s) as requires as detailed above. For example, base vmdk descriptor files, or all associated snapshot descriptor files.
  3. Clone the disk from the most recent snapshot to a new virtual disk.

    Note: Clone the disk, so that in the event of there being an issue, the original file(s) are available.
     
  4. Using Edit Settings, remove the existing disk from the virtual machine only (do not remove from disk), and add the new disk to virtual machine.
  5. Power on the virtual machine.
  6. When the size has been verified within the virtual machine, delete the original disk and associated snapshot files after confirming the virtual machine is running as expected.
See also:

Additional Information

Failed to power on virtual machine