Qemu-guest-agent responses parsed incorrectly

We’re trying to read VM data via qemu-guest-agent on ONE 6.10.0. We’ve done the guest_agent=yes things etc and it all should be up and running. But now that data is read and received, OpenNebula is parsing the data incorrectly. The ping works, but for example GUEST_INFO or GUEST_INTERFACES don’t work. We end up with “unexpected COMMA” kind of errors.

The reason seems to be, that the return value is expected to have { return: foobar }. Now that the more complicated data than ping contains a JSON, it expects it to be in a VM_TEMPLATE format which doesn’t make sense since it’s under the JSON ‘return’ object, and is of type JSON, not VM_TEMPLATE.

In this pull request, the :vm_ip_address monitoring command works, because it returns a single IP as a string under the return element.

The 2nd command :vm_ip_address_list does not work though because it returns a JSON array.

Hi @tosaraja

Thank you very much for contributing to the repository! At this moment we have frozen the repository to prepare for the next release, but we will analyze this case and test your PR.

Again thank you very much for your contribution! :raised_hands:

Best,
Victor.