[Engine-devel] VM migration state in after_vm_destroy hook

--_000_9D25E123B44F4A4291F4B5C13DA94E772B3C426FMTRDAG01mtlcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Is there any way to know in context of VDSM 'after_vm_destroy' hook if VM i= s terminated (globally in the cluster) or migrated to other Host? Is there some Environment parameter or other indication? Thanks a lot, Irena --_000_9D25E123B44F4A4291F4B5C13DA94E772B3C426FMTRDAG01mtlcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:windowtext;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"EN-US" link=3D"blue" vlink=3D"purple"> <div class=3D"WordSection1"> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">Hi,<o:p></o:p></p> <p class=3D"MsoNormal">Is there any way to know in context of<span style=3D= "color:#1F497D"> VDSM</span> ‘after_vm_destroy’ hook if VM is t= erminated (globally in the cluster) or migrated to other Host?<o:p></o:p></= p> <p class=3D"MsoNormal">Is there some Environment parameter or other indicat= ion?<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">Thanks a lot,<o:p></o:p></p> <p class=3D"MsoNormal">Irena<o:p></o:p></p> </div> </body> </html> --_000_9D25E123B44F4A4291F4B5C13DA94E772B3C426FMTRDAG01mtlcom_--

Not a hook expert, but I looked at the code, and besides after_vm_destroy we also have: before_vm_migrate_source after_vm_migrate_source before_vm_migrate_destination after_vm_migrate_destination So, I guess you can put the relevant code in the after_vm_migrate_source for the migration use-case, and after_vm_destroy for the destroy use-case. Oved ----- Original Message -----
From: "Irena Berezovsky" <irenab@mellanox.com> To: engine-devel@ovirt.org Sent: Sunday, September 2, 2012 3:33:38 PM Subject: [Engine-devel] VM migration state in after_vm_destroy hook
Hi,
Is there any way to know in context of VDSM ‘after_vm_destroy’ hook if VM is terminated (globally in the cluster) or migrated to other Host?
Is there some Environment parameter or other indication?
Thanks a lot,
Irena _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (2)
-
Irena Berezovsky
-
Oved Ourfalli