Locked disks after VM import.

Latest response

Hi all,

Yesterday I imported some VMs into a new environment. For some reason all the disks still are in a locked state. During import I restarted the ovirt-engine and did some other maintenance, this could be the reason for this locked state. There isn't any sign the diskimages are changing at the moment.

Since a locked state means that I can't manage the VMs anymore (can't start, remove, etc.) this prety much s*cks.

Can anyone give me a clue where to find this locked state on disk or db so that I can change the locked state value and at least remove the VMs and try again?

-- Vincent

Responses

Hi Vincent. I'm currently trying to get you an answer to this question. Hold on a little longer.

Sounds like something to investigate. Please open a support case with logs attached

I will create a case, but in the meantime: can anyone give me a clue:

"Can anyone give me a clue where to find this locked state on disk or db so that I can change the locked state value and at least remove the VMs and try again?"

 

I really need al least one of the VMs to get imported and run again.

Created case: 00817177

Not sure how long this problem is available since I need working vms for demo purposes. I will try to create new vms too.

Sadique got the solution:

# cd /usr/share/ovirt-engine/dbscripts

Unlock vm disk:
# ./unlock_entity.sh -t vm -i <vm_name> -d engine -u postgres

Unlock template disk:
# ./unlock_entity.sh -t template -i <vm_name> -d engine -u postgres

 

After runing the script on one of the vms, it started as if nothing happened, but datacorruption is possible using this script. So I will import the vm again, just to be sure.

 

For some reason it seems the vms still are located on the ExportDomain and can be started from there(?! not sure ??). I can set the ExportDomain to maintenance mode, but I can not detach it. An error occurs:

"Error while executing action: Cannot detach a non empty Storage Domain.
-Please remove all VMs / Templates / Disks and try again."

This is kind of strange, since an ExportDomain does not need to be empty... at least, I thought so.

Thanks for following up and sharing this, Vincent. Others may have thoughts as well...