Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/stratosphere-ve/ozone/llms.txt

Use this file to discover all available pages before exploring further.

qemu.Stop() provides a shutdown path for a running QEMU virtual machine. When called, it prints a status message to stdout and then runs system_powerdown as a local executable using exec.Command. Any output or error returned by the process is printed to stdout.

Usage

import "github.com/stratosphere-ve/ozone/qemu"

func main() {
    qemu.Stop()
}

How It Works

Stop() calls exec.Command("system_powerdown") and executes it via cmd.Output(). This invokes system_powerdown as a local process on the host — it does not send a QMP command over the TCP socket that qemu.Start() opens on 127.0.0.1:4444. The two functions operate independently.
Because Stop() runs system_powerdown as a standalone local executable, the binary must exist and be available on the system PATH. This is not a QMP protocol message. If system_powerdown is not installed or not found, exec.Command will return an error which is printed to stdout, and no shutdown will occur.
To understand the full VM lifecycle — from configuration loading through launch — see the Start VM page.

Build docs developers (and LLMs) love