VMware Cloud Community
mrclschstr
Contributor
Contributor

vCHA 6.7U3 deployment using REST API

Hi everyone,

I'm testing some stuff with a small vSphere 6.7U3 environment (ESXi patch level somewhere near october 2020). I have a vCSA 6.7U3j in place an wanted to test the vCHA functionality. The setup using the vSphere client worked without issues and even an automated approach using the vCHA community module for PowerCLI [1] didn't show any anomalies.

My next testing step was to explore the existing REST API and came across the possibility to deploy vCHA via /rest/vcenter/vcha/cluster?vmw-task=true&action=deploy [2]. I created the desired JSON payload and executed the REST call, which was accepted and acknowledged with an HTTP 200 status code. Unfortunately, the correspondig task in vCenter failed with the error message: The object 'vim.ManagedEntity:' has already been deleted or has not been completely created.

I had a look into the vpxd.log of the vCSA and saw the following lines:

Spoiler
2021-01-20T11:06:35.227Z info vpxd[04182] [Originator@6876 sub=vpxLro opID=rest-a8866a11] com.vmware.vcenter.vcha.cluster.deploy: taskId task-11110:f3fd8226-aa52-4a76-975f-29d9b00bbc82
2021-01-20T11:06:35.234Z info vpxd[04227] [Originator@6876 sub=vpxLro opID=rest-a8866a11] [VpxLRO] -- BEGIN task-11110 -- Datacenters -- com.vmware.vcenter.vcha.cluster.deploy --
2021-01-20T11:06:35.943Z info vpxd[04177] [Originator@6876 sub=vpxLro opID=rest-a8866a11-88] [VpxLRO] -- BEGIN lro-5095 -- SearchIndex -- vim.SearchIndex.findByUuid -- 5226ac0a-ad93-f19f-8b9a-81837d4f5e1e
2021-01-20T11:06:35.946Z info vpxd[04177] [Originator@6876 sub=vpxLro opID=rest-a8866a11-88] [VpxLRO] -- FINISH lro-5095
2021-01-20T11:06:36.154Z error vpxd[04227] [Originator@6876 sub=vpxUtil opID=rest-a8866a11] /usr/bin/python failed with error [1] and output []
2021-01-20T11:06:36.257Z error vpxd[04227] [Originator@6876 sub=vpxUtil opID=rest-a8866a11] /usr/bin/python failed with error [1] and output []
2021-01-20T11:06:36.257Z info vpxd[04227] [Originator@6876 sub=FailoverClusterConfigurator opID=rest-a8866a11] Pre-setup: vcha.aware, SSH keys and PG
2021-01-20T11:06:45.527Z info vpxd[04227] [Originator@6876 sub=FailoverClusterConfigurator opID=rest-a8866a11] Creating Vcha Cluster nodes
2021-01-20T11:06:45.527Z info vpxd[04227] [Originator@6876 sub=FailoverClusterConfigurator opID=rest-a8866a11] Creating Vcha Cluster Passive node
2021-01-20T11:06:45.836Z info vpxd[04227] [Originator@6876 sub=FailoverClusterOperator opID=rest-a8866a11] com.vmware.vcenter.vcha.cluster.deploy Request:
--> Spec: {
--> "active": {
--> "ha_ip": {
--> "default_gateway": null,
--> "dns_servers": null,
--> "ip_family": "IPV4",
--> "ipv4": {
--> "address": "192.168.1.10",
--> "prefix": null,
--> "subnet_mask": "255.255.255.0"
--> },
--> "ipv6": null
--> },
--> "ha_network": "network-78",
--> "ha_network_type": "STANDARD_PORTGROUP"
--> },
--> "deployment": "AUTO",
--> "passive": {
--> "failover_ip": null,
--> "ha_ip": {
--> "default_gateway": null,
--> "dns_servers": null,
--> "ip_family": "IPV4",
--> "ipv4": {
--> "address": "192.168.1.11",
--> "prefix": null,
--> "subnet_mask": "255.255.255.0"
--> },
--> "ipv6": null
--> },
--> "placement": {
--> "folder": "group-v73",
--> "ha_network": null,
--> "ha_network_type": null,
--> "host": null,
--> "management_network": null,
--> "management_network_type": null,
--> "name": "vCSA-Passive",
--> "resource_pool": null,
--> "storage": {
--> "datastore": "datastore-186"
--> }
--> }
--> },
--> "vc_spec": null,
--> "witness": {
--> "ha_ip": {
--> "default_gateway": null,
--> "dns_servers": null,
--> "ip_family": "IPV4",
--> "ipv4": {
--> "address": "192.168.1.9",
--> "prefix": null,
--> "subnet_mask": "255.255.255.0"
--> },
--> "ipv6": null
--> },
--> "placement": {
--> "folder": "group-v73",
--> "ha_network": null,
--> "ha_network_type": null,
--> "host": null,
--> "management_network": null,
--> "management_network_type": null,
--> "name": "vCSA-Witness",
--> "resource_pool": null,
--> "storage": {
--> "datastore": "datastore-186"
--> }
--> }
--> }
--> }
2021-01-20T11:06:45.836Z error vpxd[04227] [Originator@6876 sub=vpxLro opID=rest-a8866a11] [VpxLRO] Unexpected Exception: N5Vmomi5Fault21ManagedObjectNotFound9ExceptionE(Fault cause: vmodl.fault.ManagedObjectNotFound
--> )
--> [context]zKq7AVECAAAAAPb1/gAVdnB4ZAAA4AArbGlidm1hY29yZS5zbwAAWCUbAP6dGAGeJRlsaWJ2bW9taS5zbwABNCwZAVuXEgEypBIBdJISgqscCgFsaWJ2aW0tdHlwZXMuc28AA1WPw3ZweGQAA/8nwgM3RcID1HTCAzrkcQPr8XEDkkxyAHFvIwA6ciMAnVYrBNRzAGxpYnB0aHJlYWQuc28uMAAFrY4ObGliYy5zby42AA==[/context]
2021-01-20T11:06:45.838Z error vpxd[04227] [Originator@6876 sub=FailoverClusterOperator opID=rest-a8866a11] Exception: N5Vmomi11MethodFault9ExceptionE(Fault cause: vmodl.fault.ManagedObjectNotFound
--> )
--> [context]zKq7AVECAAAAAPb1/gAOdnB4ZAAA4AArbGlidm1hY29yZS5zbwAAWCUbAP6dGAGu/VN2cHhkAAFGWMQBReVxARDtcQER8nEBkkxyAHFvIwA6ciMAnVYrAtRzAGxpYnB0aHJlYWQuc28uMAADrY4ObGliYy5zby42AA==[/context]
2021-01-20T11:06:45.839Z info vpxd[04227] [Originator@6876 sub=vpxLro opID=rest-a8866a11] [VpxLRO] -- FINISH task-11110
2021-01-20T11:06:45.839Z info vpxd[04227] [Originator@6876 sub=Default opID=rest-a8866a11] [VpxLRO] -- ERROR task-11110 -- Datacenters -- com.vmware.vcenter.vcha.cluster.deploy: vmodl.fault.ManagedObjectNotFound:
--> Result:
--> (vmodl.fault.ManagedObjectNotFound) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> obj = 'vim.ManagedEntity:f3fd8226-aa52-4a76-975f-29d9b00bbc82:'
--> msg = "The object 'vim.ManagedEntity:' has already been deleted or has not been completely created"
--> }
--> Args:
-->

