OVF import from NFS Datastore backed Content Library fails with "Transfer failed / Operation timed out"
search cancel

OVF import from NFS Datastore backed Content Library fails with "Transfer failed / Operation timed out"

book

Article ID: 436286

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Deploying a virtual machine or importing an OVF template from a vCenter Content Library fails. This issue typically surfaces when the Content Library is hosted on an NFS-backed datastore and the OVF template contains large virtual disks (e.g., 1000GB or greater).


The /var/log/vmware/content-library/cls.log on the vCenter Server appliance records the following timeout errors:

DEBUG | <thread_id> | cls-simple-activity-15 | ImportSessionActivity | OVF import session <UUID> has expired
ERROR | <thread_id> | cls-simple-activity-15 | ImportSessionActivity | OVF import session <UUID> terminated abnormally.

 

The import task in the UI may report "A general system error occurred: Transfer failed <File_path>: Connection reset".

Environment

Content Library on NFS Datastore

Cause

The default OVF import session timeout for the Content Library service is 10 minutes. When transferring large VMDK files from an NFS-backed datastore, the transfer duration frequently exceeds this limit.

Because the ESXi host is not natively aware of the underlying file layout on an external NFS server (unlike native storage architectures such as vSAN), it must read the entire file sequentially during deployment. This architectural difference significantly increases the transfer time required for large templates.

Resolution

 

Increase the OVF import session timeout value within the vCenter Content Library configuration to allow the NFS file transfer sufficient time to complete.

  1. Log in to the vCenter Server Appliance (VCSA) via SSH as the root user.

  2. Make a copy of the file before modification /etc/vmware-content-library/config/vdcs-config.properties 
  3. Open the Content Library configuration file using a text editor (such as vi): vi /etc/vmware-content-library/config/vdcs-config.properties

  4. Add or modify the ovf.import.session.timeout.minutes parameter to a higher value. For large templates over NFS, 60 minutes is recommended: ovf.import.session.timeout.minutes=60

  5. Save the file and exit the text editor.

  6. Restart the Content Library service for the new configuration to take effect: service-control --stop content-library && service-control --start content-library

  7. Retry the OVF import or Virtual Machine deployment task.

Additional Information

In the below example, the disk2's provisioned capacity is 1.2 TB whereas it does not contain any data. Since this file is hosted on the NFS, the ESXi does not aware of the allocated blocks of the vmdk file due to which it needs to read through the entire file before it marks the transfer as complete. 

// Disk layout size  (Provisioned capacity of the VMs)

[root@<Host_name>:/vmfs/volumes/<NFS_Datastore_id>/contentlib-<UUID>/<Template_dir>] ls -lh
total 1145964
-rw-------    1 root     root       10.0G Jan 01 04:08 <Template_name>-disk1_<UUID>-flat.vmdk
-rw-------    1 root     root         600 Jan 01 04:07 <Template_name>-disk1_<UUID>.vmdk
-rw-------    1 root     root     1200.0G Jan 01 04:07 <Template_name>-disk2_<UUID>-flat.vmdk
-rw-------    1 root     root         600 Jan 01 04:07 <Template_name>-disk2_<UUID>.vmdk
-rw-------    1 root     root        8.1K Jan 01 04:06 <Template_name>_<UUID>.ovf

 

// Actual disk space consumed on the filesystem by the vmdk files.

[root@<Host_name>:/vmfs/volumes/<NFS_Datastore_id>/contentlib-<UUID>/<Template_dir>]  du -sh *

2.3G    <Template_name>-disk1_<UUID>-flat.vmdk
4.0K    <Template_name>-disk1_<UUID>.vmdk
0       <Template_name>-disk2_<UUID>-flat.vmdk
4.0K    <Template_name>-disk2_<UUID>.vmdk
12.0K   <Template_name>_<UUID>.ovf