7.8 What are VM States?

Oracle VM Manager tracks the different running states for each virtual machine at regular intervals. At any point, it is possible to check the running state for any virtual machine within the Oracle VM Manager Web Interface or the Oracle VM Manager Command Line Interface. There are six different running states that apply to virtual machines within Oracle VM Manager. The following list describes each running state and the scenarios that apply to each of these:

Virtual Machine States

  • STARTING:

    • A virtual machine is set to the STARTING state after either a vmStart operation or a vmRestart operation (when the restart action is set to restart).

  • RUNNING:

    • A virtual machine is set to the RUNNING state when the Oracle VM Agent on the Oracle VM Server, where the virtual machine is hosted, sends Oracle VM Manager a notification that the virtual machine has started. The Oracle VM Agent only detects whether the domain itself is running, but does not report on whether the guest operating system is running or not.

    • If a virtual machine is found to be running on an Oracle VM Server during the discovery process, its state is set to RUNNING.

  • STOPPING:

    • When an attempt is made to stop, restart or suspend a virtual machine, its state is immediately set to STOPPING.

  • STOPPED:

    • A virtual machine's state is set to STOPPED when Oracle VM Manager is notified by an Oracle VM Server that the virtual machine was shutdown. This can be due to a stop or kill action initiated via Oracle VM Manager or by a shutdown initiated on the virtual machine itself.

    • This state can also occur if, during discovery, a virtual machine that was previously in some other state, is detected as not running.

    • If the start operation for a virtual machine fails, the state of the virtual machine is changed from STARTING to STOPPED.

    • If the Oracle VM Server, where a virtual machine is running, cannot be reached and is transitioned to a STOPPED state, all virtual machines active on the same Oracle VM Server are also set to STOPPED and marked with OFFLINE events. It may take up to one minute for these virtual machines to transition to this state in the case that an Oracle VM Server becomes unavailable. Any attempt to perform an operation on a virtual machine during this transitional period is likely to fail as Oracle VM Manager is unable to communicate with the Oracle VM Server hosting the virtual machine to perform the operation.

  • SUSPENDED:

    • A virtual machine's state is set to SUSPENDED if a suspend operation completes successfully.

    • This state can also occur if, during discovery, a virtual machine is detected to be suspended. This is considered to be the case if the virtual machine is stopped and contains a suspend file.

  • TEMPLATE:

    • This state represents a type of virtual machine that can never be started. A virtual machine in this state is unable to transition to any other run state.

Actions that can be performed on virtual machines depend on these states. Therefore the following rules apply with regard to the relationship between virtual machine states and the actions that can be performed on a virtual machine:

Relationship between Virtual Machine States and Actions

  • START: Can only be performed when the virtual machine is in the STOPPED state.

  • RESTART: Can only be performed when the virtual machine is in the RUNNING state.

  • STOP: Can only be performed when the virtual machine is in the RUNNING state.

  • KILL: Runs regardless of the current state of the virtual machine and forces it into a STOPPED state. This action does its best to destroy the domain on the hosting Oracle VM Server. If HA is enabled it also clears the HA flag so that the virtual machine does not restart.

  • SUSPEND: Can only be performed when the virtual machine is in the RUNNING state.

  • RESUME: Can only be performed when the virtual machine is in the SUSPENDED state.

  • MIGRATE: Can only be performed when the virtual machine is in the RUNNING state.