<html xmlns:v="urn:schemas-microsoft-com:vml" 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=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"Formátovaný v HTML Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.FormtovanvHTMLChar
        {mso-style-name:"Formátovaný v HTML Char";
        mso-style-priority:99;
        mso-style-link:"Formátovaný v HTML";
        font-family:"Consolas","serif";}
span.StylE-mailovZprvy20
        {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:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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=CS link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hello Jorge,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>thank you for reply. I found another quite simply solution. When I set sevice properties in manifest like this:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><property_group name='startd' type='framework'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>                    <propval name='duration' type='astring' value='contract' /><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>                    <propval name='ignore_error' type='astring' value='core,signal' /><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'></property_group><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>it does exactly what I need. Qemu process is still monitored by SMF, but when process stoped (because of shutdown from guest), SMF will not restart process again, but service is switched to maintanance mode.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So now when I list KVM services, I can see, which are running (are online) and which are not (are maintanance). <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Filip<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span 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"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jorge Schrauwen [mailto:sjorge+ml@blackdot.be] <br><b>Sent:</b> Friday, September 26, 2014 11:35 PM<br><b>To:</b> Filip Marvan<br><b>Cc:</b> omnios-discuss@lists.omniti.com<br><b>Subject:</b> Re: [OmniOS-discuss] Managing KVM virtual machines<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>You can make qemu dump a monitoring socket, you can then use netcat to send commands like acpi shutdown events but also query other info. If the socket is dead, the qemu process crashed.<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>So applying some wrapper magic it could be possible to make the svc more intelligent. I can't offor you a working manifest though :( I theorized about it but deemed it too much work for the one vm I run. I do use the qemu monitoring socket however.<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'> <o:p></o:p></span></p></div><p style='margin-bottom:12.0pt'><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>-chardev socket,id=monitor,path=/vms/hosts/${VMNAME}/run/monitor.sock,server,nowait \<br>-monitor chardev:monitor \<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>To add the monitor<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>Hope this is somewhat helpful!<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>Regards<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif"'>Jorge<span style='color:#1F497D'><o:p></o:p></span></span></p></div></body></html>