-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Skip all VM's that are in a specific folder ? #249
Comments
I’ll be happy to review a PR, but I don’t have time to implement that now. You can already skip VMs by name pattern, so that’s an option as well. |
Is there a --properties option on vpoller-client that will show me the folder name? then I can just export the list of VMs and fold those that are in a particular folder, then add those VMs to the exclude line in the YAML file? |
There's no such feature in vPoller as of today. You might be able to get that by requesting all properties of the VMs, and filter the result based on the folder name, but that would be an expensive API call. A better approach IMO would be to simply have a naming convention for VMs that are about to be archived - that way you can filter these VMs based on the naming convention. |
I am thinking now to have some external script run, maybe esxcli or something else can do it, to inventory the VMs and write to a file the list of VMs in the specific folder. Then add exclude those in the import / yaml file. Anyway, thats the best thing I can think of for now. |
Hello. Are there any changes as for today in this question about folder name in properties? |
Hello,
We want to skip all VM's that are in a specific folder in Vsphere. We have a folder where archived and to be deleted VM's are put, which don't need to be monitored, and are already powered off.
We also have one ESXi test machine, that has a group of VMs on it that are only used for test migrations. We want to either exlude this ESXi host and all VMs on it, or exclude them only when they are powered off. I think just excluding them completely is fine. Is there a way to do this?
It seems there is python method to find VMs in a folder, so I was hopping there was a way in vpoller to identify a folder as being excluded.
https://stackoverflow.com/questions/37950968/how-to-find-vm-in-particular-folder-using-pyvmomi
The text was updated successfully, but these errors were encountered: