<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (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:12.0pt;
        font-family:"Times New Roman";}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:595.0pt 842.0pt;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">></span></b>There is this nova option:<o:p></o:p></p>
<div>
<p class="MsoNormal">>resume_guests_state_on_host_boot=true<o:p></o:p></p>
<p class="MsoNormal">><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">>But it doesn't delete or shutdown instances but rather turns them on automatically once compute host resumes. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">>which might also work for you, probably not just mentioning it any way.  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Note that you might want to check some things after a reboot before booting up all your instances.<o:p></o:p></p>
<p class="MsoNormal">The easiest way would be to set this value to true but to not start the nova-compute service on boot.<o:p></o:p></p>
<p class="MsoNormal">Now you can check whatever you need and start nova-compute when you know the server is in a good state.<o:p></o:p></p>
<p class="MsoNormal">Nova will now start the instances that where running when your compute node was shutdown.
<o:p></o:p></p>
<p class="MsoNormal">The nice thing about this is that any instances that where shutdown/suspended by users will keep in a shutdown state.<o:p></o:p></p>
<p class="MsoNormal">If you do not do this you would need to create a custom script that saves which instances where running before the shutdown and then use that list to start only the correct instances.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Another thing to consider is if you want to auto-start instances after a compute node did an unexpected reboot.<o:p></o:p></p>
<p class="MsoNormal">IMHO I would rather have a dead instance then an instance running on flaky hard/software but it might depend a bit on your use case.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">>I don't know of an option to stop/delete instance on compute node shutdown. <o:p></o:p></p>
<p class="MsoNormal">As mentioned by some other people this is actually a libvirt setting not a nova setting.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
<p class="MsoNormal">Robert van Leeuwen<o:p></o:p></p>
</div>
</div>
</body>
</html>