Description of problem: When one runs v4 API call to /api/vms in RHV 4.0.7 (and in earlier RHV 4.0.x as well I believe), even if guest agent is installed the information about IP address of a virtual machine is missing (entire <guest_info> block) , only <fqdn> is visible. If one enforces a v3 API call, everything is displayed as expected. Version-Release number of selected component (if applicable): RHV 4.0.x v4 REST API How reproducible: 100% Steps to Reproduce: 1. Create a VM in RHEV env, install guest agent 2. Run a v4 API GET call to /api/vms: # curl \ --cacert '/path/to/ca.crt' \ --request GET \ --header 'Version: 4' \ --header 'Accept: application/xml' \ --user 'admin@internal:password' \ https://rhevm-fqdn/ovirt-engine/api/vms Actual results: <guest_info> block is completely missing in output, only <fqdn> is visible Expected results: <guest_info> is displayed like in below example: <guest_info> <ips> <ip address="xxx.xxx.xxx.xxx" version="v4"/> <ip address="fe80::xxxx:xxxx:xxxx:xxxx" version="v6"/> <ip address="xxxx:xx:x:xxxx:xxx:xxxx:xxxx:xxx" version="v6"/> </ips> <fqdn>vm_fqdn.domain.zone</fqdn> </guest_info> -- Kind Regards, Igor Netkachev Technical Support Engineer Red Hat Global Support Services
The 'guest_info' element has been removed in version 4 of the API. The information is now available in the collection of 'reported devices' of the virtual machine: GET /ovirt-engine/api/vms/123/reporteddevices <reported_devices> <reported_device> <name>eth0</name> <type>network</type> <mac> <address>00:1a:4a:b5:4c:94</address> </mac> <ips> <ip> <address>192.168.1.115</address> <version>v4</version> </ip> ... </ips> </reported_device> ... </reported_devices> Note that the same VM may contain multiple reported devices, and in particular multiple network interface cards. Each network interface card may then contain multiple IP addresses. For a particular network interface card the same information is also available in /ovirt-engine/api/vms/123/nics/456/reporteddevices. This change is documented here: http://ovirt.github.io/ovirt-engine-api-model/4.1/#_removed_the_code_guest_info_code_element That documentation can be improved. And we should probably add to the SDKs examples showing how to get IP addresses of virtual machines, as it is a common use case.
I am removing the 'Regression' keyword, as 'guest_info' is still available in V3 of the API, and was never available in V4.
Juan, should this move to virt?
Yes, I think so, moving it. Note that in my opinion the only thing that should do is improve the documentation and add examples to the SDKs.
This bug has not been marked as blocker for oVirt 4.3.0. Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason: [No relevant external trackers attached] For more info please contact: rhv-devops
INFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [No relevant external trackers attached] For more info please contact: rhv-devops
Verified on ovirt-engine-4.3.3.2-0.1.el7.noarch and python-ovirt-engine-sdk4-4.3.1-1.el7ev.x86_64.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:1085
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days