Virtual Machine's Image level Backup fails with ERROR "Invalid length failed when overwriting to a file"
search cancel

Virtual Machine's Image level Backup fails with ERROR "Invalid length failed when overwriting to a file"

book

Article ID: 377962

calendar_today

Updated On:

Products

VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0 VMware vSphere ESXi VMware vSphere ESXi 6.0

Issue/Introduction

  • Virtual Machine's Image level backup failes.
  • In the backup logs, you see the entries similar to

YYYY-MM-DD HH:MM:SS avtar FATAL <0000>: Failed to close file container for backup for FCOW, Invalid length failed when overwriting to a file in a container for backup, length 1677312 is not a multiple of the fixed segment size 8192, DDR result code: 4915, desc: Invalid length
YYYY-MM-DD HH:MM:SS avtar FATAL <0000>: Failed closing write stream for FCOW, index: 20, close container failed, exit code: 157.
YYYY-MM-DD HH:MM:SS avtar FATAL <40009>: DDR encountered errors.
YYYY-MM-DD HH:MM:SS avtar Info <9772>: Starting graceful (staged) termination, DDR_ERROR event received (fatal severity) (wrap-up stage)
YYYY-MM-DD HH:MM:SS avtar Info <0000>: Entering the 'final' phase of termination, DDR_ERROR need to exit)
YYYY-MM-DD HH:MM:SS [BuilderMgr0]  INTERNAL ERROR: <0001> assert error (writeStreamsInUse >= 0), /local/jenkins/workspace/client_cumulative_hotfix_SLES12SP5-64/src/avtar/ade/adelib/ddrcom_mgr.cpp line 2001
YYYY-MM-DD HH:MM:SS [BuilderMgr0]  ERROR: <0001> DDR sendRootHashResponse failed "VMFiles/3/virtdisk-flat.vmdk" (err=0)
YYYY-MM-DD HH:MM:SS avtar FATAL <5155>: Backup aborted due to earlier errors.  No backup created on the server.
YYYY-MM-DD HH:MM:SS avtar Info <7883>: Finished at 
YYYY-MM-DD HH:MM:SS UTC, Elapsed time: 0003h:47m:08s
YYYY-MM-DD HH:MM:SS avtar Info <17971>: Errors, cancellation or termination caused the backup to not be posted on the DDR
YYYY-MM-DD HH:MM:SS avtar Info <12530>: Backup was not committed to the DDR.
YYYY-MM-DD HH:MM:SS avtar Info <40176>: - Multi-stream restore summary (current 0, max active 0, max cloned 0, total cloned 0

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware vSphere ESXi 6.x

VMware vSphere ESXi 7.0

VMware vSphere ESXi 8.0

Cause

This issue occurs due to the size of one of the disk (VMDK flat file) of the virtual machine. The size of the disk should be in integer not in fraction.
 
For example: The size of the disk should be in integer such as 2516583 MB, but not in integer such as 2516582.40 MB.
 
The error happens when the disk size of the Virtual Machine has changed and updates the Changed Block Tracking (CBT) information on the virtual machine and the size of the disk is not a multiple of MB.

Resolution

To resolve the issue, change the size of the disk in MB to an integer.
 
Note: The size cannot be reduced but only increased.
 
To change the size of the disk in MB to an integer using the Web Client:
  1. Right-click the virtual machine in the inventory and click Edit Settings.
  2. On the Virtual Hardware tab, expand Hard disk to view the disk options.
  3. Type a new value in the Provisioned Size text box and select the MB unit to ensure that it will be an integer in MB.
  4. Click OK.
Note: Disks larger than 2 TB cannot be hot-extended, you must shut down the VM first.