VMware Cloud Community

ESX 4 Scripted Install Problem - vmware-vim-cmd

Hi all,

I'm having a problem with my scripted ESX 4 install. I'm trying to do a few things with vmware-vim-cmd such as enable VMotion and set teaming policies, however I can't get this command to work, either in the %post section of the ks.cfg or by building a script to be called by rc.local at boot.

If I log onto the console and manually enter the commands or manually execute the script containing them then the settings apply fine. I just don't seem to be able to automate it. Other commands in the same script work fine - it's just as if it ignores vmware-vim-cmd.

Has anyone else managed to get vmware-vim-cmd to work in a script with ESX 4?


0 Kudos
1 Reply
Community Manager
Community Manager

Take a look at Mike's page on some examples of using vimsh http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations

When using vimsh vmware-vim-cmd, you'll need to make sure it's ran as the last startup script as it relies on certain VMware components to startup. If you just do a google search you'll find hundreds of examples and the same goes on the VMTN forum.

You may see old posts referencing vimsh but it's the same as vmware-vim-cmd, just the newer version has a wrapper around vimsh. Majority of the syntax and params are the same


William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos