<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.emailquote, li.emailquote, div.emailquote
        {mso-style-name:emailquote;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:1.0pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">By using vm.shutdown() instead of vm.stop() , for a Windows guest then I got a graceful shutdown but not on my Linux Guest .<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Strange isn’t ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">J.P.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Simon Hallam [mailto:sha@pml.ac.uk]
<br>
<b>Envoyé :</b> mardi 19 janvier 2016 11:38<br>
<b>À :</b> Jean-Pierre Ribeauville<br>
<b>Cc :</b> users@ovirt.org<br>
<b>Objet :</b> RE: [ovirt-users] Gracefully GUEST shutown via ovirt Python-SDK<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Try using vm.shutdown()</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:users-bounces@ovirt.org">users-bounces@ovirt.org</a> [<a href="mailto:users-bounces@ovirt.org">mailto:users-bounces@ovirt.org</a>]
<b>On Behalf Of </b>Jean-Pierre Ribeauville<br>
<b>Sent:</b> 19 January 2016 10:30<br>
<b>To:</b> <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
<b>Subject:</b> [ovirt-users] Gracefully GUEST shutown via ovirt Python-SDK</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Hi,</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">When using shutdown from ovirt manager GUI , then on a Linux Guest , I get this massage :</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">System Administrator has initiated shutdown of this Virtual Machine. Virtual Machine is shutting down."</span></i><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">The system is going down for power-off at Tue 2016-01-19 10:32:19 CET!</span></i><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">When , via ovirt Python SDK , I use this :</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">api = API(url=URL, username=USERNAME, password=PASSWORD, ca_file=CA_FILE)</span></i><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> vm = api.vms.get(name=VM_NAME)</span></i><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> print 'Stopping this VM'</span></i><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> vm.stop()<br>
<br>
</span></i><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Then the Guest is stopped in a ‘non –gracefully » way.<br>
Is it a way to achieve same behavior as via GUI shutdown ?<br>
<br>
Thx for help.</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Regards,</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<table class="MsoNormalTable" border="0" cellpadding="0" width="152" style="width:113.7pt;margin-left:5.4pt">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="color:#888888"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="color:#888888"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><b><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#888888">J.P. Ribeauville</span></b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#737373"> </span><o:p></o:p></p>
</div>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:red">P:
</span><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#737373">+33.(0).1.47.17.20.49</span><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:red">
</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#737373">.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#737373">Puteaux 3 Etage 5 Bureau 4</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#737373"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:red"><a href="mailto:jpribeauville@axway.com"><span style="font-size:9.0pt;font-family:"Calibri","sans-serif"">jpribeauville@axway.com</span></a><br>
<a href="http://www.axway.com/"><span style="font-size:9.0pt;font-family:"Calibri","sans-serif"">http://www.axway.com</span></a></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#737373"> </span><o:p></o:p></p>
</div>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<table class="MsoNormalTable" border="0" cellpadding="0" width="241" style="width:180.4pt;margin-left:5.4pt">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:18.0pt;font-family:Webdings;color:#888888">P</span><span style="font-size:8.0pt;font-family:"Calibri","sans-serif";color:#888888"> </span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#888888">Pensez
à l’environnement avant d’imprimer.</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
<pre><span lang="EN-GB"><o:p> </o:p></span></pre>
<pre><span lang="EN-GB">Please visit our new website at <a href="http://www.pml.ac.uk">www.pml.ac.uk</a> and follow us on Twitter @PlymouthMarine<o:p></o:p></span></pre>
<pre><span lang="EN-GB"><o:p> </o:p></span></pre>
<pre><span lang="EN-GB">Winner of the Environment & Conservation category, the Charity Awards 2014.<o:p></o:p></span></pre>
<pre><span lang="EN-GB"><o:p> </o:p></span></pre>
<pre><span lang="EN-GB">Plymouth Marine Laboratory (PML) is a company limited by guarantee registered in England & Wales, company number 4178503. Registered Charity No. 1091222. Registered Office: Prospect Place, The Hoe, Plymouth PL1 3DH, UK. <o:p></o:p></span></pre>
<pre><span lang="EN-GB"><o:p> </o:p></span></pre>
<pre><span lang="EN-GB">This message is private and confidential. If you have received this message in error, please notify the sender and remove it from your system. You are reminded that e-mail communications are not secure and may contain viruses; PML accepts no liability for any loss or damage which may be caused by viruses.<o:p></o:p></span></pre>
</div>
</body>
</html>