<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Then about the API.<br>
define one API but with a filter parameters as follow:<br>
<br>
<br>
--- a/docs/API.md<br>
+++ b/docs/API.md<br>
@@ -102,7 +102,9 @@ the following general conventions:<br>
**Actions (POST):**<br>
<br>
* start: Power on a VM<br>
-* stop: Power off forcefully<br>
+* stop: Power off a VM<br>
+ * grace *(optional)*: If 'true', Power off a VM
gracefully,<br>
+ or Power off a VM forcefully.<br>
* connect: Prepare the connection for spice or vnc<br>
<br>
### Sub-resource: Virtual Machine Screenshot<br>
<br>
<br>
or add a new rest API for acpi shutdown?<br>
--- a/docs/API.md<br>
+++ b/docs/API.md<br>
@@ -103,6 +103,8 @@ the following general conventions:<br>
<br>
* start: Power on a VM<br>
* stop: Power off forcefully<br>
+* shutdown: Shutdown a VM gracefully.<br>
+ Note that the guest OS may ignore the request. <br>
* connect: Prepare the connection for spice or vnc<br>
<br>
### Sub-resource: Virtual Machine Screenshot<br>
<br>
<br>
<br>
On 04/09/2014 03:54 AM, Paulo Ricardo Paz Vital wrote:<br>
</div>
<blockquote cite="mid:1396986874.2160.5.camel@hornet.br.ibm.com"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap="">+1 for option 2
<div class="moz-txt-sig">--
Paulo Ricardo Paz Vital <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:pvital@linux.vnet.ibm.com"><pvital@linux.vnet.ibm.com></a>
IBM Linux Technology Center
On Tue, 2014-04-08 at 15:00 -0300, Aline Manera wrote:
</div></pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap=""><span class="moz-txt-citetags">> </span>My vote is for option 2 too
<span class="moz-txt-citetags">> </span>
<span class="moz-txt-citetags">> </span>On 04/08/2014 12:57 PM, Adam King wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap=""><span class="moz-txt-citetags">> > </span>I would recommend option 2: "shutdown" and "power off"
<span class="moz-txt-citetags">> ></span>
<span class="moz-txt-citetags">> > </span>On 4/8/2014 11:21 AM, Sheldon wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap=""><span class="moz-txt-citetags">> >> </span>Currently, stopping guests in Kimchi is not graceful in the sense
<span class="moz-txt-citetags">> >> </span>that the guest becomes 'shut down' immediately. This could be be
<span class="moz-txt-citetags">> >> </span>problematic because guest file systems could become corrupted.
<span class="moz-txt-citetags">> >> </span>Perhaps a warning should be added before a guest is immediately
<span class="moz-txt-citetags">> >> </span>stopped or reset.
<span class="moz-txt-citetags">> >></span>
<span class="moz-txt-citetags">> >> </span>kimchi can does not support shutdown by agent, so we can not
<span class="moz-txt-citetags">> >> </span>guarantee we can shutdown graceful.
<span class="moz-txt-citetags">> >> </span>User should install agent manully
<span class="moz-txt-citetags">> >></span>
<span class="moz-txt-citetags">> >> </span>We can use acpi shutdown a VM. But not all guest os will shutdown the
<span class="moz-txt-citetags">> >> </span>VM even it receive acpi shutdown.
<span class="moz-txt-citetags">> >></span>
<span class="moz-txt-citetags">> >> </span>So I have 2 proposal:
<span class="moz-txt-citetags">> >></span>
<span class="moz-txt-citetags">> >> </span>1. only one shutdown API and one shutdown button for UI.
<span class="moz-txt-citetags">> >> </span>when user click shutdown, the backend will try to shutdown VM by acpi.
<span class="moz-txt-citetags">> >> </span>if 1 minutes timeout, kimchi will destroy the VM forcefully.
<span class="moz-txt-citetags">> >></span>
<span class="moz-txt-citetags">> >> </span>2. support ACPI shutdown and destroy two APIs. support "force off"
<span class="moz-txt-citetags">> >> </span>and "shutdown" 2 buttons in UI.
<span class="moz-txt-citetags">> >> </span>"shutdown" means ACPI shutdown. but we can not guarantee it can
<span class="moz-txt-citetags">> >> </span>shutdown the VM.
<span class="moz-txt-citetags">> >> </span>If the user find the VM is not shutdown for some time, he can try to
<span class="moz-txt-citetags">> >> </span>force power off the VM
<span class="moz-txt-citetags">> >></span>
<span class="moz-txt-citetags">> >></span>
</pre>
</blockquote>
<pre wrap=""><span class="moz-txt-citetags">> ></span>
</pre>
</blockquote>
<pre wrap=""><span class="moz-txt-citetags">> </span>
<span class="moz-txt-citetags">> </span>_______________________________________________
<span class="moz-txt-citetags">> </span>Kimchi-devel mailing list
<span class="moz-txt-citetags">> </span><a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<span class="moz-txt-citetags">> </span><a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
<span class="moz-txt-citetags">> </span>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</body>
</html>