title: "Using the vSphere Diagnostic Tool Fling" # Title of the blog post.
date: 2022-08-28 # Date of post creation.
# lastmod: 2022-08-23T15:02:50-05:00 # Date when last modified
description: "Save time and energy by using the VMware vSphere Diagnostic Tool to quickly investigate potential configuration problems in your VMware environment."
featured: false # Sets if post is a featured post, making appear on the home page side bar.
draft: false # Sets whether to render this page. Draft of true will not be rendered.
toc: true # Controls if a table of contents should be generated for first-level links automatically.
usePageBundles: true
# menu: main
featureImage: "vdt.png" # Sets featured image on blog post.
# featureImageAlt: 'Description of image' # Alternative text for featured image.
# featureImageCap: 'This is the featured image.' # Caption (optional).
VMware vCenter does wonders for abstracting away the layers of complexity involved in managing a large virtual infrastructure, but when something goes wrong it can be challenging to find exactly where the problem lies. And it can be even harder to proactively address potential issues before they occur.
Fortunately there's a super-handy utility which can making diagnosing vCenter significantly easier, and it comes in the form of the [vSphere Diagnostic Tool Fling](https://flings.vmware.com/vsphere-diagnostic-tool). VDT is a Python script which can be run directly on a vCenter Server appliance (version 6.5 and newer) to quickly check for problems and misconfigurations affecting:
For any problems which are identified, VDT will provide simple instructions and/or links to Knowledge Base articles for more detailed instructions on how to proceed with resolving the issues. Sounds pretty useful, right? And yet, somehow, I keep forgetting that VDT is a thing. So here's a friendly reminder to myself of how to obtain and use VDT to fix vSphere woes. Let's get started.
### 1. Obtain
Obtaining the vSphere Diagnostic Tool is very easy. Just point a browser to https://flings.vmware.com/vsphere-diagnostic-tool, tick the box to agree to the Technical Preview License, and click the big friendly **Download** button.
![Download](download.png)
It will show up in `.zip` format.
### 2. Deploy
This needs to be run directly on the vCenter appliance so you'll need to copy the `.zip` package onto that server. [Secure Copy Protocol (SCP)](https://en.wikipedia.org/wiki/Secure_copy_protocol) is a great way to make that happen. By default, though, the VCSA uses a limited Appliance Shell which won't allow for file transfers. Fortunately it's easy to [follow this KB](https://kb.vmware.com/s/article/2100508) to switch that to a more conventional `bash` shell:
1. SSH to the VCSA.
2. Execute `shell` to launch the `bash` shell.
3. Execute `chsh -s /bin/bash` to set `bash` as the default shell.
Once that's done, just execute this on your local workstation to copy the `.zip` from your `~/Downloads/` folder to the VCSA's `/tmp/` directory:
After entering the SSO password, VDT will run for a few minutes and generate an on-screen report of its findings. Reports can also be found in the `/var/log/vmware/vdt/` directory.
### 5. Review
Once the script has completed, it's time to look through the results and fix whatever can be found. As an example, here are some of the findings from my _deliberately-broken-for-the-purposes-of-this-post_ vCenter:
Please see https://kb.vmware.com/s/article/2130599 for more details.
```
Silly me - I must have changed the hostname at some point, which is not generally a Thing Which Should Be done. I can quickly [consult the referenced KB](https://kb.vmware.com/s/article/2130599) to figure out how to fix my mistake using the `/opt/vmware/share/vami/vami_config_net` utility.
These core files are older than 72 hours. consider deleting them
at your discretion to reduce the size of log bundles.
FILES:
/storage/core/core.SchedulerCron.p.11919 Size: 34.36MB Last Modified: 2022-08-03T22:28:01
/storage/core/core.python.1445 Size: 20.8MB Last Modified: 2022-08-03T22:13:37
/storage/core/core.python.27513 Size: 41.12MB Last Modified: 2022-07-28T04:43:55
/storage/core/core.ParGC.6 Size: 802.82MB Last Modified: 2022-07-28T04:38:54
/storage/core/core.python.12536 Size: 39.82MB Last Modified: 2022-07-28T04:18:41
/storage/core/core.python.50223 Size: 281.55MB Last Modified: 2022-07-13T22:22:13
/storage/core/core.lsassd.56082 Size: 256.82MB Last Modified: 2022-07-13T22:16:53
/storage/core/core.SchedulerCron.p.21078 Size: 29.52MB Last Modified: 2022-06-25T11:05:01
/storage/core/core.python.19815 Size: 25.44MB Last Modified: 2022-06-25T11:03:06
/storage/core/core.python.51946 Size: 25.8MB Last Modified: 2022-06-18T10:22:08
/storage/core/core.python.40291 Size: 25.44MB Last Modified: 2022-06-13T11:21:26
/storage/core/core.python.14872 Size: 43.97MB Last Modified: 2022-06-13T10:35:04
/storage/core/core.python.11833 Size: 20.71MB Last Modified: 2022-06-13T10:30:01
/storage/core/core.python.35275 Size: 42.87MB Last Modified: 2022-06-13T07:17:27
/storage/core/core.VM.6 Size: 1.21GB Last Modified: 2022-06-13T00:38:56
[INFO] Number of core files: 15
```
Those core files can be useful for investigating specific issues, but holding on to them long-term doesn't really do much good. _After checking to be sure I don't need them_, I can get rid of them all pretty easily like so:
Please search for 'Change the Password of the Root User'
in vCenter documentation.
```
That's a good thing to know. I'll [take care of that](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenter.configuration.doc/GUID-48BAF973-4FD3-4FF3-B1B6-5F7286C9B59A.html) while I'm thinking about it.
The vSphere Diagnostic Tool makes a great addition to your arsenal of troubleshooting skills and utilities. It makes it easy to troubleshoot errors which might occur in your vSphere environment, as well as to uncover dormant issues which could cause serious problems in the future.