how to enable vmware esxi 5 ssh interface

2

I'm trying to automate a set of operations across several virtualization stacks as a cloud-like experiment. So far, I have been having dificulties working with VMWare esxi 5 (free edition)

After a long battle with the documentation and the lack of there of, I managed to setup the appropriate kickstart file, a cd contents repository exported via web and a proper pxe setup to accomodate the needs of the vmware hands-free installation.

After installation, however, I was surprised in finding that the ssh port is not enabled. Part of the success of my experiment is being able to automate the creation of VMWare guests and executing (via ssh and the vmware-cli) some form of lifecycle operations. I know there is "vmware vcenter" and other such tools, but that doesn't really help me in the automation.

I guess what I'm looking for is whether there anything I can do to enable the ssh interface and whether that will be enough for me goals (tips requiring code is fine.)

So far, my thoughts have been to do some sort of hackery in python embeded in the kickstart file that would allow me to connect to the environment before the installation finishes, so that I could hack around and force the ssh interface to enable -- however, I'd like to hear some external thoughts first!

CaseyJones

Posted 2012-08-05T19:24:22.017

Reputation: 121

Answers

0

It turned out to be rather simple. Add those lines to the %firstboot section of your kickstart file for vmware.

%firstboot --interpreter=busybox 
vim-cmd hostsvc/enable_ssh 
vim-cmd hostsvc/start_ssh 
vim-cmd hostsvc/enable_esx_shell 
vim-cmd hostsvc/start_esx_shell

CaseyJones

Posted 2012-08-05T19:24:22.017

Reputation: 121

For a while I wondered why I never got an answer to this. Now I just realized I should've posted this to the serverfault instead! – CaseyJones – 2012-08-09T22:53:06.047

0

Following will help you to enable or activate SSH on the ESXi 5.0 hosts via the vSphere Client.

  1. First start the vSphere Client
  2. Select the ESXi host in the configurations tab
  3. Select Security Profile
  4. Click on Properties in the upper right corner and you will get the a popup with all the services on this ESXi 5.0 hosts. Select the SSH service and press the Options button.
  5. Enable SSH on ESXi 5.0 vis vSphere Client

Hope it helps!

  • Kiran

nkiran

Posted 2012-08-05T19:24:22.017

Reputation: 1