How to get the VM Folders hierarchy with their managed object reference? #2948
Unanswered
jashanj0tsingh
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
-
I am writing a wrapper around govmomi, and I want to query vCenter to return me the
VM Folders
and the vms under those folders.I already got some insight from issue#1116 but I was wondering if there is a way to get the VM Folders in a way that can be marshalled into something like below instead of dealing with strings inside the
InventoryPath
property?for ex,
{ "dir": { "name": "directory1", "vms": { "vm": { "name": "vm1", "reference": "vm-105" } } } }
this is what I have so far,
I want to be able to get the object reference as well so that later in my code I can use it for a performance query, and to create query specs you require that reference.
I am able to get the type and value properties of VMFolder and HostFolder, but I am having difficulty to further extract children of those folders with their names, I also tried something with
PropertyCollector
but I didn't get far,thanks.
Beta Was this translation helpful? Give feedback.
All reactions