summaryrefslogtreecommitdiffstats
path: root/docs/interop/qemu-ga.rst
blob: 3063357bb5d6441c3b270c0bd4293e3c7272e642 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
QEMU Guest Agent
================

Synopsis
--------

**qemu-ga** [*OPTIONS*]

Description
-----------

The QEMU Guest Agent is a daemon intended to be run within virtual
machines. It allows the hypervisor host to perform various operations
in the guest, such as:

- get information from the guest
- set the guest's system time
- read/write a file
- sync and freeze the filesystems
- suspend the guest
- reconfigure guest local processors
- set user's password
- ...

qemu-ga will read a system configuration file on startup (located at
|CONFDIR|\ ``/qemu-ga.conf`` by default), then parse remaining
configuration options on the command line. For the same key, the last
option wins, but the lists accumulate (see below for configuration
file format).

Options
-------

.. program:: qemu-ga

.. option:: -m, --method=METHOD

  Transport method: one of ``unix-listen``, ``virtio-serial``, or
  ``isa-serial``, or ``vsock-listen`` (``virtio-serial`` is the default).

.. option:: -p, --path=PATH

  Device/socket path (the default for virtio-serial is
  ``/dev/virtio-ports/org.qemu.guest_agent.0``,
  the default for isa-serial is ``/dev/ttyS0``). Socket addresses for
  vsock-listen are written as ``<cid>:<port>``.

.. option:: -l, --logfile=PATH

  Set log file path (default is stderr).

.. option:: -f, --pidfile=PATH

  Specify pid file (default is ``/var/run/qemu-ga.pid``).

.. option:: -F, --fsfreeze-hook=PATH

  Enable fsfreeze hook. Accepts an optional argument that specifies
  script to run on freeze/thaw. Script will be called with
  'freeze'/'thaw' arguments accordingly (default is
  |CONFDIR|\ ``/fsfreeze-hook``). If using -F with an argument, do
  not follow -F with a space (for example:
  ``-F/var/run/fsfreezehook.sh``).

.. option:: -t, --statedir=PATH

  Specify the directory to store state information (absolute paths only,
  default is ``/var/run``).

.. option:: -v, --verbose

  Log extra debugging information.

.. option:: -V, --version

  Print version information and exit.

.. option:: -d, --daemon

  Daemonize after startup (detach from terminal).

.. option:: -b, --blacklist=LIST

  Comma-separated list of RPCs to disable (no spaces, ``?`` to list
  available RPCs).

.. option:: -D, --dump-conf

  Dump the configuration in a format compatible with ``qemu-ga.conf``
  and exit.

.. option:: -h, --help

  Display this help and exit.

Files
-----


The syntax of the ``qemu-ga.conf`` configuration file follows the
Desktop Entry Specification, here is a quick summary: it consists of
groups of key-value pairs, interspersed with comments.

::

    # qemu-ga configuration sample
    [general]
    daemonize = 0
    pidfile = /var/run/qemu-ga.pid
    verbose = 0
    method = virtio-serial
    path = /dev/virtio-ports/org.qemu.guest_agent.0
    statedir = /var/run

The list of keys follows the command line options:

=============  ===========
Key             Key type
=============  ===========
daemon         boolean
method         string
path           string
logfile        string
pidfile        string
fsfreeze-hook  string
statedir       string
verbose        boolean
blacklist      string list
=============  ===========

See also
--------

:manpage:`qemu(1)`