xref: /openbmc/qemu/docs/interop/qemu-ga.rst (revision 7b46aadb)
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
3627a296fcSPeter Maydell.. option:: -m, --method=METHOD
3727a296fcSPeter Maydell
3827a296fcSPeter Maydell  Transport method: one of ``unix-listen``, ``virtio-serial``, or
39*7b46aadbSStefan Hajnoczi  ``isa-serial``, or ``vsock-listen`` (``virtio-serial`` is the default).
4027a296fcSPeter Maydell
4127a296fcSPeter Maydell.. option:: -p, --path=PATH
4227a296fcSPeter Maydell
4327a296fcSPeter Maydell  Device/socket path (the default for virtio-serial is
4427a296fcSPeter Maydell  ``/dev/virtio-ports/org.qemu.guest_agent.0``,
45*7b46aadbSStefan Hajnoczi  the default for isa-serial is ``/dev/ttyS0``). Socket addresses for
46*7b46aadbSStefan Hajnoczi  vsock-listen are written as ``<cid>:<port>``.
4727a296fcSPeter Maydell
4827a296fcSPeter Maydell.. option:: -l, --logfile=PATH
4927a296fcSPeter Maydell
5027a296fcSPeter Maydell  Set log file path (default is stderr).
5127a296fcSPeter Maydell
5227a296fcSPeter Maydell.. option:: -f, --pidfile=PATH
5327a296fcSPeter Maydell
5427a296fcSPeter Maydell  Specify pid file (default is ``/var/run/qemu-ga.pid``).
5527a296fcSPeter Maydell
5627a296fcSPeter Maydell.. option:: -F, --fsfreeze-hook=PATH
5727a296fcSPeter Maydell
5827a296fcSPeter Maydell  Enable fsfreeze hook. Accepts an optional argument that specifies
5927a296fcSPeter Maydell  script to run on freeze/thaw. Script will be called with
6027a296fcSPeter Maydell  'freeze'/'thaw' arguments accordingly (default is
6127a296fcSPeter Maydell  |CONFDIR|\ ``/fsfreeze-hook``). If using -F with an argument, do
6227a296fcSPeter Maydell  not follow -F with a space (for example:
6327a296fcSPeter Maydell  ``-F/var/run/fsfreezehook.sh``).
6427a296fcSPeter Maydell
6527a296fcSPeter Maydell.. option:: -t, --statedir=PATH
6627a296fcSPeter Maydell
6727a296fcSPeter Maydell  Specify the directory to store state information (absolute paths only,
6827a296fcSPeter Maydell  default is ``/var/run``).
6927a296fcSPeter Maydell
7027a296fcSPeter Maydell.. option:: -v, --verbose
7127a296fcSPeter Maydell
7227a296fcSPeter Maydell  Log extra debugging information.
7327a296fcSPeter Maydell
7427a296fcSPeter Maydell.. option:: -V, --version
7527a296fcSPeter Maydell
7627a296fcSPeter Maydell  Print version information and exit.
7727a296fcSPeter Maydell
7827a296fcSPeter Maydell.. option:: -d, --daemon
7927a296fcSPeter Maydell
8027a296fcSPeter Maydell  Daemonize after startup (detach from terminal).
8127a296fcSPeter Maydell
8227a296fcSPeter Maydell.. option:: -b, --blacklist=LIST
8327a296fcSPeter Maydell
8427a296fcSPeter Maydell  Comma-separated list of RPCs to disable (no spaces, ``?`` to list
8527a296fcSPeter Maydell  available RPCs).
8627a296fcSPeter Maydell
8727a296fcSPeter Maydell.. option:: -D, --dump-conf
8827a296fcSPeter Maydell
8927a296fcSPeter Maydell  Dump the configuration in a format compatible with ``qemu-ga.conf``
9027a296fcSPeter Maydell  and exit.
9127a296fcSPeter Maydell
9227a296fcSPeter Maydell.. option:: -h, --help
9327a296fcSPeter Maydell
9427a296fcSPeter Maydell  Display this help and exit.
9527a296fcSPeter Maydell
9627a296fcSPeter MaydellFiles
9727a296fcSPeter Maydell-----
9827a296fcSPeter Maydell
9927a296fcSPeter Maydell
10027a296fcSPeter MaydellThe syntax of the ``qemu-ga.conf`` configuration file follows the
10127a296fcSPeter MaydellDesktop Entry Specification, here is a quick summary: it consists of
10227a296fcSPeter Maydellgroups of key-value pairs, interspersed with comments.
10327a296fcSPeter Maydell
10427a296fcSPeter Maydell::
10527a296fcSPeter Maydell
10627a296fcSPeter Maydell    # qemu-ga configuration sample
10727a296fcSPeter Maydell    [general]
10827a296fcSPeter Maydell    daemonize = 0
10927a296fcSPeter Maydell    pidfile = /var/run/qemu-ga.pid
11027a296fcSPeter Maydell    verbose = 0
11127a296fcSPeter Maydell    method = virtio-serial
11227a296fcSPeter Maydell    path = /dev/virtio-ports/org.qemu.guest_agent.0
11327a296fcSPeter Maydell    statedir = /var/run
11427a296fcSPeter Maydell
11527a296fcSPeter MaydellThe list of keys follows the command line options:
11627a296fcSPeter Maydell
11727a296fcSPeter Maydell=============  ===========
11827a296fcSPeter MaydellKey             Key type
11927a296fcSPeter Maydell=============  ===========
12027a296fcSPeter Maydelldaemon         boolean
12127a296fcSPeter Maydellmethod         string
12227a296fcSPeter Maydellpath           string
12327a296fcSPeter Maydelllogfile        string
12427a296fcSPeter Maydellpidfile        string
12527a296fcSPeter Maydellfsfreeze-hook  string
12627a296fcSPeter Maydellstatedir       string
12727a296fcSPeter Maydellverbose        boolean
12827a296fcSPeter Maydellblacklist      string list
12927a296fcSPeter Maydell=============  ===========
13027a296fcSPeter Maydell
13127a296fcSPeter MaydellSee also
13227a296fcSPeter Maydell--------
13327a296fcSPeter Maydell
13427a296fcSPeter Maydell:manpage:`qemu(1)`
135