<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="GtkHTML/4.4.4">
</head>
<body>
tor 2013-05-16 klockan 11:19 -0400 skrev Gilad Chaplik:
<blockquote type="CITE">
<pre>
----- Original Message -----
> From: "Karli Sjöberg" <<a href="mailto:Karli.Sjoberg@slu.se">Karli.Sjoberg@slu.se</a>>
> To: "Noam Slomianko" <<a href="mailto:nslomian@redhat.com">nslomian@redhat.com</a>>
> Cc: "users" <<a href="mailto:users@ovirt.org">users@ovirt.org</a>>
> Sent: Thursday, May 16, 2013 3:50:11 PM
> Subject: Re: [Users] [Fwd: Guest never gets removed]
>
> Hi Noam!
>
> tor 2013-05-16 klockan 06:23 -0400 skrev Noam Slomianko:
>
>
> Hi Karli,
> I don't know about reminding the engine of forgotten actions and sounds like
> the failure can originate from all sort of problems...
> This means I don't have a good solution, but I do have "a" solution.
>
> What is a man without backups?;)
>
>
>
>
> Go to the host and manually remoove the VM:
> If vdsClient is installed do "vdsClient 0 list table" and then "vdsClient 0
> destroy <UUID>"
> If not the use virsh to list the vms "virsh list" then using the id/name
> remove it "virsh destroy <id/name>"
>
> No sign of that Guest using any of the above commands. I also checked whether
> it still had any "ghost" Virtual Disks so I guess SPM managed to clear that.
>
>
>
>
> Then go to Ovirt DB and delete (cascade) the VM from vm_static
>
> That´s where I could use the most guideance really. How exactly do I do that?
as a last resort, you can run the following sql statements
1) select vm_guid from vm_static where vm_name = '???'
2) delete from snapshots where vm_id = 'vm_guid' -- vm_guid from 1
3) select DeleteVmStatic('vm_guid') -- vm_guid from 1
</pre>
</blockquote>
<br>
[<a href="mailto:root@storm">root@engine</a> ~]# psql -U engine -c "select vm_guid from vm_static where vm_name = 'GhostGuest'"<br>
vm_guid <br>
--------------------------------------<br>
86380302-ce99-4e40-94ca-3f59bb491e5e<br>
(1 row)<br>
<br>
[<a href="mailto:root@engine">root@engine</a> ~]# psql -U engine -c "delete from snapshots where vm_id = '86380302-ce99-4e40-94ca-3f59bb491e5e' -- vm_guid from 1"<br>
DELETE 1<br>
[<a href="mailto:root@storm">root@engine</a> ~]# psql -U engine -c "select DeleteVmStatic('86380302-ce99-4e40-94ca-3f59bb491e5e') -- vm_guid from 1"<br>
deletevmstatic <br>
----------------<br>
<br>
(1 row)<br>
<br>
The "ghost" Guest was then exorcised (it immaterialized from web-ui) and I could also delete a Template that was previously locked due this GhostGuest (it was made with thin "Template Provisioning"). Super help! Thanks a bunch!<br>
<br>
/Karli<br>
<br>
<blockquote type="CITE">
<pre>
>
>
>
>
> But remember that as always touching the inner working directly might be
> risky and prone to errors (no way to recover if you deleted the wrong VM)
> So use with caution.
>
> I hope this helps,
> Noam.
>
>
> ----- Original Message -----
> From: "Karli Sjöberg" < <a href="mailto:Karli.Sjoberg@slu.se">Karli.Sjoberg@slu.se</a> >
> To: "users" < <a href="mailto:users@ovirt.org">users@ovirt.org</a> >
> Sent: Wednesday, May 15, 2013 8:17:47 AM
> Subject: [Users] [Fwd: Guest never gets removed]
>
> Hello everyone!
>
> I think perhaps this question passed completly unnoticed so I´m trying to
> resend it to perhaps get some attention.
>
> /Karli
>
> -------- Vidarebefordrat meddelande --------
>
>
> Från : Karli Sjöberg < <a href="mailto:Karli.Sjoberg@slu.se">Karli.Sjoberg@slu.se</a> >
> Till : users < <a href="mailto:users@ovirt.org">users@ovirt.org</a> >
> Ämne : [Users] Guest never gets removed
> Datum : Wed, 8 May 2013 05:06:57 +0000
>
> Hi,
>
> yesterday I issued a remove of a Guest and then immediately afterwards engine
> started complaining about sync errors between database and storage metadata.
> To my surprise, both of my two data stores were marked as master in their
> storage metadata files. I had to change "MASTER_VERSION" and "ROLE", then
> tail the vdsm log on a Host and watch it complain that the checksum is wrong
> and how it is ${X} but should be ${Y} according to it´s logic, and
> copy/paste tbe correct checksum into storage metadata file as well. This had
> to be done for both data domains, and when done, I have one "Master"- and
> one "Regular" domain that works and equals what´s in the database.
>
> The problem is that engine now apparently has forgotten about my Guest that
> it was supposed to remove before all of this... The operation is still
> listed in "Tasks", so it´s not quite finished yet. Since it´s changed state
> to "hourglass" and status "Image locked", I can´t click for removal again
> either...
>
> Is there any way to "remind" engine of a job not done?
>
>
>         --
>
> Med Vänliga Hälsningar
> -------------------------------------------------------------------------------
> Karli Sjöberg
> Swedish University of Agricultural Sciences
> Box 7079 (Visiting Address Kronåsvägen 8)
> S-750 07 Uppsala, Sweden
> Phone: +46-(0)18-67 15 66 <a href="mailto:karli.sjoberg@slu.se">karli.sjoberg@slu.se</a> --
>
> Med Vänliga Hälsningar
> -------------------------------------------------------------------------------
> Karli Sjöberg
> Swedish University of Agricultural Sciences
> Box 7079 (Visiting Address Kronåsvägen 8)
> S-750 07 Uppsala, Sweden
> Phone: +46-(0)18-67 15 66 <a href="mailto:karli.sjoberg@slu.se">karli.sjoberg@slu.se</a>
> _______________________________________________
> Users mailing list <a href="mailto:Users@ovirt.org">Users@ovirt.org</a>
> <a href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a>
>
>
>         --
>
> Med Vänliga Hälsningar
> -------------------------------------------------------------------------------
> Karli Sjöberg
> Swedish University of Agricultural Sciences
> Box 7079 (Visiting Address Kronåsvägen 8)
> S-750 07 Uppsala, Sweden
> Phone: +46-(0)18-67 15 66
> <a href="mailto:karli.sjoberg@slu.se">karli.sjoberg@slu.se</a>
>
> _______________________________________________
> Users mailing list
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a>
> <a href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a>
>
</pre>
</blockquote>
<br>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>-- <br>
<br>
Med Vänliga Hälsningar<br>
-------------------------------------------------------------------------------<br>
Karli Sjöberg<br>
Swedish University of Agricultural Sciences<br>
Box 7079 (Visiting Address Kronåsvägen 8)<br>
S-750 07 Uppsala, Sweden<br>
Phone: +46-(0)18-67 15 66<br>
<a href="mailto:karli.sjoberg@adm.slu.se">karli.sjoberg@slu.se</a> </td>
</tr>
</tbody>
</table>
</body>
</html>