LEARN – Python ESXi Compatibility Checker

LEARN – Python ESXi Compatibility Checker
October 18, 2021 No Comments ESXi,Uncategorized,VMware neudorfer

UPDATE – Using C:\Windows\py.exe fixed a few issues. I’m not sure if it removes the need for the dependencies.

 

Find the official VMware Compatibility Guide Here

From the Fling Summary “The ESXi Compatibility Checker is a python script that can validate VMware hardware compatibility and upgrade issues of ESXi.”

It took me a few extra steps to get this setup. 

You’ll need python installed so I used ninite to download and install.  You can use C:\Windows\py.exe

Once python is setup we can install the dependencies. There are three that I found that aren’t exactly spelled out. The three are, crypto, pyopenssl, and pyvmomi. I needed to install via PIP using the below command after CDing into the correct directory. 

python.exe -m pip install –trusted-host=pypi.org –trusted-host=files.pythonhosted.org –user %package to install%

Run this three times for each package replacing the package name each time. 

Now that dependencies are installed we can run 

python.exe “C:\Users\%USERNAME%\Downloads\compchecker-v1-20210219\compchecker.py” -s %VCENTER SERVER% -u %USERNAME%

This will connect you to the vcenter and you can then run checks on hosts using the Instruction page found under the Fling documents Here

 

Running reports gives you a nice HTMl and CSV output by adding -r at the end of our command and then -v %version% to get compatibility for all components.

python.exe “C:\Users\%USERNAME%\Downloads\compchecker-v1-20210219\compchecker.py” -s %VCENTER SERVER% -u %USERNAME% -r -v 7.0.0 

Troubleshooting – 

PermissionError: [Errno 13] Permission denied: ‘compreport_

If you get errors running the reports you may need to CD into a folder you have permissions, I used downloads, and run again with the full path to python.exe

 

 

https://flings.vmware.com/esxi-compatibility-checker/comments?page=7

https://python-forum.io/thread-12634.html

https://stackoverflow.com/questions/59273658/no-module-named-pyvim

About The Author