I figured out part of it!

After I figured out how to access the DB, I was able to update to correct entry in the "vm_dynamic" status  to 0.  I did this by:

sudo su postgres

psql engine -c "SELECT vm_guid, vm_name from vm_static WHERE vm_name = 'Clonezilla_Server';"

Returns:0eb29824-f1ca-4d27-bf57-a3ed36c40c18

psql engine -c "update vm_dynamic SET status=0 where vm_guid='0eb29824-f1ca-4d27-bf57-a3ed36c40c18';"


After this I was able to delete the entry from ovirt. I am not sure why a disk would not import, but at least I dont have a locked image in the queue anymore!


On Mon, Aug 14, 2017 at 12:24 AM, Wesley Stewart <wstewart3@gmail.com> wrote:
I was doing some testing and recently rebuilt my homelab using a Xeon-D based board.  I did not have anything too important, so I thought this would be a good chance to test re-importing my backups and seeing how well it works.

I created a new export domain and copied all of my old VM's into this new export domain.  But the problem is, the images are in a "Locked" state.  The console tells me:

Aug 13, 2017 11:59:38 PM
Failed to import Vm Clonezilla_Server_BACKUP_20170807_010018 to Data Center OVIRT-Datacenter, Cluster OVIRT-Cluster
Aug 13, 2017 11:59:38 PM
VDSM command DeleteImageGroupVDS failed: Image does not exist in domain: u'image=a5c8780e-3166-4801-b71a-1ef7d9b21783, domain=35cd8fab-4347-4201-bf4e-4dcbde19fb0f'
Aug 13, 2017 11:59:37 PM
VDSM OVIRT-Host command HSMGetAllTasksStatusesVDS failed: low level Image copy failed

This happens for all the VMs shown in the Export-Domain.

I also tried the unlock_entity.sh script, but I am having some postgres access issues:

unlock_entity.sh -r -t vm -i Clonezilla_Server -s localhost
psql: FATAL:  no PostgreSQL user name specified in startup packet
FATAL: Cannot execute sql command: --file=./unlock_entity.sql

I thought I could just poke around the database by running:
psql -d engine -U postgres
But this also fails
psql: FATAL:  Peer authentication failed for user "postgres"
Was just hoping someone had some suggestions.  I can't event delete this VM!  Thanks!