<div dir="ltr"><div>Worked perfectly!!! BIG thanks Omer!!! All my VM's are back up. Nothing lost!<br><br></div>SOLVED!!!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-31 9:53 GMT+02:00 Omer Frenkel <span dir="ltr"><<a href="mailto:ofrenkel@redhat.com" target="_blank">ofrenkel@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
----- Original Message -----<br>
> From: "Koen Vanoppen" <<a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a>><br>
> To: "Omer Frenkel" <<a href="mailto:ofrenkel@redhat.com">ofrenkel@redhat.com</a>>, <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
</span><span class="">> Sent: Tuesday, March 31, 2015 7:35:57 AM<br>
> Subject: Re: [ovirt-users] Snapshot issue<br>
><br>
</span><span class="">> I just wanted to remove the snapshots in ovirt... That's all... And now<br>
> they are locked. Without the possibility to remove, reboot the vm or cancel<br>
> the snapshots...<br>
> So I'm stuck... How can I change the status of the snapshot in the db, so<br>
> that at least I can remove the VM? And what could be the impact , worst<br>
> case?<br>
><br>
<br>
</span>i thought you want to save the vm, then the worst case might be data corruption,<br>
in case something is really wrong with the snapshots and you try to run the vm.<br>
<br>
more optimistic, in case snapshot is missing in storage but not deleted in db,<br>
vm would fail to start, then you might be able to just delete the snapshot (again probably only manually in db)<br>
and recover completely.<br>
<br>
if you just want to delete the vm, worst case would be that you have to clear manually stuff from the db/storage<br>
<br>
if you decide to change the db, better to have a backup :)<br>
also, i would recommend making it when the engine is down.<br>
<br>
ok, so, first to get the info in the db:<br>
select snapshot_id,description,status from snapshots where status = 'LOCKED' and vm_id in (select vm_guid from vm_static where vm_name='<vm name here>');<br>
<br>
just update it to be 'OK' :<br>
update snapshots set status = 'OK' where snapshot_id = '<snapshot id from previous query>';<br>
<br>
also, check there are locked images related to this snapshot:<br>
select image_guid,imagestatus from images where vm_snapshot_id = '<snapshot id from previous query>' and imagestatus != 1;<br>
<br>
if so, need to unlock it as well:<br>
updates images set imagestatus = 1 where image_guid = '<id of images from previous query>';<br>
<br>
<br>
let me know how it went<br>
<div class="HOEnZb"><div class="h5"><br>
> Kind regards,<br>
><br>
> 2015-03-30 13:46 GMT+02:00 Omer Frenkel <<a href="mailto:ofrenkel@redhat.com">ofrenkel@redhat.com</a>>:<br>
><br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > From: "Koen Vanoppen" <<a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a>><br>
> > > To: "Omer Frenkel" <<a href="mailto:ofrenkel@redhat.com">ofrenkel@redhat.com</a>>, <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
> > > Sent: Monday, March 30, 2015 7:44:10 AM<br>
> > > Subject: Re: [ovirt-users] Snapshot issue<br>
> > ><br>
> > > I can't even remove them... Something needs to be done... Any ideas?<br>
> > ><br>
> ><br>
> > not sure i understand what you tried?<br>
> > the 'broken' snapshots are locked, so you can't remove them.<br>
> > as i said, there is no easy and safe way to fix this...<br>
> > you can try to change the status of the snapshot in the db - but i am not<br>
> > sure what will happen!<br>
> ><br>
> > > 2015-03-25 8:45 GMT+01:00 Koen Vanoppen <<a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a>>:<br>
> > ><br>
> > > > Hi Omer,<br>
> > > ><br>
> > > > Thanks for your reply.<br>
> > > > I was cleaning our snapshots on oVirt. So I started deleting snapshots<br>
> > one<br>
> > > > by one. In total in deleted 10 snapshots. 5 VM's came back up, without<br>
> > the<br>
> > > > error message, the rest of them are still down with this error message.<br>
> > > ><br>
> > > > 2015-03-25 7:36 GMT+01:00 Omer Frenkel <<a href="mailto:ofrenkel@redhat.com">ofrenkel@redhat.com</a>>:<br>
> > > ><br>
> > > >><br>
> > > >><br>
> > > >> ----- Original Message -----<br>
> > > >> > From: "Koen Vanoppen" <<a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a>><br>
> > > >> > To: <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
> > > >> > Sent: Wednesday, March 25, 2015 8:09:17 AM<br>
> > > >> > Subject: Re: [ovirt-users] Snapshot issue<br>
> > > >> ><br>
> > > >> > I'm still not able to start my VM's:<br>
> > > >> > Cannot run VM. The VM is performing an operation on a Snapshot.<br>
> > Please<br>
> > > >> wait<br>
> > > >> > for the operation to finish, and try again...<br>
> > > >> ><br>
> > > >> > I already restarted the vdsm deamons on the hypervisors and<br>
> > restarted<br>
> > > >> the<br>
> > > >> > engine too... Does anybody has any clue how I can solve this state?<br>
> > > >> ><br>
> > > >> > Kind regards,<br>
> > > >> ><br>
> > > >> > Koen<br>
> > > >> ><br>
> > > >> > 2015-03-24 7:45 GMT+01:00 Koen Vanoppen < <a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a><br>
> > > :<br>
> > > >> ><br>
> > > >> ><br>
> > > >> ><br>
> > > >> > This is in the logs:<br>
> > > >> > 2015-03-24 07:41:50,436 WARN<br>
> > [org.ovirt.engine.core.bll.RunVmCommand]<br>
> > > >> > (ajp--127.0.0.1-8702-12) [686c18ce] CanDoAction of action RunVm<br>
> > failed<br>
> > > >> for<br>
> > > >> > user Reasons:<br>
> > > >> ><br>
> > VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT<br>
> > > >> ><br>
> > > >> > Can't I clear all this? Because I Still have several machines down<br>
> > due<br>
> > > >> the<br>
> > > >> > reason he is still in the "cannot run VM..." state...<br>
> > > >> ><br>
> > > >><br>
> > > >> this happens because you have a snapshot in status locked,<br>
> > > >> probably you did some operation on snapshot and something went wrong<br>
> > (it<br>
> > > >> might have failed without clearing the state..)<br>
> > > >> there is no easy and safe way to fix this (you can change the status<br>
> > of<br>
> > > >> the snapshot in the db but i am not sure what will happen)<br>
> > > >> what action did you do with snapshots on this vm?<br>
> > > >> what was the result?<br>
> > > >><br>
> > > >> ><br>
> > > >> ><br>
> > > >> > 2015-03-23 8:40 GMT+01:00 Koen Vanoppen < <a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a><br>
> > > :<br>
> > > >> ><br>
> > > >> ><br>
> > > >> ><br>
> > > >> > Dear all,<br>
> > > >> ><br>
> > > >> > I have the following problem:<br>
> > > >> ><br>
> > > >> > Cannot run VM. The VM is performing an operation on a Snapshot.<br>
> > Please<br>
> > > >> wait<br>
> > > >> > for the operation to finish, and try again.<br>
> > > >> ><br>
> > > >> > It is like this since Friday... How can I resolve this? I really<br>
> > need<br>
> > > >> this vm<br>
> > > >> > to be up again...<br>
> > > >> ><br>
> > > >> > Kind regards,<br>
> > > >> ><br>
> > > >> > Koen<br>
> > > >> ><br>
> > > >> ><br>
> > > >> ><br>
> > > >> > _______________________________________________<br>
> > > >> > Users mailing list<br>
> > > >> > <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
> > > >> > <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
> > > >> ><br>
> > > >><br>
> > > ><br>
> > > ><br>
> > ><br>
> ><br>
><br>
</div></div></blockquote></div><br></div>