0

very good night!

I would like to know if it is possible to create a filter in oVirt Manager bringing only the VMs that had the "High Availability" option enabled.

I thank you for your help.

Att,

Allan Castro.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 12 '21 at 10:22

1 Answers1

0

Unfortunately that parameter is not available as a filter in the search box.

In the past I used to collect additional information directly from the engine database with a query like this (I use already configured SQL views vms and all_disks_for_vms):

SELECT vm_name,
    num_of_cpus,
    mem_size_mb,
    total_disk_usage,
    guestos_type,
    guestos_distribution,
    guestos_codename,
    guestos_version,
    Cluster_name,
    auto_startup as high_availability,
    vm_ip
FROM vms
LEFT JOIN
  (SELECT vm_id,
    SUM(size) AS total_disk_usage
  FROM all_disks_for_vms
  GROUP BY vm_id) custom_disk ON vm_guid = vm_id;

As you can see, vms.auto_startup is your field.

I need to left join the vms view with a nested query since vms only contains a JSON description of virtual disks under disks_usage column. I decided to use the all_disks_for_vms view instead and summarize disks dimension grouped for VM. I choose LEFT JOIN in order to preserve VM entries without virtual disk.

If you need then to produce a CSV to be copied elsewhere and analyzed, you can create a shell script using engine-db-query tool (provided by the homonymous package on the Engine machine):

#!/bin/sh
engine-db-query --csv --statement "
select vm_name,
       num_of_cpus,
       mem_size_mb,
       total_disk_usage,
       guestos_type,
       guestos_distribution,
       guestos_codename,
       guestos_version,
       cluster_name,
       auto_startup as high_availability,
       vm_ip
from vms
left join
  (select vm_id,
          sum(size) as total_disk_usage
   from all_disks_for_vms
   group by vm_id) custom_disk on vm_guid = vm_id" > vm_report.csv

Beside that, I strongly suggest you to write an e-mail to users@ovirt.org and consider opening an RFE for this feature.