community.vmware icon indicating copy to clipboard operation
community.vmware copied to clipboard

vmware_guest_info - remove dependency on Datacenter

Open markatdxb opened this issue 2 years ago • 3 comments

SUMMARY

vmware_guest_info modules has a mandatory parameter Datacenter It gets tricky in large environments to get information about the VM where I need to use multiple modules first need to run module to figure out in which Datacenter the VM is located. here i use vm_find module which in our environment with 5000+ VMs is super slow - takes minutes to complete the job second to run this module to grab VM details

ISSUE TYPE
  • Feature Idea It would be great to have Datacenter manatory param removed if possible especially when using VM moid to search for VM moid is a global unique parameter where Datacenter name should really not be required ?
COMPONENT NAME

vmware_guest_info

ADDITIONAL INFORMATION

markatdxb avatar Sep 09 '21 08:09 markatdxb

+1 for this It really makes no sense to have the datacenter parameter required considering that the module that actually creates VMs doesn't require it all. Even the one that manages the powerstate of a VM doesn't require. But the one that makes no changes and is a readonly operation requires it. Makes absolutely no sense. Really weird.

AlphaMalik avatar Feb 18 '22 18:02 AlphaMalik

+1 cannot do automation with multiple datacenter like take snapshots. I t would be great if it can be removed from requirement.

ayhan6710 avatar Jun 03 '22 09:06 ayhan6710

+1 There should be no requirement for datacenter. But: Throw an error, if you find more than one VM, which might happen if you look fo a VM via display name. If you identify a VM via moid, then it should definitely work without datacenter info.

mbx64 avatar Jan 09 '24 12:01 mbx64