Subject: [OPSAWG] VMM-MIB joint proposal: Item 3 - VM-MIB paused != suspended

From: Michael MacFaden <[email-masked]>
Date: Mon, 4 Mar 2013 16:26:10 -0800 (PST)

Hi,

In: 
http://www.ietf.org/internet-drafts/draft-asai-vmm-mib-02.txt 

Think we need to clarify the concept of 'pause' in both admin
and operational states.

VirtualMachineAdminState ::= TEXTUAL-CONVENTION 
STATUS current 
DESCRIPTION 
"The administrative state of a virtual machine: 
on(1) The administrative power state of the 
virtual machine is off. 
off(2) The administrative power state of the 
virtual machine is on. 
pause(3) The administrative power state of the 
virtual machine is hibernated or 
suspended." 
SYNTAX INTEGER { 
on(1), 
off(2), 
pause(3) 
} 

A virtual machine is a OS process. An operator can suspend it in memory (pkill -HUP ${myvm}).
HOST-RESOURCES-MIB (rfc 2790) would report the VM process in hrSWRunTable
as state notRunnable. 

    hrSWRunStatus OBJECT-TYPE
    SYNTAX     INTEGER {
                   running(1),
                   runnable(2),    -- waiting for resource
                                   -- (i.e., CPU, memory, IO)
                   notRunnable(3), -- loaded but waiting for event
                   invalid(4)      -- not loaded
               }
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "The status of this running piece of software.
        Setting this value to invalid(4) shall cause this
        software to stop running and to be unloaded. Sets to
        other values are not valid."
    ::= { hrSWRunEntry 7 }

That's how I naturally think of what 'pause' as opposed to 'suspend or hibernate'
which takes the process out of memory deep-freeze's running state (for a given CPU hardware) to
persistent storage.

Thanks,
Mike MacFaden

---

From: Michael MacFaden <[email-masked]>
Date: Mon, 4 Mar 2013 16:59:07 -0800 (PST)

A correction to my prior post.

> A virtual machine is a OS process. An operator can suspend it in memory

pkill -STOP ${myvm}

Thanks,
Mike MacFaden

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 5 Mar 2013 12:21:07 +0100

> Think we need to clarify the concept of 'pause' in both admin

[...] 

> A virtual machine is a OS process. An operator can suspend it in
> memory (pkill -HUP ${myvm}).  HOST-RESOURCES-MIB (rfc 2790) would
> report the VM process in hrSWRunTable as state notRunnable.

I think this is not necessarily correct. With Xen, for example,
virtual machines are not showing up as OS processes.

> That's how I naturally think of what 'pause' as opposed to 'suspend
> or hibernate' which takes the process out of memory deep-freeze's
> running state (for a given CPU hardware) to persistent storage.

I think that is actually what libvirt understands by a paused domain
as well. In fact, they have an enum VIR_DOMAIN_PAUSED in
virDomainState with a comment saying "the domain is paused by user".

So are we all talking about the same state here and all you are looking
for is more text? If so, what about a concerete proposal we can word
smith?

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Michael MacFaden <[email-masked]>
Date: Wed, 6 Mar 2013 23:44:48 -0800 (PST)

> for is more text? If so, what about a concerete proposal we can word

Sure, here's a proposed update:
 
VirtualMachineAdminState ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
            "The administrative state of a virtual machine (VM):

            on(1)          The administrative state of the
                           virtual machine indicating the VM should
                           be brought online.

            off(2)         The administrative state of the
                           virtual machine indicating the VM
                           should be taken offline.

            suspend(3)     The administrative state of the
                           virtual machine where its memory and cpu execution 
                           state has been saved to persistent store and will be
                           restored at next power on(1).

            pause(4)       The administrative state indicating
                           the virtual machine is resident in memory
                           but is no longer scheduled to execute by the
                           hypervisor."

    SYNTAX       INTEGER {
                    on(1),
                    off(2),
                    suspend(3)
                    pause(4)
                 }

Cheers,
Mike MacFaden

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 7 Mar 2013 09:28:42 +0100

>                            but is no longer scheduled to execute by the

OK. If we add an administrative suspend state, we likely also need a
corresponding operational state, no?

/js

---

From: Michael MacFaden <[email-masked]>
Date: Thu, 7 Mar 2013 10:09:15 -0800 (PST)

> corresponding operational state, no?

Agreed. A VM would transition to paused(5) state imo.

VirtualMachineOperState ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "The operational state of a virtual machine:

            unknown(1)     The state is unknown, e.g., because the
                           implementation failed to obtain the state
                           from the hypervisor.

            other(2)       The state has been obtained but it is
                           not a known state.

            running(3)     The virtual machine is currently running.

            blocked(4)     The virtual machine is currently blocked.

            paused(5)      The virtual machine is currently paused.

            migrating(6)   The virtual machine is currently
                           migrating.

            shutdown(7)    The virtual machine is currently in the
                           process of shutting down.

            shutoff(8)     The virtual machine is down.

            crashed(9)     The virtual machine has crashed."

Now if admin state is set to suspend, then the resting state of the VM 
I believe should be shutoff(7) if operation was successful otherwise
the VM transitions to one of running, blocked, crashed, other, unknown. 

Given suspend operations can take a long time some implementations 
may report the transition to shutdown(7) before shutoff(7) while other
implementations will not. 
Existing fielded IF-MIB implementations exhibit this behavior as well. 
While IF-MIB module provides a rich set of states, many implementations
only use a subset.

Will send out more text to make explicit what we the designers 
intend was for state transitions.

Mike MacFaden

---

From: "Black, David" <[email-masked]>
Date: Sun, 10 Mar 2013 14:37:38 -0400

Would an "initializing" state for a VM that exists in the hypervisor but is not
completely set up (e.g., cannot be started, yet) be useful?  This may be somewhat
like "blocked", but it's a specific case that may be worth distinguishing because
the available information about the VM may be incomplete.

Thanks,
--David

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> Michael MacFaden
> Sent: Thursday, March 07, 2013 1:09 PM
> To: Juergen Schoenwaelder
> Cc: opsawg
> Subject: Re: [OPSAWG] VMM-MIB joint proposal: Item 3 - VM-MIB paused !=
> suspended
> 
> _______________________________________________
> OPSAWG mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/opsawg