[OmniOS-discuss] Managing KVM virtual machines
Jorge Schrauwen
sjorge+ml at blackdot.be
Mon Sep 29 13:57:54 UTC 2014
This will not cleanly shutdown your vm's at system halt though.
But if you can live with that, that will work fine :)
On 2014-09-29 11:59, Filip Marvan wrote:
> 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/ac92a275/attachment.html>
More information about the OmniOS-discuss
mailing list