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.