|
From: | Mike Harris |
Subject: | Re: [Qemu-discuss] QEMU guest agent behavior with 'guest-sync-delimited' |
Date: | Thu, 15 May 2014 12:49:57 -0700 |
This error seems non-deterministic. Example code:sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)sock.connect(('127.0.0.1', 5501))sock.send('\xff{"execute": "guest-sync-delimited", "arguments": {"id": 1}}')result = sock.recv(1024)result = result.rpartition('\xff')[2]print result.splitlines()[-1]this results in either:{"return": 1}
or{"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}}Any ideas?On Thu, May 15, 2014 at 11:39 AM, Mike Harris <address@hidden> wrote:Hi,I'm trying to use the qemu guest agent, and I'm not sure if I'm doing sync rightI'm sending the 0xff char, then the guest-sync-delimited command. I get back a json syntax error, then the 0xff byte.Is the syntax error expected? Should i just ignore it until I see 0xff?Example (the guest agent serial device is running on tcp:5501 on the host.address@hidden:~$ echo -e \\xff'{"execute": "guest-sync-delimited", "arguments": {"id": 1}}' | nc -q5 localhost 5501
{"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}}�{"return": 1}
[Prev in Thread] | Current Thread | [Next in Thread] |