vcenter/vm/{vm}
API does not return VM details for VM Templates present inside the content library in v7.0+ VCenter client versions
#3692
Unanswered
naveenuk2411
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
vcenter/vm/{vm}
GET API does not return the details of VM Template which is present inside the content library for VCenter client versions v7.0 and above.However the same API does return the details for a VM template inside content library for lower versions that v7.0.
Our flow is the following:
/vcenter/vm-template/library-items/{templateId}
GET API to get the details of VM Template present within content library, where we get the template name identifier asvm-<id>
./vcenter/vm/{vm}
GET API by passingvm-<id>
to get the VM details which returns us a lot of information about nics, cdroms, disks etc, the info for which is consumed by us.On trying the same flow on
v6.7.0.54000
, we get the responses for both the APIs as part of the above flow.On trying the same flow on
v7.0.3.01100
, we get a failure on "/vcenter/vm/{vm}" GET API with the following error{ "error_type": "NOT_FOUND", "messages": [ { "args": [ "vm-2113587:7877af5f-b87e-4442-b5b6-8a4401177f99" ], "default_message": "Virtual machine with identifier 'vm-2113587:7877af5f-b87e-4442-b5b6-8a4401177f99' does not exist.", "id": "com.vmware.api.vcenter.vm.not_found" } ] }
A strange thing which I observed is that in the VCenter client UI, the same VM with identifier in the above error is used to get hardware related info for the VM Template present within the content library
API:
ui/data/urn:vmomi:VirtualMachine:vm-2113587:7877af5f-b87e-4442-b5b6-8a4401177f99?model=com.vmware.vsphere.client.vm.model.HardwareViewData
I have the following questions:
/vcenter/vm/{vm}
./vcenter/vm/{vm}
API for a VM template present inside the content library.API references:
Thanks in advance for the help.
Beta Was this translation helpful? Give feedback.
All reactions