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 312e3b166cSDaniel P. BerrangéIf an allowed RPCs list is defined in the configuration, then all 322e3b166cSDaniel P. BerrangéRPCs will be blocked by default, except for the allowed list. 332e3b166cSDaniel P. Berrangé 342e3b166cSDaniel P. BerrangéIf a blocked RPCs list is defined in the configuration, then all 352e3b166cSDaniel P. BerrangéRPCs will be allowed by default, except for the blocked list. 362e3b166cSDaniel P. Berrangé 372e3b166cSDaniel P. BerrangéIf both allowed and blocked RPCs lists are defined in the configuration, 382e3b166cSDaniel P. Berrangéthen all RPCs will be blocked by default, then the allowed list will 392e3b166cSDaniel P. Berrangébe applied, followed by the blocked list. 402e3b166cSDaniel P. Berrangé 412e3b166cSDaniel P. BerrangéWhile filesystems are frozen, all except for a designated safe set 422e3b166cSDaniel P. Berrangéof RPCs will blocked, regardless of what the general configuration 432e3b166cSDaniel P. Berrangédeclares. 442e3b166cSDaniel P. Berrangé 4527a296fcSPeter MaydellOptions 4627a296fcSPeter Maydell------- 4727a296fcSPeter Maydell 4827a296fcSPeter Maydell.. program:: qemu-ga 4927a296fcSPeter Maydell 50f8bf2347SDaniel P. Berrangé.. option:: -c, --config=PATH 51f8bf2347SDaniel P. Berrangé 52f8bf2347SDaniel P. Berrangé Configuration file path (the default is |CONFDIR|\ ``/qemu-ga.conf``, 53*24c32ed3SStefan Weil unless overridden by the QGA_CONF environment variable) 54f8bf2347SDaniel P. Berrangé 5527a296fcSPeter Maydell.. option:: -m, --method=METHOD 5627a296fcSPeter Maydell 5727a296fcSPeter Maydell Transport method: one of ``unix-listen``, ``virtio-serial``, or 587b46aadbSStefan Hajnoczi ``isa-serial``, or ``vsock-listen`` (``virtio-serial`` is the default). 5927a296fcSPeter Maydell 6027a296fcSPeter Maydell.. option:: -p, --path=PATH 6127a296fcSPeter Maydell 6227a296fcSPeter Maydell Device/socket path (the default for virtio-serial is 6327a296fcSPeter Maydell ``/dev/virtio-ports/org.qemu.guest_agent.0``, 647b46aadbSStefan Hajnoczi the default for isa-serial is ``/dev/ttyS0``). Socket addresses for 657b46aadbSStefan Hajnoczi vsock-listen are written as ``<cid>:<port>``. 6627a296fcSPeter Maydell 6727a296fcSPeter Maydell.. option:: -l, --logfile=PATH 6827a296fcSPeter Maydell 6927a296fcSPeter Maydell Set log file path (default is stderr). 7027a296fcSPeter Maydell 7127a296fcSPeter Maydell.. option:: -f, --pidfile=PATH 7227a296fcSPeter Maydell 7327a296fcSPeter Maydell Specify pid file (default is ``/var/run/qemu-ga.pid``). 7427a296fcSPeter Maydell 7527a296fcSPeter Maydell.. option:: -F, --fsfreeze-hook=PATH 7627a296fcSPeter Maydell 7727a296fcSPeter Maydell Enable fsfreeze hook. Accepts an optional argument that specifies 7827a296fcSPeter Maydell script to run on freeze/thaw. Script will be called with 7927a296fcSPeter Maydell 'freeze'/'thaw' arguments accordingly (default is 8027a296fcSPeter Maydell |CONFDIR|\ ``/fsfreeze-hook``). If using -F with an argument, do 8127a296fcSPeter Maydell not follow -F with a space (for example: 8227a296fcSPeter Maydell ``-F/var/run/fsfreezehook.sh``). 8327a296fcSPeter Maydell 8427a296fcSPeter Maydell.. option:: -t, --statedir=PATH 8527a296fcSPeter Maydell 8627a296fcSPeter Maydell Specify the directory to store state information (absolute paths only, 8727a296fcSPeter Maydell default is ``/var/run``). 8827a296fcSPeter Maydell 8927a296fcSPeter Maydell.. option:: -v, --verbose 9027a296fcSPeter Maydell 9127a296fcSPeter Maydell Log extra debugging information. 9227a296fcSPeter Maydell 9327a296fcSPeter Maydell.. option:: -V, --version 9427a296fcSPeter Maydell 9527a296fcSPeter Maydell Print version information and exit. 9627a296fcSPeter Maydell 9727a296fcSPeter Maydell.. option:: -d, --daemon 9827a296fcSPeter Maydell 9927a296fcSPeter Maydell Daemonize after startup (detach from terminal). 10027a296fcSPeter Maydell 101582a098eSThomas Huth.. option:: -b, --block-rpcs=LIST 10227a296fcSPeter Maydell 103b68d8b67SAngel M. Villegas Comma-separated list of RPCs to disable (no spaces, use ``--block-rpcs=help`` 104b68d8b67SAngel M. Villegas to list available RPCs). 10527a296fcSPeter Maydell 106133789e1SKonstantin Kostiuk.. option:: -a, --allow-rpcs=LIST 107133789e1SKonstantin Kostiuk 108b68d8b67SAngel M. Villegas Comma-separated list of RPCs to enable (no spaces, use ``--allow-rpcs=help`` 109b68d8b67SAngel M. Villegas to list available RPCs). 110133789e1SKonstantin Kostiuk 11127a296fcSPeter Maydell.. option:: -D, --dump-conf 11227a296fcSPeter Maydell 11327a296fcSPeter Maydell Dump the configuration in a format compatible with ``qemu-ga.conf`` 11427a296fcSPeter Maydell and exit. 11527a296fcSPeter Maydell 11627a296fcSPeter Maydell.. option:: -h, --help 11727a296fcSPeter Maydell 11827a296fcSPeter Maydell Display this help and exit. 11927a296fcSPeter Maydell 12027a296fcSPeter MaydellFiles 12127a296fcSPeter Maydell----- 12227a296fcSPeter Maydell 12327a296fcSPeter Maydell 12427a296fcSPeter MaydellThe syntax of the ``qemu-ga.conf`` configuration file follows the 12527a296fcSPeter MaydellDesktop Entry Specification, here is a quick summary: it consists of 12627a296fcSPeter Maydellgroups of key-value pairs, interspersed with comments. 12727a296fcSPeter Maydell 12827a296fcSPeter Maydell:: 12927a296fcSPeter Maydell 13027a296fcSPeter Maydell # qemu-ga configuration sample 13127a296fcSPeter Maydell [general] 13227a296fcSPeter Maydell daemonize = 0 13327a296fcSPeter Maydell pidfile = /var/run/qemu-ga.pid 13427a296fcSPeter Maydell verbose = 0 13527a296fcSPeter Maydell method = virtio-serial 13627a296fcSPeter Maydell path = /dev/virtio-ports/org.qemu.guest_agent.0 13727a296fcSPeter Maydell statedir = /var/run 13827a296fcSPeter Maydell 13927a296fcSPeter MaydellThe list of keys follows the command line options: 14027a296fcSPeter Maydell 14127a296fcSPeter Maydell============= =========== 14227a296fcSPeter MaydellKey Key type 14327a296fcSPeter Maydell============= =========== 14427a296fcSPeter Maydelldaemon boolean 14527a296fcSPeter Maydellmethod string 14627a296fcSPeter Maydellpath string 14727a296fcSPeter Maydelllogfile string 14827a296fcSPeter Maydellpidfile string 14927a296fcSPeter Maydellfsfreeze-hook string 15027a296fcSPeter Maydellstatedir string 15127a296fcSPeter Maydellverbose boolean 152582a098eSThomas Huthblock-rpcs string list 153ce226161SThomas Lamprechtallow-rpcs string list 15427a296fcSPeter Maydell============= =========== 15527a296fcSPeter Maydell 15627a296fcSPeter MaydellSee also 15727a296fcSPeter Maydell-------- 15827a296fcSPeter Maydell 15927a296fcSPeter Maydell:manpage:`qemu(1)` 160