Snapshot consolidation fails in Virtual Machine with encryption enabled with error "Failed because padding is too short or too long".
search cancel

Snapshot consolidation fails in Virtual Machine with encryption enabled with error "Failed because padding is too short or too long".

book

Article ID: 423703

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • You are unable to consolidate disks on a Virtual Machine (VM) and receive the error message "Unable to save the snapshot file".
    In the vCenter UI, you see the following specific error:
    "An error occurred while consolidating disks: Unable to save snapshot file. Checkpoint operation not supported for PCI Plugin."

  • The logs in /var/run/log/hostd.log in the host has below entries:
    YYYY-MM-DD <Time> In(166) Hostd[2103533] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<Datastore-UUID>/<VM-name>/<VM-name>.vmx opID=esxui-####-#### sid=######## user=root] State Transition (VM_STATE_ON -> VM_STATE_CONSOLIDATE_ALL_DISKS)
    YYYY-MM-DD <Time> Db(167) Hostd[2103535] [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/<Datastore-UUID>/<VM-name>/<VM-name>.vmx] Consolidate Disks message: An error occurred while consolidating disks: Unable to save snapshot file.
    YYYY-MM-DD <Time> In(166) Hostd[2103546] [Originator@6876 sub=Vimsvc.ha-eventmgr] Event 133136 : Virtual machine <VM-Name> disks consolidation failed on <ESXI-FQDN> in cluster <ESXI-FQDN> in ha-datacenter.

  • The logs in /vmfs/volumes/datastore-UUID/VM-Name/vmware.log of the VM has below entries:
    YYYY-MM-DD <Time> In(05) vmx md3ax27m-7890307-auto-4p478-h5:70999434-e7-14-4108 SnapshotVMX_Consolidate: Starting online snapshot consolidate operation.
    YYYY-MM-DD <Time> In(05) vmx md3ax27m-7890307-auto-4p478-h5:70999434-e7-14-4108 Vix: [mainDispatch.c:4211]: VMAutomation_ReportPowerOpFinished: statevar=3, new AppState=1880, success=1 additionalError=0
    YYYY-MM-DD <Time> In(05) vmx md3ax27m-7890307-auto-4p478-h5:70999434-e7-14-4108 Turning on snapshot info cache. VM=<VM-name>.vmx.
    YYYY-MM-DD <Time> Er(02) vmx md3ax27m-7890307-auto-4p478-h5:70999434-e7-14-4108 DecryptWithPadding: Failed because padding is too short or too long
    YYYY-MM-DD <Time> Er(02) vmx md3ax27m-7890307-auto-4p478-h5:70999434-e7-14-4108 DecryptWithPadding: Failed because padding is too short or too long
    YYYY-MM-DD <Time> In(05) vmx md3ax27m-7890307-auto-4p478-h5:70999434-e7-14-4108 DISKLIB-VMFS: "vsan://<UUID>/<VM-ID>" : open successful (1114117) size = 0, hd = 0. Type 20

 

Environment

VMware vSphere ESXI 8.X

Cause

This issue occurs when a VM is encrypted while a backup or snapshot task is in progress, leading to a discrepancy in key-value pairs.

Resolution

To resolve this issue, you must decrypt the affected VM before attempting to consolidate the disks. Follow these steps:

  1. Decrypt the VM: Remove the encryption from the virtual machine. This allows the system to resolve padding and key-value pair discrepancies.
  2. Run Consolidation: Perform the disk consolidation task. After decryption, the consolidation should complete without the "Unable to save snapshot file" error.
  3. Re-encrypt (Optional): Once the consolidation and snapshots are successful, you can re-encrypt the virtual machine.

Additional Information

Decrypt an Encrypted Virtual Machine or Virtual Disk