Hi Benny,

As per the doc, I did the following, Is this the correct way to unlock the VM ?

cd /usr/share/ovirt-engine/setup/dbutils
./unlock_entity.sh -t vm c002bf24-bd34-4954-83ce-03619d7438fd
Caution, this operation may lead to data corruption and should be used with care. Please contact support prior to running this command
Are you sure you want to proceed? [y/n]
y
select fn_db_unlock_entity('vm', 'c002bf24-bd34-4954-83ce-03619d7438fd', false);
 

INSERT 0 1
unlock vm c002bf24-bd34-4954-83ce-03619d7438fd completed successfully.
[root@qcvm dbutils]# ./unlock_entity.sh -t vm c002bf24-bd34-4954-83ce-03619d7438fd
Caution, this operation may lead to data corruption and should be used with care. Please contact support prior to running this command
Are you sure you want to proceed? [y/n]
y
select fn_db_unlock_entity('vm', 'c002bf24-bd34-4954-83ce-03619d7438fd', false);
 

INSERT 0 1
unlock vm c002bf24-bd34-4954-83ce-03619d7438fd completed successfully.




But now when I try to delete the VM using ovirt rest API, I face the following issue,

{
    "detail": "[Cannot remove VM: VM is locked. Please try again in a few minutes.]",
    "reason": "Operation Failed"
}


NOTE : I used the force way to bring down

<action>
    <force>true</force>
</action>

Could you let me know the reason for the issue?


On Fri, Oct 26, 2018 at 9:27 AM Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Thank you so much Benny,

I see a way to use the unlock_entity.sh, Could you provide the right method to remove the virtual machine which is there in some locked state?

./unlock_entity.sh -u "${ENGINE_DB_USER}" -d "${ENGINE_DB_DATABASE}" -t all

On Thu, Oct 25, 2018 at 4:16 PM Benny Zlotnik <bzlotnik@redhat.com> wrote:
You can use /us/share/ovirt-engine/setup/dbutils/unlock_entity.sh to unlock it first, before removing
On Thu, Oct 25, 2018 at 1:40 PM Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Hi Team,

Any update on this ?

On Tue, Oct 23, 2018 at 9:22 PM Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:

DELETE /ovirt-engine/api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action>
    <force>true</force>
</action>

I tried apply the same, but it doesn't seem to be working, I get the following error message

{
"detail": "[Cannot remove VM. Template is being created from this VM.]",
"reason": "Operation Failed"
}

But it's status is there in IMAGE_LOCKED state so I need to delete it. 

Thanks,
Hari

On Tue, Oct 23, 2018 at 8:29 PM Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Hi Team,

I have a VM which is moved to Image locked state in ovirt, I am not able to remove this VM from ovirt,

So Is there a way to perform force delete of VM using ovirt API?

Thanks,
Hari

DISCLAIMER - MSysTechnologies LLC

This email message, contents and its attachments may contain confidential, proprietary or legally privileged information and is intended solely for the use of the individual or entity to whom it is actually intended. If you have erroneously received this message, please permanently delete it immediately and notify the sender. If you are not the intended recipient of the email message,you are notified strictly not to disseminate,distribute or copy this e-mail.E-mail transmission cannot be guaranteed to be secure or error-free as Information could be intercepted, corrupted, lost, destroyed, incomplete or contain viruses and MSysTechnologies LLC accepts no liability for the contents and integrity of this mail or for any damage caused by the limitations of the e-mail transmission.

_______________________________________________
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/3ES6M3SCBP7HLSNRYMI2GGKF3O2J7JWO/

DISCLAIMER - MSysTechnologies LLC

This email message, contents and its attachments may contain confidential, proprietary or legally privileged information and is intended solely for the use of the individual or entity to whom it is actually intended. If you have erroneously received this message, please permanently delete it immediately and notify the sender. If you are not the intended recipient of the email message,you are notified strictly not to disseminate,distribute or copy this e-mail.E-mail transmission cannot be guaranteed to be secure or error-free as Information could be intercepted, corrupted, lost, destroyed, incomplete or contain viruses and MSysTechnologies LLC accepts no liability for the contents and integrity of this mail or for any damage caused by the limitations of the e-mail transmission.