xref: /openbmc/qemu/docs/interop/qemu-ga.rst (revision f8bf2347)
127a296fcSPeter MaydellQEMU Guest Agent
227a296fcSPeter Maydell================
327a296fcSPeter Maydell
427a296fcSPeter MaydellSynopsis
527a296fcSPeter Maydell--------
627a296fcSPeter Maydell
727a296fcSPeter Maydell**qemu-ga** [*OPTIONS*]
827a296fcSPeter Maydell
927a296fcSPeter MaydellDescription
1027a296fcSPeter Maydell-----------
1127a296fcSPeter Maydell
1227a296fcSPeter MaydellThe QEMU Guest Agent is a daemon intended to be run within virtual
1327a296fcSPeter Maydellmachines. It allows the hypervisor host to perform various operations
1427a296fcSPeter Maydellin the guest, such as:
1527a296fcSPeter Maydell
1627a296fcSPeter Maydell- get information from the guest
1727a296fcSPeter Maydell- set the guest's system time
1827a296fcSPeter Maydell- read/write a file
1927a296fcSPeter Maydell- sync and freeze the filesystems
2027a296fcSPeter Maydell- suspend the guest
2127a296fcSPeter Maydell- reconfigure guest local processors
2227a296fcSPeter Maydell- set user's password
2327a296fcSPeter Maydell- ...
2427a296fcSPeter Maydell
2527a296fcSPeter Maydellqemu-ga will read a system configuration file on startup (located at
2627a296fcSPeter Maydell|CONFDIR|\ ``/qemu-ga.conf`` by default), then parse remaining
2727a296fcSPeter Maydellconfiguration options on the command line. For the same key, the last
2827a296fcSPeter Maydelloption wins, but the lists accumulate (see below for configuration
2927a296fcSPeter Maydellfile format).
3027a296fcSPeter Maydell
3127a296fcSPeter MaydellOptions
3227a296fcSPeter Maydell-------
3327a296fcSPeter Maydell
3427a296fcSPeter Maydell.. program:: qemu-ga
3527a296fcSPeter Maydell
36*f8bf2347SDaniel P. Berrangé.. option:: -c, --config=PATH
37*f8bf2347SDaniel P. Berrangé
38*f8bf2347SDaniel P. Berrangé  Configuration file path (the default is |CONFDIR|\ ``/qemu-ga.conf``,
39*f8bf2347SDaniel P. Berrangé  unless overriden by the QGA_CONF environment variable)
40*f8bf2347SDaniel P. Berrangé
4127a296fcSPeter Maydell.. option:: -m, --method=METHOD
4227a296fcSPeter Maydell
4327a296fcSPeter Maydell  Transport method: one of ``unix-listen``, ``virtio-serial``, or
447b46aadbSStefan Hajnoczi  ``isa-serial``, or ``vsock-listen`` (``virtio-serial`` is the default).
4527a296fcSPeter Maydell
4627a296fcSPeter Maydell.. option:: -p, --path=PATH
4727a296fcSPeter Maydell
4827a296fcSPeter Maydell  Device/socket path (the default for virtio-serial is
4927a296fcSPeter Maydell  ``/dev/virtio-ports/org.qemu.guest_agent.0``,
507b46aadbSStefan Hajnoczi  the default for isa-serial is ``/dev/ttyS0``). Socket addresses for
517b46aadbSStefan Hajnoczi  vsock-listen are written as ``<cid>:<port>``.
5227a296fcSPeter Maydell
5327a296fcSPeter Maydell.. option:: -l, --logfile=PATH
5427a296fcSPeter Maydell
5527a296fcSPeter Maydell  Set log file path (default is stderr).
5627a296fcSPeter Maydell
5727a296fcSPeter Maydell.. option:: -f, --pidfile=PATH
5827a296fcSPeter Maydell
5927a296fcSPeter Maydell  Specify pid file (default is ``/var/run/qemu-ga.pid``).
6027a296fcSPeter Maydell
6127a296fcSPeter Maydell.. option:: -F, --fsfreeze-hook=PATH
6227a296fcSPeter Maydell
6327a296fcSPeter Maydell  Enable fsfreeze hook. Accepts an optional argument that specifies
6427a296fcSPeter Maydell  script to run on freeze/thaw. Script will be called with
6527a296fcSPeter Maydell  'freeze'/'thaw' arguments accordingly (default is
6627a296fcSPeter Maydell  |CONFDIR|\ ``/fsfreeze-hook``). If using -F with an argument, do
6727a296fcSPeter Maydell  not follow -F with a space (for example:
6827a296fcSPeter Maydell  ``-F/var/run/fsfreezehook.sh``).
6927a296fcSPeter Maydell
7027a296fcSPeter Maydell.. option:: -t, --statedir=PATH
7127a296fcSPeter Maydell
7227a296fcSPeter Maydell  Specify the directory to store state information (absolute paths only,
7327a296fcSPeter Maydell  default is ``/var/run``).
7427a296fcSPeter Maydell
7527a296fcSPeter Maydell.. option:: -v, --verbose
7627a296fcSPeter Maydell
7727a296fcSPeter Maydell  Log extra debugging information.
7827a296fcSPeter Maydell
7927a296fcSPeter Maydell.. option:: -V, --version
8027a296fcSPeter Maydell
8127a296fcSPeter Maydell  Print version information and exit.
8227a296fcSPeter Maydell
8327a296fcSPeter Maydell.. option:: -d, --daemon
8427a296fcSPeter Maydell
8527a296fcSPeter Maydell  Daemonize after startup (detach from terminal).
8627a296fcSPeter Maydell
87582a098eSThomas Huth.. option:: -b, --block-rpcs=LIST
8827a296fcSPeter Maydell
89b68d8b67SAngel M. Villegas  Comma-separated list of RPCs to disable (no spaces, use ``--block-rpcs=help``
90b68d8b67SAngel M. Villegas  to list available RPCs).
9127a296fcSPeter Maydell
92133789e1SKonstantin Kostiuk.. option:: -a, --allow-rpcs=LIST
93133789e1SKonstantin Kostiuk
94b68d8b67SAngel M. Villegas  Comma-separated list of RPCs to enable (no spaces, use ``--allow-rpcs=help``
95b68d8b67SAngel M. Villegas  to list available RPCs).
96133789e1SKonstantin Kostiuk
9727a296fcSPeter Maydell.. option:: -D, --dump-conf
9827a296fcSPeter Maydell
9927a296fcSPeter Maydell  Dump the configuration in a format compatible with ``qemu-ga.conf``
10027a296fcSPeter Maydell  and exit.
10127a296fcSPeter Maydell
10227a296fcSPeter Maydell.. option:: -h, --help
10327a296fcSPeter Maydell
10427a296fcSPeter Maydell  Display this help and exit.
10527a296fcSPeter Maydell
10627a296fcSPeter MaydellFiles
10727a296fcSPeter Maydell-----
10827a296fcSPeter Maydell
10927a296fcSPeter Maydell
11027a296fcSPeter MaydellThe syntax of the ``qemu-ga.conf`` configuration file follows the
11127a296fcSPeter MaydellDesktop Entry Specification, here is a quick summary: it consists of
11227a296fcSPeter Maydellgroups of key-value pairs, interspersed with comments.
11327a296fcSPeter Maydell
11427a296fcSPeter Maydell::
11527a296fcSPeter Maydell
11627a296fcSPeter Maydell    # qemu-ga configuration sample
11727a296fcSPeter Maydell    [general]
11827a296fcSPeter Maydell    daemonize = 0
11927a296fcSPeter Maydell    pidfile = /var/run/qemu-ga.pid
12027a296fcSPeter Maydell    verbose = 0
12127a296fcSPeter Maydell    method = virtio-serial
12227a296fcSPeter Maydell    path = /dev/virtio-ports/org.qemu.guest_agent.0
12327a296fcSPeter Maydell    statedir = /var/run
12427a296fcSPeter Maydell
12527a296fcSPeter MaydellThe list of keys follows the command line options:
12627a296fcSPeter Maydell
12727a296fcSPeter Maydell=============  ===========
12827a296fcSPeter MaydellKey             Key type
12927a296fcSPeter Maydell=============  ===========
13027a296fcSPeter Maydelldaemon         boolean
13127a296fcSPeter Maydellmethod         string
13227a296fcSPeter Maydellpath           string
13327a296fcSPeter Maydelllogfile        string
13427a296fcSPeter Maydellpidfile        string
13527a296fcSPeter Maydellfsfreeze-hook  string
13627a296fcSPeter Maydellstatedir       string
13727a296fcSPeter Maydellverbose        boolean
138582a098eSThomas Huthblock-rpcs     string list
13927a296fcSPeter Maydell=============  ===========
14027a296fcSPeter Maydell
14127a296fcSPeter MaydellSee also
14227a296fcSPeter Maydell--------
14327a296fcSPeter Maydell
14427a296fcSPeter Maydell:manpage:`qemu(1)`
145