VMware Cloud Community
gopalakrishnan3
Contributor
Contributor

How to list all VMs with ownership user in vCenter

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?

http://www.cloudkb.net
Tags (1)
0 Kudos
7 Replies
daphnissov
Immortal
Immortal

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.

0 Kudos
gopalakrishnan3
Contributor
Contributor

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.

http://www.cloudkb.net
0 Kudos
diegodco31
Leadership
Leadership

Hi

One option would be rvtools.

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

Diego Oliveira
LinkedIn: http://www.linkedin.com/in/dcodiego
0 Kudos
daphnissov
Immortal
Immortal

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.

0 Kudos
gopalakrishnan3
Contributor
Contributor

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

http://www.cloudkb.net
0 Kudos
daphnissov
Immortal
Immortal

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.

0 Kudos
hsinojiya
Contributor
Contributor

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.

0 Kudos