Start, stop, and restart a VM application

You can control the power state of a VM application from the Red Hat Edge Manager web console or CLI. These lifecycle operations drive the read-only desiredState and restartGeneration fields on the rendered application specification, which the agent reconciles on the device.

Before you begin

  • A VM application is deployed on the device.
  • You have the Admin or Operator role in Red Hat Edge Manager. Viewer-role users can view application status but cannot perform lifecycle operations.
Tip

The Red Hat Edge Manager web console displays a warning while the application’s desired state does not match its current state, indicating that a transition is in progress.

Procedure

  1. To stop a running VM application by using the web console, click Stop on the VM application in the device details page.

    The agent sends an ACPI shutdown signal to the VM guest, giving it up to 45 seconds to shut down gracefully. The application status transitions from Running to Stopping to Stopped.

    To stop a VM by using the CLI, run the following command:

    $ flightctl app stop device/<device_name> --name <vm_name>
  2. To start a stopped VM application by using the web console, click Start on the VM application.

    The application status transitions from Stopped to Starting to Running.

    To start a VM by using the CLI, run the following command:

    $ flightctl app start device/<device_name> --name <vm_name>
  3. To restart a running VM application by using the web console, click Restart on the VM application.

    The application status transitions from Running to Stopping to Starting to Running.

    To restart a VM by using the CLI, run the following command:

    $ flightctl app restart device/<device_name> --name <vm_name>
    Note

    These lifecycle operations are available for all application types, not only VM applications. The restart operation is available for individual devices only, not for fleets. Fleet-level start and stop operations set a fleet-wide default that device-level actions can override. For more details, see Declarative application lifecycle management.