Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-1093

vSphere_SDK.pm:vm_unregister - failed to unregister VM:

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.1
    • Component/s: vcld (backend)
    • Labels:
      None

      Description

      When VCL Daemon tries to reload an image, it tries to remove all existing vms by unregistering them. If the VM is already powered on, this leads to below error:

       

      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 2018-04-09 10:44:36 32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 failed to unregister VM: /vmfs/volumes/vmfs_vcl_vmdiff_1/vcl-u-vm-1_10-v0/vcl-u-vm-1_10-v0.vmx, error:
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 SOAP Fault:
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 -----------
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 Fault string: The attempted operation cannot be performed in the current state (Powered on).
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 Fault detail: InvalidPowerStateFault
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 ( 0) vSphere_SDK.pm, vm_unregister (line: 373)
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 (-1) VMware.pm, delete_vm (line: 5842)
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 (-2) VMware.pm, remove_existing_vms (line: 1646)
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 (-3) VMware.pm, load (line: 688)
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 (-4) new.pm, reload_image (line: 588)
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 (-5) new.pm, process (line: 275)
      32180 16 16 reload vSphere_SDK.pm:vm_unregister 373 (-6) vcld, make_new_child (line: 601)

       

      The current patch adds support for powering the VM off before trying to unregister it. It has been tested with vSphere 6.5 and is working fine.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              junaid.ali Junaid Ali
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: