vsphere-automation-sdk-python icon indicating copy to clipboard operation
vsphere-automation-sdk-python copied to clipboard

how to get vms in folder

Open navi86 opened this issue 6 years ago • 2 comments

I am trying to get VMs from specific folder and subfolders. I've opened issue 85, but the solution doesn't provide with vms in subfolder. Is it not possible to get vms in subfolders ?

navi86 avatar Aug 04 '18 09:08 navi86

The API currently doesn't include vms in subfolders. I just checked the API doc and it doesn't mention this behavior. I will file a bug to fix the doc. I will also file a feature request to add the recursive capability to the API.

tianhao64 avatar Aug 06 '18 21:08 tianhao64

any idea on when this feature will be made available?

mike-19 avatar Aug 03 '20 12:08 mike-19

It seems like you can already do it now with client.vcenter.VM.list(VM.FilterSpec(folders=folder_id)) https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/data-structures/VM/FilterSpec/

vazome avatar May 21 '23 02:05 vazome