VMware Cloud Community
cyberfed2727
Enthusiast
Enthusiast

Running python (or other) script on ESXi

I am curious what languages ESXi can process and run as a script. I assume python is one of those?

I ask because I would like to write a script (in a supported ESXi language) that makes modifications to certain files on the hypervisor. Mostly for security hardening. These settings cannot be done via web-client or thick client.

So assuming say python is supported how would I execute the script on the ESXi box? Does the script need to be in a certain directory?

Any advice would be helpful. I have not written in python but I have worked with other programming languages I just am unsure of the process to actually get the script to run on ESXi. I would be running the script manually via an SSH session.

Thx!

0 Kudos
2 Replies
jmbrav0
Enthusiast
Enthusiast

I don't know if phyton is supported but VMWare has this toolkit VMware Infrastructure (VMware Infrastructure Perl Toolkit 1.6) to desing your own scripts

Regards, JM
0 Kudos
doddap
Contributor
Contributor

Yes, Esxi supports python.

you can try finding the python version on the esxi host before starting the script.

python --version

Please don't keep any scripts/files under root dir of esxi, once the esxi reboots all these files will be removed automatically [only system files will be retained].

In case if you want to run a script put it in any of the datastores [local vmfs/nas] and run.

0 Kudos