v2/vms query parameters?


Badge +5
The docs for GET v2/vms state the following:
Virtual Machine disk information and network information are not included by default as fetching these are expensive operations. These can be included by setting the include_vmdisk_config and include_vmnic_config flags respectively.

Based on this I was planning on leveraging these flags for performance reasons when listing VM's, but I'm not sure they are working. I'm testing against a Acropolis system running 5.0.0.2.

I diffed the JSON responses from Swagger when include_vmdisk_config and include_vmnic_config were:
  1. both excluded
  2. both set to true
  3. both set to false
The JSON is identical for 1 and 3, which I expected, but for every VM the vm_disk_info and vm_nics fields are populated for each VM. When I diffed 1 and 2 the only difference is that each disk reports its size.

Is this expected?

10 replies

Badge +5
Also looks like GET v2/vms does not return guest_os.
Userlevel 1
Badge +6
Hi,

I tried this with 5.0 and the output is different when using

https://192.168.178.70:9440/PrismGateway/services/rest/v2.0/vms/?include_vm_disk_config=true&include_vm_nic_config=true

compared to

https://192.168.178.70:9440/PrismGateway/services/rest/v2.0/vms/

I am using 5.0 and ESXi 6.0

output:







Badge +5
Interesting...so the query parameters behave different depending on the underlying hypervisor?
Userlevel 1
Badge +6
Let´s try to double check this with eng. But I believe the output should be similar with AHV. I will try to test it as soon I have an AHV cluster available.

The CE edition does not provide the v2.0 API right now.

regards,
Thomas
Badge +5
I have Acropolis 5.0.0.2 running if you want to see the API output?
I also have CE running which has the v2.0 API (it does not have the v3 API).
Userlevel 1
Badge +6
Okay.

Which version are you using regarding the CE edition.

CE AOS 2016.10.12 and Nutanix Hypervisor 20150513 do not accept https://192.168.178.130:9440/PrismGateway/services/rest/v2.0/ requests at my lab. Would be nice to understand the difference.

Regards,
Thomas
Badge +5
I'm running the 2016.12.22 build. I believe that was the first non-EA build with Asterisx functionality. I'm planning on upgrading to the latest which is 2017.01.10 at some point.
Userlevel 1
Badge +6
I tested with CE edition today. You are right. The details with parameters are only a little bit more. Maybe the assumption that include disk statistics etc. is only expensive using vsphere? And the output with including ?include_vm_disk_config=true&include_vm_nic_config=true is a little bit different at my homelab. for example size is included!
Userlevel 7
Badge +30
hey regana - following up on old threads tonight, did you ever get to the bottom of this or is this still outstanding?
Badge +5
It seems like the API behaves differently between AHV and ESX, but I don't think we ever received official confirmation if that was the expected behaviour.

Reply