VMware vSphere

 View Only
  • 1.  How to list all VMs with ownership user in vCenter

    Posted Jun 28, 2018 07:28 AM

    I want to get the list of all Virtual machines in vCenter with their own user account.

    Actually, it required to list the VMs and ownership of the VMs.

    Does anyone have an idea?



  • 2.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 29, 2018 01:04 AM

    Use vSphere Tags or Attributes to write the owner name into the VM. Use PowerCLI or some other method (even a vSphere search) to return results based on the input user name you desire.



  • 3.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 29, 2018 09:29 AM

    Yea, The only options get the list from the Event log, there is no way to get an owner details using Tags or Attributes.

    Anyway, I used powercli script to get the Created User from the event logs.

    Thank You.



  • 4.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 29, 2018 11:29 AM

    Hi

    One option would be rvtools.

    https://www.robware.net/rvtools/



  • 5.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 29, 2018 11:38 AM

    The event logs works so long as that data hasn't aged out of the database. This is why tags or attributes are better because this wouldn't occur.



  • 6.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 29, 2018 12:00 PM

    You are right. But unable to find any option to add tags or attributes for vCenter username. Do you have any idea?



  • 7.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 29, 2018 12:37 PM

    You create a category, then you create a tag. The value of the tag can be anything including a name or email address. Tags are entirely user definable.



  • 8.  RE: How to list all VMs with ownership user in vCenter

    Posted Jun 21, 2021 03:13 PM

    Hello Gopalakrishnan3,

    I am trying to get the user name from an event using get-vi events, for a CD-ISO attachment event. I am curious to see exact how are you successfully able to pull the user name from the event logs. Any help is appreciated. Thank you.