From 8515ae4817f6aad7ffbe68d078884c1689bf3e1e Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 22 Aug 2018 17:07:21 +0100 Subject: [PATCH] qmp: Remind users that you must first call ExecuteQMPCapabilities() Before calling any other command it is necessary to call ExecuteQMPCapabilities() otherwise QEMU will not process the subsequent QMP commands. Signed-off-by: Rob Bradford --- qemu/qmp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu/qmp.go b/qemu/qmp.go index 264601d7cb..c78d1ae6a0 100644 --- a/qemu/qmp.go +++ b/qemu/qmp.go @@ -561,6 +561,10 @@ func (q *QMP) executeCommand(ctx context.Context, name string, args map[string]i // block until they have received a success or failure message from QMP, // i.e., {"return": {}} or {"error":{}}, and in some cases certain events // are received. +// +// QEMU currently requires that the "qmp_capabilties" command is sent before any +// other command. Therefore you must call qmp.ExecuteQMPCapabilities() before +// you execute any other command. func QMPStart(ctx context.Context, socket string, cfg QMPConfig, disconnectedCh chan struct{}) (*QMP, *QMPVersion, error) { if cfg.Logger == nil { cfg.Logger = qmpNullLogger{}