oVirt: Stop all running tasks

So you know what makes me angry? Tasks that won’t stop running. This happened to me at work and it infuriated me. I had to go though mailing lists to figure it out, but here is the solution.

SSH into ovirt-engine as root, then run:

su postgres
psql -d engine -U postgres
select * from job order by start_time desc;

This group of commands switches us to the postgres user, allowing access to the oVirt database. Then we access said database and list all the columns and rows in the job table.

Grab the job_id for the task you want to delete, then use the DeleteJob procedure:

select DeleteJob('UUID_HERE');

For example:

select DeleteJob('8424f7a9-2a4c-4567-b528-45bbc1c2534f');

Give the web GUI a minute or so to catch up with you. The tasks should be gone. If it is still running, make sure the UUID was correct.

If when you try and run psql you get command not found, try using this after switching to the postgres user:

scl enable rh-postgresql10 "psql -d engine -U postgres"


And then picking up at the select command.



About: Ryan Parker

I'm a former captain of the Cyber Defense team, Current Infrastructure Security Specialist. I also have a side job helping small to medium business with anything technology doing everything imaginable. One of my hobbies is building out infrastructures for myself, friends, and clients. I current maintain a homelab with about 400GB of RAM, 100+ TB of storage, and tons of CPU cores.


2 thoughts on “oVirt: Stop all running tasks”

  1. thanks and some notes:
    ‘scl enable rh-postgresql10 “psql -d engine -U postgres”‘ is version dependent, ie 10 => 195 for me.
    Check in the /etc/scl/conf dir for your particular version.

    Unlock disks howto: if you have an export or clone stuck in progress.
    “PGPASSWORD=somepass /usr/share/ovirt-engine/setup/dbutils/unlock_entity.sh -t disk -q”; # will show the disks.
    “PGPASSWORD=somepass ./unlock_entity.sh -t disk -r 0d2b76b7-cdf8-4d02-8b70-4703f0674fe2”; # put in your uuid here.

Leave a Reply

Your email address will not be published. Required fields are marked *