[OmniOS-discuss] Managing KVM virtual machines
Filip Marvan
filip.marvan at aira.cz
Mon Sep 29 09:59:27 UTC 2014
Hello Jorge,
thank you for reply. I found another quite simply solution. When I set sevice
properties in manifest like this:
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='contract'
/>
<propval name='ignore_error' type='astring'
value='core,signal' />
</property_group>
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.
So now when I list KVM services, I can see, which are running (are online) and
which are not (are maintanance).
Filip
From: Jorge Schrauwen [mailto:sjorge+ml at blackdot.be]
Sent: Friday, September 26, 2014 11:35 PM
To: Filip Marvan
Cc: omnios-discuss at lists.omniti.com
Subject: Re: [OmniOS-discuss] Managing KVM virtual machines
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.
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.
-chardev
socket,id=monitor,path=/vms/hosts/${VMNAME}/run/monitor.sock,server,nowait \
-monitor chardev:monitor \
To add the monitor
Hope this is somewhat helpful!
Regards
Jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20140929/4da0adb7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6247 bytes
Desc: not available
URL: <https://omniosce.org/ml-archive/attachments/20140929/4da0adb7/attachment-0001.bin>
More information about the OmniOS-discuss
mailing list