Error: "A specified parameter was not correct: spec.deviceChange.device" when attempting to take a snapshot of a VM
search cancel

Error: "A specified parameter was not correct: spec.deviceChange.device" when attempting to take a snapshot of a VM

book

Article ID: 402544

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Taking a snapshot of the VM fails with error:

     A specified parameter was not correct: spec.deviceChange.device An error occurred while taking a snapshot: One of the parameters supplied is invalid. An error occurred while saving snapshot file "/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>-Snapshot1.vmsn". An error occurred while saving the snapshot: One of the parameters supplied is invalid.
  • No snapshots exist for the VM.
  • On the /var/run/log/hostd.log on the ESXi host where the vm resides, we see entries similar to below:

    YYYY-MM-DDThh:mm:ss.382Z In(166) Hostd[2102036]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmx opID=11dbccad-3d-f2e8 sid=52c7616a user=vpxuser:VSPHERE.LOCAL\CommvaultUser] State Transition (VM_STATE_ON -> VM_STATE_CREATE_SNAPSHOT)
    YYYY-MM-DDThh:mm:ss.802Z Db(167) Hostd[2102043]: [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmx] Create Snapshot translated error to vmodl.fault.InvalidArgument
    YYYY-MM-DDThh:mm:ss.802Z Db(167) Hostd[2102043]: [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmx] Create Snapshot message: An error occurred while saving the snapshot: One of the parameters supplied is invalid.
    YYYY-MM-DDThh:mm:ss.802Z Db(167) Hostd[2102005]: --> An error occurred while taking a snapshot: One of the parameters supplied is invalid.
    YYYY-MM-DDThh:mm:ss.802Z Db(167) Hostd[2102005]: -->
    YYYY-MM-DDThh:mm:ss.806Z Db(167) Hostd[2102017]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmx] Time to gather snapshot information: 3 msecs. needConsolidate is false.
    YYYY-MM-DDThh:mm:ss.814Z Db(167) Hostd[2102017]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmx] Disk cache flushed
    YYYY-MM-DDThh:mm:ss.815Z In(166) Hostd[2102017]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmx] Send config update invoked
    YYYY-MM-DDThh:mm:ss.825Z In(166) Hostd[2102017]: [Originator@6876 sub=DiskLib] DISKLIB-CTK   : ChangeTrackerOpenOnDiskWork: Could not open tracking file /vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>-ctk.vmdk (4).
    YYYY-MM-DDThh:mm:ss.825Z In(166) Hostd[2102017]: [Originator@6876 sub=DiskLib] DISKLIB-CTK   : Could not open change tracking file "/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>-ctk.vmdk": Could not open or create change tracking file.

  • On reviewing the vmware log for the vm, (here /vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/vmware.log) , we see entries similar to below

    YYYY-MM-DDThh:mm:ss.727Z Er(02) vcpu-0 - DISKLIB-LINK  : DiskLinkNativeSnap: Attempting to take a snapshot of 'vsan://524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/' which is already a snapshot of 'vsan://524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/'.
    YYYY-MM-DDThh:mm:ss.727Z Er(02) vcpu-0 - DISKLIB-LIB_CREATE   :DiskLibPrepareOrCreateChildNativeSnap: Failed to do native snapshot: One of the parameters supplied is invalid
    YYYY-MM-DDThh:mm:ss.727Z Er(02) vcpu-0 - DISKLIB-LIB_CREATE   : DiskLib_CreateChild: Failed to create child disk: One of the parameters supplied is invalid
    YYYY-MM-DDThh:mm:ss.727Z Er(02) vcpu-0 - SNAPSHOT: SnapshotBranchDisk: Failed to branch disk natively: '/vmfs/volumes/vsan:52d6a49b5f408###-###########/d46b8f67-9a7a-5a2d-7fb7-#############/<VM_name>.vmdk' -> '/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>-000001.vmdk' : One of the parameters supplied is invalid (1)
    YYYY-MM-DDThh:mm:ss.727Z In(05) vcpu-0 - DISKLIB-VMFS  : "vsan://524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/" : closed.
    YYYY-MM-DDThh:mm:ss.727Z In(05) vcpu-0 - SNAPSHOT: SnapshotBranch failed: One of the parameters supplied is invalid (5).
    YYYY-MM-DDThh:mm:ss.757Z In(05) vcpu-0 - OBJDESC-LIB :  Failed to unlink '/vmfs/volumes/vsan:524b8e75020610de-9bc0############/d187ac65-ac64-bd4a-4cd4-#############/<VM_Name>.vmem': No such file or directory (20004)
  • If the VM is on a VVOL datastore and uses VVOL, vmware.log will list the below errors.

    YYYY-MM-DDTHH:MM:SS.735Z Er(02) vcpu-0 - DISKLIB-LINK  : DiskLinkNativeSnap: Attempting to take a snapshot of 'vvol://577#########-b513##########/rfc####.#########-89f4-4a28-a884-##########' which is already a snapshot of 'vvol://577b#########-b513########/rfc####.########-970e-48ec-a785-###########'.
    YYYY-MM-DDTHH:MM:SS.735Z Er(02) vcpu-0 - DISKLIB-LIB_CREATE   :DiskLibPrepareOrCreateChildNativeSnap: Failed to do native snapshot: One of the parameters supplied is invalid
    YYYY-MM-DDTHH:MM:SS.735Z Er(02) vcpu-0 - DISKLIB-LIB_CREATE   : DiskLib_CreateChild: Failed to create child disk: One of the parameters supplied is invalid
    YYYY-MM-DDTHH:MM:SS.735Z Er(02) vcpu-0 - SNAPSHOT: SnapshotBranchDisk: Failed to branch disk natively: '/vmfs/volumes/vvol:577b#########-b513#########/rfc####.########-5188-4386-9f74-###########/VM.vmdk' -> '/vmfs/volumes/vvol:57
    7b########-b513#######/rfc####.########-5188-4386-9f74-##########/VM-000001.vmdk' : One of the parameters supplied is invalid (1)
    YYYY-MM-DDTHH:MM:SS.735Z In(05) vcpu-0 - SNAPSHOT: SnapshotBranch failed: One of the parameters supplied is invalid (5).
    
    
    YYYY-MM-DDTHH:MM:SS.808Z In(05) vcpu-0 - SnapshotVMXTakeSnapshotWork: Transition to mode 1.
    YYYY-MM-DDTHH:MM:SS.808Z In(05) vcpu-0 - SnapshotVMXTakeSnapshotComplete: Done with snapshot 'VM Snapshot': 0
    YYYY-MM-DDTHH:MM:SS.808Z In(05) vcpu-0 - SnapshotVMXTakeSnapshotComplete: Snapshot 0 failed: One of the parameters supplied is invalid (5).

Environment

vCenter Server 8.x

vSphere ESXi 8.x

 

Cause

This occurs if a previous snapshot deletion/consolidation did not complete and the below line is left behind in the base disk descriptor file.

ddb.objectParentUri = vsan://<vsanDatastore>/<vmdk_uuid>

or

ddb.objectParentUri = vvol://577b#########-b513########/rfc####.########-970e-48ec-a785-###########'.

 

This line should only exist in the base descriptor file only if snapshots exist for the VM and should be present for all subsequent snapshot descriptor files in the snapshot chain except for the last snapshot taken.

Resolution

To resolve the issue. 

  1. Open an SSH session to one of the ESXi hosts in the cluster
  2. Navigate to the VM home folder
  3. Run grep ddb.objectParentUri *.vmdk
  4. Backup the vmdk descriptor files.
  5. For any descriptor file found with ddb.objectParentUri = vsan://<vsanDatastore>/<vmdk_uuid> edit the file and remove the line
  6. Take a snapshot of the VM to validate that the issue is resolved