I want to check with a python script if my system runs on an ESXi but I have never worked with one. My script should only work on ESXi but I have no clue what the cli prompt would look like or how to get it done.
Asked
Active
Viewed 202 times
-1
-
You can use ESXi for free with up to two VMs. There's also an time limited trial/demo license that might be 60 days, IIRC. Between those two and almost any spare computer you have, you could test against an actual ESXi server and also see all the prompts for yourself. – Todd Wilcox Jan 10 '18 at 14:56
-
Yes, you are right, i could and will do that if there's going to be another Problem with my script, but actually this is the only question i have about ESXi :/ please help me :/ – Alex Jan 10 '18 at 15:02
-
1I'm voting to close this question as off-topic because it doesn't show effort to solve the problem. – Andrew Schulman Jan 16 '18 at 03:36
1 Answers
1
The 'uname' command may help:
~ # uname -s
VMkernel
~ # uname -r
5.x.y
~ # uname -m
x86_64
~ # uname -o
GNU/Linux
There's also a /bin/vmware binary that will print "VMware ESXi 5.x.y build-zzzzzz" when called with
~ # vmware -v
Check for the presence of /bin/vmware and use it, or call uname and process the output. Both should return the desired information.

Lemon Cat
- 126
- 2