summary refs log tree commit diff stats
path: root/qerror.c
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2011-07-19 15:41:55 -0500
committerLuiz Capitulino <lcapitulino@gmail.com>2011-07-21 16:48:15 -0300
commite3d4d25206a13ca48936e4357a53591997ce6d57 (patch)
tree1239b54af27fe1171fec77bc9c3ecc10436a0f4f /qerror.c
parent48ff7a625b3611d075d8798585df86455bb2d1fd (diff)
downloadfocaccia-qemu-e3d4d25206a13ca48936e4357a53591997ce6d57.tar.gz
focaccia-qemu-e3d4d25206a13ca48936e4357a53591997ce6d57.zip
guest agent: add guest agent RPCs/commands
This adds the initial set of QMP/QAPI commands provided by the guest
agent:

guest-sync
guest-ping
guest-info
guest-shutdown
guest-file-open
guest-file-read
guest-file-write
guest-file-seek
guest-file-flush
guest-file-close
guest-fsfreeze-freeze
guest-fsfreeze-thaw
guest-fsfreeze-status

The input/output specification for these commands are documented in the
schema.

Example usage:

  host:
    qemu -device virtio-serial \
         -chardev socket,path=/tmp/vs0.sock,server,nowait,id=qga0 \
         -device virtserialport,chardev=qga0,name=org.qemu.quest_agent.0
         ...

    echo "{'execute':'guest-info'}" | socat stdio unix-connect:/tmp/qga0.sock

  guest:
    qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 \
            -p /var/run/qemu-guest-agent.pid -d

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
Diffstat (limited to 'qerror.c')
-rw-r--r--qerror.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/qerror.c b/qerror.c
index c92adfcb13..229d0d63e3 100644
--- a/qerror.c
+++ b/qerror.c
@@ -218,6 +218,14 @@ static const QErrorStringTable qerror_table[] = {
         .error_fmt = QERR_VNC_SERVER_FAILED,
         .desc      = "Could not start VNC server on %(target)",
     },
+    {
+        .error_fmt = QERR_QGA_LOGGING_FAILED,
+        .desc      = "Guest agent failed to log non-optional log statement",
+    },
+    {
+        .error_fmt = QERR_QGA_COMMAND_FAILED,
+        .desc      = "Guest agent command failed, error was '%(message)'",
+    },
     {}
 };