On Thu, 22 Nov 2012 12:41:31 +0000 Dietmar Maurer <diet...@proxmox.com> wrote:
> I use the following qmp commands (file cmds.txt) for testing: > > --------- cmds.txt start-------- > {"execute":"qmp_capabilities", "arguments":{}} > {"execute":"migrate", "arguments":{ "uri":"exec:cat >/dev/null"}} > {"execute":"query-migrate", "arguments":{}} > --------- cmds.txt end-------- > > and the following command line to start qemu: > > # ./x86_64-softmmu/qemu-system-x86_64 -chardev > socket,id=qmp,path=/tmp/test.qmp,server,nowait -mon chardev=qmp,mode=control > --enable-kvm > > I then execute the qmp commands with: > > # cat cmds.txt | socat - /tmp/test.qmp > {"QMP": {"version": {"qemu": {"micro": 90, "minor": 2, "major": 1}, > "package": ""}, "capabilities": []}} > {"return": {}} > {"return": {}} > {"timestamp": {"seconds": 1353587785, "microseconds": 134907}, "event": > "STOP"} > {"return": {"status": "completed", "downtime": 8, "ram": {"total": 143065088, > "remaining": 0, "transferred": 772035, "duplicate": 34755, > "dirty-pages-rate": 0, "normal-bytes": 737280, "normal": 180}}} > > so far so good. > > But if I execute that again I get an error: > > # cat cmds.txt | socat - /tmp/test.qmp > {"error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities > has not been found"}} > {"return": {}} > {"return": {"expected-downtime": 0, "status": "active", "total-time": 33, > "ram": {"total": 143065088, "remaining": 8937472, "transferred": 495481, > "duplicate": 67388, "dirty-pages-rate": 0, "normal-bytes": 1200128, "normal": > 293}}} > > > The interesting thing is that it works perfectly without --enable-kvm. Can you please try the following patch? https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg00174.html