One of the things that regularly pops up in our health checks in VMware environments are connected CD Drives that prevent DRS from functioning properly or prevents a host from entering maintenance mode when doing thing like patching.
In large environments it can get very tedious to disconnect all those drives manually. With PowerCLI it is just one line.
If you are knee-deep in a troubleshooting session with a customer you want to be able to have some tools ready that do some tests for you. One of the things that in my case has happened quite a lot was that some network were connected but couldn’t communicate outside of the host. So in a HPE Blade Enclosure infrastructure this was most likely a forgotten VLAN tag in the server profiles.
In order to quickly eliminate this problem I have worked on a script that helps you test every network in your environment.
Everyone who works in our industry is familiar with RVTools. It’s a great tool that achieves a lot in short time in terms of infrastructure checks. I would not want to do my job without it.
One customer wanted to have a e-mail report that showed the “zombie” files on their datastores. After a RVTool check they saw that they wasted a lot of space for not removed snapshot delta disks that were not removed by their backup solution. This is a problem we see in almost every environment.
Once again I’m writing about a customer use-case. In this case the customer wanted to know if all of his many LUNs were actually being used or if there were any they could delete and save some storage space.
The customer has a very big environment so it would have been tedious to do this task by hand. PowerCLI comes to the rescue in form of this very short script that will basically just put together some information and send it to you by email.
A couple of years ago I struggled with VMware Update Manager in a large environment. The Use case was to update about a 1000 VMs to the latest VMware Tools and VM Version (hardware). The VUM did not do the job and froze in the middle of the job. Unfortunately due to the Shutdowns and reboots required to to achieve this we only had a small windows to achieve this in. After one unsuccessful attempt to do this with the VUM we decided to script it.
The original script was published in 2009 somewhere (source in the script) and we took that script and added some features (like doing a snapshot before installation on a linux-vm) and recently I have updated the script to work with the latest VM version (13 from vSphere 6.5).
I’ve recently stumbled upon a VMware communities thread where someone had trouble backing up the VCSA database. The were using someone else’s script, so I thought I’d share the wrapper script I wrote around two python scripts that VMware has published in its KB 2091961