VMware vSphere

 View Only
  • 1.  How to search for VMs that are marked with a certain tag

    Posted Nov 09, 2018 10:38 AM

    Hi,

    I am using vSphere Webclient 6.5 to manage certain VMs. But I am not VMWare admin, just a user. To easy searching for my 30 VMs out of our 200 over-all, my Vmware admin created a new Tag-Category with two tags and tagged my servers accordingly. But I can find no way to search for VMs that are tagged. Neither via the search field nor with the filter option.

    Can anyone help?

    Thanks

    Michael



  • 2.  RE: How to search for VMs that are marked with a certain tag

    Posted Nov 09, 2018 10:46 AM

    Hi,

    You could use PowerCLI with this commande line.

    PowerCLI C:\> Get-VM | Get-TagAssignment | select Tag,Entity

    Thank you,

    Regards



  • 3.  RE: How to search for VMs that are marked with a certain tag

    Posted Nov 12, 2018 09:03 AM

    Hi Marmotte94,

    thanks for your suggestion.

    I had a hard time getting VMware.Power-CLI going in an offline environment Windows 7. Just to run into another issue whenever trying to use a get-tag* command: error message "The SSL connection could not be established [...]".

    So It seems to be a correct answer - if it works.

    And if my VMWare admin would encourage me to use PowerCLI: He nearly slapped me when I told him I installed that stuff. He once had an issue wrecking half of the VMs after using a self made PowerCLI script. And VMWare support told him that they do not support scripts that are not from VMWare themselves.

    I will mark your answer as correct.

    Regards



  • 4.  RE: How to search for VMs that are marked with a certain tag

    Posted Nov 09, 2018 01:00 PM

    You can do it by PowerCli as the previous user suggest or just click in the vSphere Web Client at the left panel "New Search", this is an advanced search that you can use for anything.

    I grabbed this image from the internet (Select New Search):

    http://docs.hol.vmware.com/HOL-2017/hol-1810-01-sdc_html_en/images/37dda087-5c42-4d0c-98e4-c4ffd182874b.png



  • 5.  RE: How to search for VMs that are marked with a certain tag
    Best Answer

    Posted Nov 12, 2018 09:18 AM

    You must have tried this , thought to confirm.

    In vSphere client

    Home > Tags & Custom Attributes > Tag > <Select you tag here> > Objects.

    You can see all the VMs with the particular Tag in 'Objects' pane.



  • 6.  RE: How to search for VMs that are marked with a certain tag

    Posted Nov 12, 2018 09:35 AM

    Hello yezdl and dbalcaraz,

    you are both correct - if using the legacy flash Webinterface.

    Both ways do work excellently.

    I was looking for the same functionality in the HTML5 web interface. Neither of the suggestions do work there. Which is a shame for VMWare IMHO.

    Thanks for your suggestions and input.

    You helped me a lot - and I will use the flash interface from now on.

    Regards



  • 7.  RE: How to search for VMs that are marked with a certain tag

    Posted 29 days ago

    Hello, sorry this is an old thread I know but I'm just curious because it still seems like in the HTML5 vCenter UI, a global search does not take into account tags that are attached to VMs. The search will return the tag itself, and if I click on the tag then it'll take me to the tag's page where I can go to Objects and see what objects it's linked to. But it doesn't return objects with the tag attached to it. Nor does the "quick filter" search on the VMs tab (in the right pane, when any level of the inventory is selected in the tree view in the left pane). And on that same VMs tab, with "advanced filter", there's no option to use "tag" as a condition.

    Was none of this functionality ever added to the HTML5 client? That seems like a pretty significant gap if not, considering I'd think one of the main use cases for tags would be to do exactly this (tag objects and then use those tags to easily search for and find those objects)...

    -------------------------------------------