Snapshot cannot be deleted with error "A required file was not found"
search cancel

Snapshot cannot be deleted with error "A required file was not found"

book

Article ID: 395377

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

  • VMs reside on a vSAN ESA cluster which uses native scalable snapshots
  • VM fails to delete/consolidate snapshots with error "An error occurred while deleting a snapshot: A required file was not found"
  • Listing all the vmdks for disk VM_Name_7.vmdk we see the base descriptor file is missing
       87 Feb 18 21:51 VM_Name_7-000001.vmdk
      892 Feb 20 15:34 VM_Name_7-000002.vmdk
    32.0M Feb 20 15:45 VM_Name_7-000003-ctk.vmdk
      966 Feb 20 15:54 VM_Name_7-000003.vmdk
    32.0M Feb 25 18:40 VM_Name_7-000004-ctk.vmdk
      975 Feb 26 08:21 VM_Name_7-000004.vmdk
    32.0M Mar 21 18:12 VM_Name_7-000005-ctk.vmdk
      810 Mar 13 05:04 VM_Name_7-000005.vmdk

Environment

VMware vSAN ESA (All Versions)

Cause

This is caused due to a missing descriptor file within the snapshot chain

Resolution

  1. First determine if all the snapTags exist for the snapshot chain by doing the following:

    1. grep RW VM_Name.vmdk to get the object UUID
      Note: You can use any descriptor file within the snapshot chain to get the object UUID
      Example: RW 209715200 VMFS "vsan://52f44cda777bb77c-5458############/59b1b467-3cc4-f1ba-372f-############

    2. List all the snapIDs for the snapshot chain by running /usr/lib/vmware/osfs/bin/objtool listSnapshot -u <Object UUID>
      Example: /usr/lib/vmware/osfs/bin/objtool listSnapshot -u 59b1b467-3cc4-f1ba-372f-############
      Snapshot list:
      2,
      4,
      5,
      0,
      Object listsnapshot succeeded

    3. Now cross reference the snapTags to their respective descriptor files by running /usr/lib/vmware/osfs/bin/objtool querySnapshotTag -u <Object UUID> -I <snapID>
      Example: /usr/lib/vmware/osfs/bin/objtool querySnapshotTag -u 59b1b467-3cc4-f1ba-372f-############ -I 4
      Snapshot Tag: /vmfs/volumes/vsan:52f44cda777bb77c-5458############/9144b067-8225-5a38-86fe-############/VM_Name-000001.vmdk

    If all the snapTags for the chain exist then open a case with vSAN Support to create the missing descriptor file.

    If the snapTag for the base disk is missing then edit the descriptor file of the oldest descriptor in the chain to be the base disk.

    To do this use vi editor and comment out the line ddb.nativeParentHint =

    vi VM_Name_7-000001.vmdk
    # Disk DescriptorFile
    version=4
    encoding="UTF-8"
    CID=d2c5ec48
    parentCID=ffffffff
    createType="vmfs"

    # Extent description
    RW 4294967296 VMFS "vsan://52f44cda777bb77c-5458############/e044b067-c42c-617b-e285-############::13"

    # The Disk Data Base
    #DDB

    ddb.adapterType = "lsilogic"
    ddb.deletable = "true"
    ddb.geometry.cylinders = "267349"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"
    ddb.longContentID = "177f0da5ee257253de22142cd2c5ec48"
    ddb.nativeDeltaBytes = "1124638082048"
    ddb.nativeDeltaBytesIsEstimate = "yes"
    ddb.nativeParentCID = "783f3906"
    #ddb.nativeParentHint = "VM_Name_7.vmdk"
    ddb.objectParentUri = "vsan://52f44cda777bb77c-5458############/e044b067-c42c-617b-e285-############"
    ddb.thinProvisioned = "1"
    ddb.toolsInstallType = "4"
    ddb.toolsVersion = "11269"
    ddb.uuid = "60 00 C2 93 5c ed a7 8d-59 58 5e d3 2e d4 18 68"
    ddb.virtualHWVersion = "14"

    The VM will now be able to power on and snapshots can be deleted/consolidated. However this will result in the base disk having the naming convention of a snapshot. To fix the naming convention for the vmdk do one of the following:

    1. Space permitting on the vSAN datastore clone the VM, this also avoids down time for the VM, then delete the old VM
    2. Rename the descriptor file, this will require downtime for the VM, via the below steps:
      1. Power off the VM
      2. Open an SSH session to the host were the VM resides
      3. Navigate to the VM directory 
      4. Change the name of the file by running mv VM_Name_7-000001.vmdk VM_Name_7.vmdk
      5. Edit the vmx file to reflect the new name
      6. Reload the vmx file by following KB Reloading a vmx file without removing the virtual machine from inventory