[Openstack] nova: instance states and commands

Marco CONSONNI mcocmo62 at gmail.com
Wed Nov 21 15:34:36 UTC 2012


Hi Anne and all.

Anne, thanks for your reply and suggestions.

I made some more investigation on this subject, found more information
(maybe too many pages, wikies, blogs, emails, etc...) and these are my
findings and comments:

0) This is the page where I found most of the states (
http://docs.openstack.org/developer/nova/devref/vmstates.html).
Unfortunately the page does not tell the whole story in terms of what a
status means and when a command is applicable according to the Hypervisor
you are using (see more below).
At least one state page (e.g. STOPPED) seems to be wrong,
Also this page reports useful information on command, in general
https://gist.github.com/2714727.

1) The difference between SUSPENDED and PAUSED should be related to where
the VM 'contents' are stored (see
http://docs.openstack.org/trunk/openstack-compute/admin/content/pausing-and-suspending-instances.html).
In both cases the execution of the VM is 'frozen' (computation is temporary
stopped) but if the VM is suspended  its contents are stored onto the node
disk; if paused, the contents are stored into node's RAM. (
http://docs.openstack.org/trunk/openstack-compute/admin/content/nova_cli_suspend_resume.html
)

2) The RESCUE state is described here (
http://docs.openstack.org/developer/nova/api_ext/ext_rescue.html) and seems
to be available for XenServer, only (
http://virtualandy.wordpress.com/2012/11/04/deep-dive-openstack-nova-rescue-mode-with-xenapi-xenserver/).
Very likely, there are some settings to do for making this feature work
(seek word "rescue" here http://wiki.openstack.org/NovaConfigOptions).

3) States RESIZE, REVERT-RESIZE, VERIFY_RESIZE with related commands "nova
resize", "nova revert-resize" and "nova resize-revert" should allow changes
to the flavor of a currently running VM> I was not able to verify how these
things work probably because I'm testing with KVM and these features should
be for XenServer, only (
http://virtualandy.wordpress.com/2012/09/13/deep-dive-nova-resize-up-xenapi/
)
Also resizing needs some nova configuration (seek for the word "resize"
here http://wiki.openstack.org/NovaConfigOptions). I found a usage example
here https://gist.github.com/2714727 but I was not able to reproduce.
My instance does not transition from ACTIVE to RESIZE when I submit "nova
resize". I also tried from SUSPENDED and PAUSE, without positive results.
My hunch is that the problem is in the hypervisor I'm using.


4) DELETED state should be "transient" in the sense that it is entered when
you "nova delete" an instance. It is automatically left when the
"termination procedure" finishes.

5) SHUTOFF state can be reached by submitting "nova stop" as far as I
understand, what's reported here is
http://docs.openstack.org/api/openstack-compute/2/content/List_Servers-d1e2078.html.
either out-of-date or plain wrong.

6) I wasn't able to reach UNKNOWN state. The way for getting to it is,
well, unknown

7) REBOOT and HARD_REBOOT are entered respectively when you submit "nova
reboot" and "nova reboot --hard". Both are temporary meaning that they are
left as soon as the rebooting procedure terminates.

8) I didn't find any page mentioning MIGRATING state that is entered when
you migrate an instance (I just tried "nova live-migration")

Can anybody confirm?

Thanks,
Marco.



On Tue, Nov 20, 2012 at 10:20 PM, Anne Gentle <anne at openstack.org> wrote:

> Hi Marco -
> Great questions, and I won't tell you to read the fine manual because
> I know you do and log the most excellent bugs. :) But more commentary
> below for how to do some detective work. I would still like for
> someone to answer these questions in detail.
>
> On Tue, Nov 20, 2012 at 4:46 AM, Marco CONSONNI <mcocmo62 at gmail.com>
> wrote:
> > Hello,
> >
> >
> >
> > I’m playing with nova CLI and I found that there are several commands for
> > managing the current state of instances running in the cloud.
> >
> >
> >
> > These are the states I found:
> >
> >
> >
> > ·         initial
> > ·         build
> > ·         active
> > ·         shutoff
> > ·         suspended
> > ·         rescue
> > ·         paused
> > ·         reboot
> >
> >
> >
> > And these are the nova commands for changing the current state:
> >
> >
> >
> > ·         boot
> > ·         pause
> > ·         reboot
> > ·         rescue
> > ·         resume
> > ·         start
> > ·         stop
> > ·         suspend
> > ·         unpause
> > ·         unrescue
> >
> >
> >
> > QUESTION: Is there any explanation on the meaning of the states? In
> > particular, what’s the difference between SUSPENDED, PAUSED and RESCUE?
>
> The document for this info is the Compute API spec, specifically
>
> http://docs.openstack.org/api/openstack-compute/2/content/List_Servers-d1e2078.html
> .
> However since it is a spec it is likely that there are undocumented
> things going on here.
>
> Also the API definitions don't tell the whole story because the nova
> CLI parameter "pause" is doing something with the API that you can
> find out using the nova --debug command.
>
> nova --debug pause <servername>
>
> It seems like it's doing something with extensions, such as
> "OS-EXT-STS:vm_state" "OS-EXT-STS:power_state" so dig further there.
> You can search for Extended Server status on
> http://api.openstack.org/api-ref.html.
>
> Boy, trying to find this info myself shows what a nightmare this info
> is to dig into, and I apologize for that. Sure shows a need for more
> API documentation for real usage.
>
> Thanks,
> Anne
>
> >
> >
> > Another command changes the status and, from what I found, it always
> changes
> > that to ERROR.
> >
> > The command is “nova reset-state”.
> >
> >
> >
> > QUESTION: what’s the semantics of this command?
> >
> >
> >
> >
> >
> > Then, I found some other commands that sound like status management
> command
> > but, actually they are not:
> >
> >
> >
> > ·         Lock
> > ·         Unlock
> >
> >
> >
> > QUESTION: What’s the meaning of these?
> >
> >
> >
> >
> >
> > Marco.
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~openstack
> > Post to     : openstack at lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~openstack
> > More help   : https://help.launchpad.net/ListHelp
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121121/586bbef8/attachment.html>


More information about the Openstack mailing list