Does anyone know how to query the PostgreSQL Database to find out the vMotion history of a single vm guest?
I have the SQL commands to do this against the MS-SQL database, but can't seem to get them to work on the PostgreSQL database?
For MS-SQL:
use VCDB
SELECT [TASK_ID]
,[NAME]
,[ENTITY_NAME]
,[COMPLETE_STATE]
,[QUEUE_TIME]
,[START_TIME]
,[COMPLETE_TIME]
FROM [vcdb].[dbo].[VPX_TASK]
where (NAME = 'vim.VirtualMachine.migrate' or NAME = 'vim.VirtualMachine.relocate') AND ENTITY_NAME = 'MY_VM'
order by START_TIME desc
The "migrate" task is a host migration, the "relocate" task is a datastore migration.