openstack-manuals/doc/user-guide/section_cli_nova_startstop.xml
liyingjun ea46567346 Suspending instance will not update resource usage
As reported in the bug, "memory and vCPUs NOT become available to
create other instances when suspending instance". So update the
description for ' Suspend and resume an instance'.

Change-Id: I4c11c73fe9ba42e77c86cefe4360ce2496e810e1
Closes-bug: #1402502
2014-12-18 08:42:06 +08:00

79 lines
4.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="nova_cli_stop_start">
<title>Stop and start an instance</title>
<para>Use one of the following methods to stop and start an
instance.</para>
<section xml:id="pause_server">
<title>Pause and unpause an instance</title>
<itemizedlist>
<listitem>
<para>To pause an instance, run the following command:</para>
<screen><prompt>$</prompt> <userinput>nova pause <replaceable>INSTANCE_NAME</replaceable></userinput> </screen>
<para>This command stores the state of the VM in RAM. A paused
instance continues to run in a frozen state.</para></listitem>
<listitem><para>To unpause the instance, run the following command:</para>
<screen><prompt>$</prompt> <userinput>nova unpause <replaceable>INSTANCE_NAME</replaceable></userinput> </screen>
</listitem>
</itemizedlist>
</section>
<section xml:id="suspend_resume">
<title>Suspend and resume an instance</title>
<itemizedlist>
<para>Administrative users might want to suspend an instance if
it is infrequently used or to perform system maintenance. When
you suspend an instance, its VM state is stored on disk, all
memory is written to disk, and the virtual machine is stopped.
Suspending an instance is similar to placing a device in
hibernation.</para>
<note>
<para>Suspending an instance will not free allocated memory or
virtual CPU resources. To release them, delete the instance.</para>
</note>
<listitem>
<para>To initiate a hypervisor-level suspend operation, run
the following command:</para>
<screen><prompt>$</prompt> <userinput>nova suspend <replaceable>INSTANCE_NAME</replaceable></userinput></screen>
</listitem>
<listitem>
<para>To resume a suspended instance, run the following
command:</para>
<screen><prompt>$</prompt> <userinput>nova resume <replaceable>INSTANCE_NAME</replaceable></userinput></screen>
</listitem>
</itemizedlist>
</section>
<section xml:id="shelve_server">
<title>Shelve and unshelve an instance</title>
<para>Shelving is useful if you have an instance that you are not using, but would like retain in
your list of servers. For example, you can stop an instance at the end of a work week, and
resume work again at the start of the next week. All associated data and resources are kept;
however, anything still in memory is not retained. If a shelved instance is no longer needed,
it can also be entirely removed.</para>
<para>You can complete the following shelving tasks:</para>
<variablelist>
<varlistentry><term>Shelve an instance</term>
<listitem><para>Shuts down the instance, and stores it together with associated data and resources (a snapshot
is taken if not volume backed). Anything in memory is lost. Use the following
command:</para>
<screen><prompt>$</prompt> <userinput>nova shelve <replaceable>SERVERNAME</replaceable></userinput></screen>
</listitem>
</varlistentry>
<varlistentry><term>Unshelve an instance</term>
<listitem><para>Restores the instance:</para>
<screen><prompt>$</prompt> <userinput>nova unshelve <replaceable>SERVERNAME</replaceable></userinput></screen>
</listitem>
</varlistentry>
<varlistentry><term>Remove a shelved instance</term>
<listitem><para>Removes the instance from the server; data and resource associations are deleted. If an
instance is no longer needed, you can move that instance off the hypervisor in order to
minimize resource usage:</para>
<screen><prompt>$</prompt> <userinput>nova shelve-offload <replaceable>SERVERNAME</replaceable></userinput></screen>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>