Perfect! Thank you Michal.

Kind regards,
Mitja

On 15/07/2019 18:31, Michal Skrivanek wrote:


On 15 Jul 2019, at 15:11, Mitja Mihelič <mitja.mihelic@arnes.si> wrote:

Hi!

We are graphing certain parameters we collect from the engine database.
We use following query to get the count of running VMs:
select count(*),cluster.name as cluster from vms, cluster where vms.cluster_id = cluster.cluster_id and vms.status = 1 group by cluster;

It would help extremely if we knew what the numeric VM status codes mean.

https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VMStatus.java#L9

For example, I know that "status = 1" means the VM is running. The ones we can cause through the web interface are easy enough to figure out. But there are error states, that cannot be produced by standard use.

For instance, when the event log says "VM foobar has been paused due to storage I/O problem." the following states get set in the DB
(Query used: select * from vm_dynamic where vm_guid =(select vm_guid from vm_static where vm_name = 'foobar';):
status                 | 4
exit_status            | 0
pause_status           | 2
guest_agent_status     | 0

What do they mean?

If you could point me to a table somewhere with the state descriptions it would be extremely helpful.

Kind regards,
Mitja Mihelič
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/ZBNGPWHGYHV4M3MM2VXTMKVYKUNARWVG/