Just for comparison, the log lines from a successful run using the PowerCLI modules:

Spoiler
2021-01-20T13:00:51.247Z info vpxd[04182] [Originator@6876 sub=vpxLro opID=4026822a] [VpxLRO] -- BEGIN task-11121 -- FailoverClusterConfigurator -- vim.vcha.FailoverClusterConfigurator.deploy -- 52dba07c-ba15-3e42-8f6f-16b4cc8dc44c(5205841c-19a9-ec66-1d9a-bc5b3d523cdf)
2021-01-20T13:00:51.836Z info vpxd[04107] [Originator@6876 sub=vpxLro opID=4026822a-bd] [VpxLRO] -- BEGIN lro-27033 -- ServiceInstance -- vim.ServiceInstance.retrieveContent -- 522e1e59-6fa7-1fa2-d0b4-ccecead306b3
2021-01-20T13:00:51.836Z info vpxd[04107] [Originator@6876 sub=vpxLro opID=4026822a-bd] [VpxLRO] -- FINISH lro-27033
2021-01-20T13:00:51.838Z info vpxd[04135] [Originator@6876 sub=vpxLro opID=4026822a-a2] [VpxLRO] -- BEGIN lro-27034 -- SessionManager -- vim.SessionManager.login -- 52cf0431-9b22-2a31-fcdc-d26605bde392
2021-01-20T13:00:51.857Z info vpxd[04135] [Originator@6876 sub=vpxLro opID=4026822a-a2] [VpxLRO] -- FINISH lro-27034
2021-01-20T13:00:52.091Z error vpxd[04182] [Originator@6876 sub=vpxUtil opID=4026822a] /usr/bin/python failed with error [1] and output []
2021-01-20T13:00:52.205Z error vpxd[04182] [Originator@6876 sub=vpxUtil opID=4026822a] /usr/bin/python failed with error [1] and output []
2021-01-20T13:00:52.205Z info vpxd[04182] [Originator@6876 sub=FailoverClusterConfigurator opID=4026822a] Pre-setup: vcha.aware, SSH keys and PG
2021-01-20T13:01:01.351Z info vpxd[04182] [Originator@6876 sub=FailoverClusterConfigurator opID=4026822a] Creating Vcha Cluster nodes
2021-01-20T13:01:01.351Z info vpxd[04182] [Originator@6876 sub=FailoverClusterConfigurator opID=4026822a] Creating Vcha Cluster Passive node
2021-01-20T13:01:01.672Z info vpxd[04092] [Originator@6876 sub=vpxLro opID=4026822a-28] [VpxLRO] -- BEGIN task-11122 -- vm-31 -- vim.VirtualMachine.clone -- 52cf0431-9b22-2a31-fcdc-d26605bde392(527a89e2-69ca-a4d0-784b-f615177dd817)
2021-01-20T13:01:01.676Z info vpxd[04092] [Originator@6876 sub=vpxLro opID=4026822a-28-01] [VpxLRO] -- BEGIN lro-27312 -- -- VmprovWorkflow --
[... and so on...]

I have the feeling that there is some kind of bug in the processing of the REST request but I'm out of ideas. I already tried to fill in every optional value in the JSON payload, but I had no success.

Do you have any tips on what is wrong with my REST call? What am I missing?

Kind regards

 

P.S.: Sorry, I had some trouble formatting the log output ☹️

[1] https://www.virtuallyghetto.com/2016/12/vcenter-server-high-availability-vcha-powercli-6-5-community...
[2] https://vmware.github.io/vsphere-automation-sdk-rest/vsphere/operations/com/vmware/vcenter/vcha/clus...

0 Kudos
1 Reply
mrclschstr
Contributor
Contributor

Small addition more than one year later: I tried my vCHA deployment with a fresh installation of vCSA 7.0U2 and 7.0U3c and the issue still exists with the same error message!

Just to make it more clear: The cURL example in the vCenter REST API Reference does not work! [1] I'm still out of ideas, any hint is appreciated.

 

[1] https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/api/vcenter/vcha/clusteractionde...

0 Kudos