OVA import/export fails and VKS Guest Cluster stuck in Upgrading and Provisioning state due to missing Content Library Datastore
search cancel

OVA import/export fails and VKS Guest Cluster stuck in Upgrading and Provisioning state due to missing Content Library Datastore

book

Article ID: 439768

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

  • A vSphere Kubernetes Service Guest Cluster upgrade fails to progress and remains stuck in an Upgrading state. 
  • New cluster nodes (Control Plane or Worker machines) remain stuck indefinitely in a Provisioning state.
  • When checking the machine status from the Supervisor cluster, the output resembles the following: 
    NAME                        CLUSTER                NODENAME         PROVIDERID      PHASE         AGE          VERSION
     <control_plane_node_new>  <guest_cluster_name>                   False        Provisioning    8m21s      <VKR version>
    <control_plane_node_old>   <guest_cluster_name>    <nodename>      True        Running       75d       <VKR version>
  • Content library provisioned for the Supervisor cluster does not show any backing datastore and the status is Unknown:
  • Content library logs on the vCenter Server reveal that the backing storage does not exist, under the following log location /var/log/vmware/content-library/cls.log on vCenter: 

    YYYY-MM-DDTHH:MM:SS | WARN     | vmoperator-####-cops-prod-####-####-createOrUpdateVM-########-8w | cls-simple-activity-7     | ApiMethodSkeleton              | Implementation method reported unexpected exception: com.vmware.vapi.std.errors.NotAllowedInCurrentState
    com.vmware.vapi.std.errors.NotAllowedInCurrentState: NotAllowedInCurrentState (com.vmware.vapi.std.errors.not_allowed_in_current_state) => {
        messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
        id = com.vmware.ovfs.ovfs-main.ovfs.library_item_files_not_prepared,
        defaultMessage = Cannot instantiate library item <Content_Library_UUID> due to the failure of importing file <file>-ova.ovf, detail error: Error exporting file <file>-ova.ovf. Reason: The provided storage backing Datastore:datastore-####:######-####-####-####-######## for library <Content_Library_UUID> does not exist, the storage backing might be removed, disconnected, or no longer accessible via Datastore:datastore-####:######-####-####-####-########..,
        args = [#####-####-####-#####-#####], <file>-ova.ovf, Error exporting file <file>-ova.ovf. Reason: The provided storage backing Datastore:datastore-####:######-####-####-####-######## for library <Content_Library_UUID> does not exist, the storage backing might be removed, disconnected, or no longer accessible via Datastore:datastore-####:######-####-####-####-########.],
        params = <null>,
        localized = <null>
    }],
        data = <null>,
        errorType = NOT_ALLOWED_IN_CURRENT_STATE


  • Attempts to import or export OVA files within a Subscribed Content Library fail.
  • The Content Library is unable to synchronize, and manual file operations return an error indicating the backing storage is inaccessible or missing.
  • The vCenter Server task console reports a failure during library item preparation with the error: com.vmware.vapi.std.errors.NotAllowedInCurrentState.
  • Detailed logs in /var/log/vmware/content-library/cls.log show the following entry: Error exporting file ####.ovf. Reason: The provided storage backing Datastore:datastore-#### for library does not exist, the storage backing might be removed, disconnected, or no longer accessible.

Environment

VMware vSphere Kubernetes Service

Cause

  • This issue occurs when the underlying datastore that backs the Supervisor Cluster's Content Library is permanently deleted.
  • Because the datastore is missing, the VM Operator cannot fetch the vSphere Kubernetes Release OVA (e.g., <file>-ova.ovf) required to clone and instantiate the new Guest Cluster nodes.

Resolution

If the backing datastore has been permanently deleted and cannot be restored or re-mounted, the orphaned Content Library must be replaced.

  1. Create a new Subscribed Content Library for the Supervisor cluster by following the steps as described in the following documentation: Create a Subscribed Content Library.
  2. Once the new Content Library is created, map the new Library to the Supervisor cluster by following these steps: 
    1. Navigate to Workload Management > Supervisors.
    2. Select the affected Supervisor cluster and click the Configure tab.
    3. Click on General and then expand the Tanzu Kubernetes Grid Service section.
    4. Edit the Content Library configuration to remove the old library and select the newly created Subscribed Content Library.

Once the Supervisor is updated, the VM Operator dynamically queries the new library, locates the required VKR image, and automatically resumes the stalled Guest Cluster upgrade process.

Additional Information

How to Add or Update VKS Content Libraries