Error: Cannot unmarshal object into Go struct field VirtualMachine.children.vm.section of type string
Executing global 'post-create' action
" phase of the Instance Create task fails with an error of the form:operation completed with error 1
vcd-ext/cmd/instance/agent.(*waitOperationToCompleteActivity).Run
vcd-ext/cmd/instance/agent/activity.go:493
...
cause: Failed to execute trigger byok/cmd/hook
exit status 1
vcd-ext/action.(*Program).Execute
vcd-ext/action/program.go:137
...
cause: json: cannot unmarshal object into Go struct field VirtualMachine.children.vm.section of type string
at gitlab.eng.vmware.com/core-build/vcd-addon-byok/byok/client/vcd.(*EntityRequest[...]).Get(/opt/src/client/vcd/client_entity.go:165)
at gitlab.eng.vmware.com/core-build/vcd-addon-byok/byok/client/vcd.GetVirtualApplication(/opt/src/client/vcd/vapp.go:60)
at gitlab.eng.vmware.com/core-build/vcd-addon-byok/byok/cmd/hook/common.GetVcdVmIdFromVapp(/opt/src/cmd/hook/common/util.go:27)
at gitlab.eng.vmware.com/core-build/vcd-addon-byok/byok/cmd/hook/common.CreateExtraConfig(/opt/src/cmd/hook/common/util.go:14)
at main.configureAppServer(/opt/src/cmd/hook/main.go:295)
at main.runPostCreate(/opt/src/cmd/hook/main.go:110)
at main.runOperation(/opt/src/cmd/hook/main.go:47)
at main.main(/opt/src/cmd/hook/main.go:36)
at runtime.main(/usr/local/go/src/runtime/proc.go:271)
at runtime.goexit(/usr/local/go/src/runtime/asm_amd64.s:1695)
vcdemctl addon instance clean
" fails with a similar error:vcdemctl addon instance clean --host <vcd_address> --port 443 --username <vcd_system_administrator> --password --insecure --name <instance_name>
INFO Removing add-on data types
INFO Removing add-on data types
INFO Removing add-on instance resources
INFO Removing add-on VM name=VMware.Encryption-Management-1.2.0-24058789-Encryption-Management-xxx-appliance ref=urn:vcloud:vapp:########-####-####-####-############
ERROR json: cannot unmarshal object into Go struct field VirtualMachine.children.vm.section of type string
at gitlab.eng.vmware.com/core-build/vcd-addon-byok/byok/client/vcd.(*EntityRequest[...]).Get(/opt/src/byok/client/vcd/client_entity.go:165)
time="<timestamp>" level=debug msg="Removing all managed virtual center connections created by the solution" origin=####
time="<timestamp>" level=debug msg="Removing all named credentials created by the solution" origin=####
INFO Removing add-on data
cloud director endpoint https://<vcd_address>:443/cloudapi/1.0.0/entities/types/vmware/byok_encryption_policy/1.1.0?page=1&pageSize=128&sortAsc=name failed: {"minorErrorCode":"ACCESS_TO_RESOURCE_IS_FORBIDDEN","message":"[ ########-####-####-####-############ ] This operation is denied.","stackTrace":"com.vmware.vcloud.api.presentation.entity.security.OperationDeniedException: This operation is denied.
at main.(*AddonInstanceCleaner).pruneAddonData(/opt/src/byok/cmd/byokctl/addon_instance_clean.go:121)
...
at runtime.goexit(/usr/local/go/src/runtime/asm_amd64.s:1695): 403 Forbidden(403)
Cloud Director Engineering are aware of this issue and actively evaluating for a fix in a future release of Cloud Director.
To be updated with any changes to this article, Subscribe to this article.
There is no work around for this issue.