VMDK disks not loading when vSphere ImportVApp API called in loop
search cancel

VMDK disks not loading when vSphere ImportVApp API called in loop

book

Article ID: 319629

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • This occurs when we create a new VM using ImportVApp API because sometimes the new VM may not have any disk information updated immediately. 
  • This is seen in cases wherein multiple VM's are created using ImportVAppAPI in a loop.


Environment

VMware vSphere ESXi 6.5
VMware vSphere ESXi 6.0
VMware vSphere ESXi 6.7

Cause

  • This is expected behaviour by design, in cases wherein the config is not loaded immediately after the import.
  • It's done this way for performance and scale reasons.

Resolution

This is a known behaviour identified by VMware Engineering and is expected to happen intermittently.

Workaround:
As a workaround, load the config when it is not loaded implicitly. Steps on how to load config are:
  1. Put a delay of 10 or more seconds after the ImportVApp API call task succeeds.
  2. Call the Reload API on the VM.