[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] How to use monitor socket in python to connect VM?
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] How to use monitor socket in python to connect VM? |
Date: |
Mon, 4 Sep 2017 11:16:24 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
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 :|