Rawpixel - Fotolia
Managing a vSphere environment can be a cumbersome process, especially as an organization's VMware deployment grows. Thankfully, there are a few things a vSphere administrator can do to save time and make management easier.
In a small VMware deployment, the search option within the console is a nice feature. When managing a large VMware deployment, however, the search field is essential. The nice thing about searches within vSphere is that they can take you directly to the object you want to manage. As convenient as this might be, tagging can take search usefulness to the next level.
The problem with native vSphere searches is that they are limited to the native object metadata. Tagging gives the vSphere administrator the ability to add custom metadata to objects within the inventory, thereby increasing the power of the built-in search engine in the process.
In order to make tags more useful and consistent, vSphere uses a category system. A vSphere administrator can create a series of categories and then assign tags to those categories. If, for example, you wanted to be able to search based on guest OS, you might create a Guest OS category by clicking on Tags and Custom Attributes -- within the web console -- going to the Tags tab and clicking on Categories, followed by New Category.
With the new Guest OS category in place, you can create a tag bearing the name of a guest OS by going to Tags and Custom Attributes and clicking on the Tags tab. From there, click on New Tag, and then enter a name for the tag you want to create. For example, you might call the tag Windows Server 2016. Enter an optional description for the tag, and then choose the recently created Guest OS category from the Category drop-down menu.
The last step in the process is to assign the tag to an object. In this case, I am using VMs as an example, but the same basic principle applies to any VMware inventory item. To assign the tag, browse for the object you want to tag within the vSphere Web Client inventory. Next, select Tags & Custom Attributes | Assign Tag from the Actions menu. Now, choose the tag category, followed by the name of the tag you want to assign to the object, and click OK.
If you're a Windows Server administrator, then you know that PowerShell is Microsoft's preferred management tool. For the uninitiated, PowerShell is a command-line environment that can be used for nearly any Windows Server administration task. Furthermore, PowerShell makes it possible to build scripts that can be used to automate complex or repetitive processes.
One of the best things about PowerShell is that it's extensible. Microsoft, for example, has created PowerShell modules for nearly all of its server products. However, this extensibility isn't available solely to Microsoft. Anyone with a good working knowledge of PowerShell can build their own custom PowerShell modules. VMware has taken advantage of this capability and created PowerCLI, which is a tool for automating the management and configuration of vSphere. For example, PowerCLI could be used to apply tags to vSphere inventory items much more quickly than would be possible by using the GUI.
Like native PowerShell, PowerCLI takes a little bit of getting used to, but the increased efficiency and time savings are worth the effort. VMware provides plenty of documentation to help the vSphere administrator to get up to speed on PowerCLI. The company provides a full cmdlet reference, as well as a user/developer guide.
Those who are already well-versed in PowerShell will be happy to know that PowerCLI adheres to the same basic syntax rules as native PowerShell. PowerCLI cmdlets are made up of verb-noun combinations similar to native PowerShell cmdlets, and some PowerCLI cmdlets are identical to the cmdlets used to manage Microsoft's Hyper-V.
One of the really great things about PowerCLI is that a vSphere administrator doesn't have to create configuration and management scripts from scratch. There are numerous PowerCLI scripts available for download on GitHub and other sites. TechTarget has even published an article on the top 10 PowerCLI scripts for the vSphere administrator.
Retrieve vSphere log files with these strategies