VMware Cloud Community
meggenberger02
Contributor
Contributor

Get Tags and Attributes from within the VM

Hi there.

I'm currently redesigning our OS setup and for our virtual environment which is based on VMware vSphere and vCenter (currently running 5.5 but in progress to being updated to 6.5).

With the new setup process I would like to leverage attributes and/or tags. When a new VM is being requested it will be created (automatically) with additional information in the attributes/tags like which Zone (LAN, DMZ, Zone 1 etc), Role, Service Class an others.

During the OS installation process I would need some of this information.

How would I get that Information? I know I can get it via Powershell, connecting to the vCenter and specifying the VM and get the attributes. But when I'm setting up the OS running a script within the VM I do not have the VM name in vCenter.

Can I get this info somehow via VMware Tools? Any other ideas?

Regards,

Marc

0 Kudos
1 Reply
virtualDD
Enthusiast
Enthusiast

I haven't actually tried this but I've looked into it. Here is the collection of links I saved for that purpose it might help you achieve what you are trying to do with the tags:

http://www.virtuallyghetto.com/2011/01/how-to-extract-host-information-from.html

Is there any possibility to get VMWARE HOST computer name from GUEST workstation without changing th...

Question on finding the Hostname from the Guest System

0 Kudos