From: "Daniel P. Berrange" <berrange@redhat.com>
To: Sam <batmanustc@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] How to use monitor socket in python to connect VM?
Date: Mon, 4 Sep 2017 11:16:24 +0100 [thread overview]
Message-ID: <20170904101624.GE7186@redhat.com> (raw)
In-Reply-To: <CAOE=1Z2HFVhD8b1TXaQFd8sGvqoddOeJoSds1ZxwzKSw8im7ng@mail.gmail.com>
On Mon, Sep 04, 2017 at 06:11:44PM +0800, Sam wrote:
> Actually I use qga socket first(send json format command like {'execute':
> 'chardev-add', 'arguments': {'id': id, 'type': type}, 'params': params} by
> qga socket, which is
> /opt/cloud/workspace/servers/1925a92d-f003-4d77-871c-bce8f85229aa/qga.sock,
> using the same script as first mail), but it response me "netdev_add is not
> valid command"(it's reasonable, as guest OS could not operate 'netdev_add'
> command), so I thought qga could not do this work, then I change to monitor.
You're mixing up two different things. 'QGA' is the QEMU guest agent
which is a service than runs in the guest OS. 'QMP' is the QEMU monitor
socket which runs in the host OS. Both of these use the same JSON based
protocol, but take completely different commands.
You need to use 'QMP' for 'netdev_add', not 'QGA'.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2017-09-04 10:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 6:17 [Qemu-devel] How to use monitor socket in python to connect VM? Sam
2017-09-04 9:36 ` Daniel P. Berrange
2017-09-04 10:11 ` Sam
2017-09-04 10:16 ` Daniel P. Berrange [this message]
2017-09-04 12:31 ` Sam
2017-09-04 12:32 ` Sam
2017-09-04 13:00 ` Daniel P. Berrange
2017-09-04 12:59 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170904101624.GE7186@redhat.com \
--to=berrange@redhat.com \
--cc=batmanustc@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).