Tuesday, October 11, 2011

VMware Scripting - Display Hostname & IP

Some of you might know how to check the host on vmware vsphere or ESX to get the information over the virtual center or vmware client. But do you know that, the most fastest way will be from SSH. You can create your own script


1)echo for i in `vmware-cmd -l`; do vmware-cmd $i getconfig displayname && vmware-cmd $i getguestinfo ip; done > script.sh
2)chmod 700 script.sh








You can run the script by typing ./script.sh.


 

No comments:

Post a Comment