Error: The entity Ref: com.vmware.vcloud.entity.vm:<vm-id> is busy completing an operation VDC_COPY_VAPP. VDC_COPY_VAPP(com.vmware.vcloud.entity.task:<task-id>)
search cancel

Error: The entity Ref: com.vmware.vcloud.entity.vm:<vm-id> is busy completing an operation VDC_COPY_VAPP. VDC_COPY_VAPP(com.vmware.vcloud.entity.task:<task-id>)

book

Article ID: 428947

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Catalog item copy or move operation fails with the following error message: The entity Ref: com.vmware.vcloud.entity.vm:<vm-id> is busy completing an operation VDC_COPY_VAPP

Environment

10.x

Cause

This issue typically occurs when a virtual Machine <vm-id> has the catalog item (ISO image) and fails to unmount during the VDC_COPY_VAPP process. The active file handle on the ISO prevents the underlying operation causing the VCD task to fail with is_busy

Resolution

Prerequisites:

You must have System Administrator privileges to VMware Cloud Director.
You must have SSH access to the primary VCD Cell and the PostgreSQL database.
Warning: This procedure involves modifying the VCD database. Ensure you have a valid backup of the VCD database before proceeding.

Step 1:Validate on vCloud UI if there is any active task running for the VM <vm-id>, if exists wait for the completion.

Step 2: Identify the VM and Task details from vCloud DB

  1. Log in to the VCD Cell via SSH.
  2. Connect to the database:
    /opt/vmware/vpostgres/current/bin/psql -U postgres -d vcloud
  3. Identify the VM by its <vm-id> (from the error message):
    SELECT name, moref, is_busy FROM vm WHERE moref = '<vm-id>';

Clear the "Busy" State

  1. If the query confirms is_busy is true (or 1) and no active task exists in vCenter for this VM, run the following command to unlock it:   UPDATE vm SET is_busy = false WHERE moref = '<vm-id>';
  2. Verify the change: SELECT name, is_busy FROM vm WHERE moref = '<vm-id>';
  3. Exit the database session:  \q

Step 3:

  1. Log in to the VMware Cloud Director Tenant or Provider Portal.
  2. Navigate to the affected Virtual Machine.
  3. Go to VM > Actions > Media > Eject Media.
       If "Eject" is not available, check the VM Settings > Hardware > CD/DVD Drive and set it to Disconnected or Client Device.

Retry the catalog item move or copy operation.

 

Additional Information

To prevent this issue, ensure all ISOs and removable media are disconnected from vApps and VMs in order for simultaneous migrations