Qemu

Manage QEMU virtual machines.

AttributeTypeRequiredDefaultDescription
cmdconstYesqemuCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
optionsOptionsObjectNoAdditional command options
parametersQemuOptionsYesOptions passed into the qemu cmd

Qemu Options

AttributeTypeRequiredDefaultDescription
modestringYesSupported modes are start, run and stop.
executablestringConditional (see below)The executable that should be executed.
firmwarestringConditional (see below)The firmware that should be used.
imagestringNoThe image that should be booted.
nprocintegerNoThe number of processors that should be used.
memintegerNoThe amount of memory that should be used.
variablestringConditional (see below)Name a variable to store the qemu PID for later session return.
serialQemuStepsOptionsYesSteps to interact with during test execution.

Behavior and semantics

  • The run mode can be used to attach to an already running QEMU instance. In this case, variable must be set to the PID of the QEMU process.
  • If variable is not set, the run mode will behave like the start mode, launching a new QEMU instance.
  • The stop mode will send a termination signal to the QEMU process identified by variable.

Conditional rules:

  • start: requires executable, firmware, and variable. The step launches QEMU and stores its PID in variable. If QEMU prints a PTY path it is stored in <variable>_pty.
  • run: if variable is provided the step attaches to the recorded PID/PTY and runs serial steps; if variable is empty, run requires both executable and firmware and will launch QEMU and run serial steps.
  • stop: requires variable and must not include executable, args, firmware or serial.

Qemu Serial Options

AttributeTypeRequiredDefaultDescription
sendstringNoA string that should be sent as input.
timeoutstringNoTimeout for the interaction. Format: h for hours, m for minutes, s for seconds (e.g., 1h30m20s).
expectQemuExpectOptionsNoExpectation for the interaction output.

Qemu Expect Options

AttributeTypeRequiredDefaultDescription
regexstringYesexpectRegular expression that should be matched against the output of the interaction.