"text": "<root:UndeployVAppParams xmlns:root=\"http://www.vmware.com/vcloud/v1.5\"><root:UndeployPowerAction>powerOff</root:UndeployPowerAction></root:UndeployVAppParams>"
"response": {
"status": 409,
"statusText": "Conflict",
vCloud director 10.3.3
When a VM is in maintenance mode, it is read-only at the Organization level and only the System admin can perform any operations on it
POST /vApp/{id}/action/exitMaintenanceMode (Take the VM out of maintenance mode)
Steps to exit maintenance mode for the VM
1. Take SSH to the vCloud primary cell and connect to the vCloud DB
sudo -i -u postgres psql vcloud
2. Note down the VM ID from the browser URL and replace the ID in SQL to fetch vapp_id
Example: https://vcloud-fqdn/tenant/<tenant-name>/vdcs/xxxx/vm/vm-0d4d6496-a7b5-4698-xxxx-3251cfd9b3c4/general
3. Execute the statement - select * from vapp_vm where id = '0d4d6496-a7b5-4698-xxxx-3251cfd9b3c4';
id | 0d4d6496-a7b5-4698-xxxx-3251cfd9b3c4
vapp_scoped_vm_id | b8f5bb04-df1e-46b5-xxxx-ad435a21bc14
vapp_id | 0234a510-7907-456c-xxxx-deadd16ea93c
4. Send the API call to exit the VM from maintenance mode
POST https://vcloud.example.com/api/vApp/vapp-0234a510-7907-456c-xxxx-deadd16ea93c/action/exitMaintenanceMode
Status: 204 No Content
5. Once the Virtual Machine is out of Maintenance mode, Organization users should be able to perform VM actions
How to establish an API connection VMware Cloud Director (56948)