Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcenter/vm/{vm} API does not return VM details for VM Templates present inside the content library in v7.0+ VCenter client versions #3693

Open
naveenuk2411 opened this issue Feb 10, 2025 · 2 comments

Comments

@naveenuk2411
Copy link

naveenuk2411 commented Feb 10, 2025

Discussed in #3692

Originally posted by naveenuk2411 February 10, 2025
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:

  1. We hit /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 as vm-<id>.
  2. We hit /vcenter/vm/{vm} GET API by passing vm-<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:

  1. Can I get some info on release notes or breaking changes for v7.0 and above versions for this API /vcenter/vm/{vm}.
  2. Is there an alternate way to get all the info returned by /vcenter/vm/{vm} API for a VM template present inside the content library.

API references:

  1. https://developer.broadcom.com/xapis/vsphere-automation-api/v7.0U2/vcenter/api/vcenter/vm/vm/get/
  2. https://developer.broadcom.com/xapis/vsphere-automation-api/latest/vcenter/api/vcenter/vm-template/library-items/template_library_item/get/

Thanks in advance for the help.

Copy link
Contributor

Howdy 🖐   naveenuk2411 ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

@dougm
Copy link
Member

dougm commented Feb 27, 2025

The /vcenter/vm API isn't supported in the govmomi client or simulator. Which client are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants