Search This Blog

2012-02-14

Tunneling vSphere Client in Windows

Using tunneling over SSH you can forward the multiple ports needed to access the vSphere client used to administrate ESX or ESXi hosts.

Requirements:
  • SSH jumpbox (from this jumpbox you should have access to the ESX/ESXi machine)
  • PuTTY or Cygwin

So basically we are binding the following ports: 443, 902, and 903 to our localhost using PuTTy in this tutorial.

Steps:

  1. Open up PuTTy and configure the settings to look as follows where destIP=your destination IP address of the ESX box
  2. Go back to the session tab and type the hostname/IP address of your SSH jumpbox. Alternatively you could open up cygwin and type the following: ssh -L 443:destIP:443 -L 902:destIP:902 -L 903:destIP:903 user@jumpboxIP
  3. Edit the hosts file in windows C:\Windows\system32\drivers\etc\hosts (this is required as esxi relies on dns name and uses local resolution).

    Add the entry:
    127.0.0.1    ESXiHostname
  4. Open up vSphere client and login with the hostname of the remote ESX box

Common Errors:
Unable to connect to the MKS: Failed to connect to server :902

Occurs if you are not properly forwarding port 902 903

2012-02-11

Customizing an VMware ESXi5 installation disc for unattended install

This explains the workflow of creating a customized ESXi5 installation disc using a Windows PC. VMware has documentation on this workflow using a linux machine here.

1) Download the ESXi iso.
2) Extract the iso using your favourite iso extractor to c:\esxi. I used 7zip.
3) Create a KS.CFG file in c:\esxi with your Kickstart config. Documentation of ESXi5 kickstart commands is here.
4) Modify c:\esxi\ISOLINUX.CFG. Append "ks=cdrom:/KS.CFG" to APPEND. Your LABEL install should look like this:
LABEL install
KERNEL mboot.c32
APPEND -c boot.cfg ks=cdrom:/KS.CFG
MENU LABEL ESXi-5.0.0-20111104001-custom ^Installer

You can also add multiple LABEL install blocks to specify different KS.CFG files or no kickstart at all.
**When ESXi mounts the CD during setup, all files are capitalized. So even if your kickstart cfg file is ks.cfg you have to put KS.CFG.

Now you have to burn your customized setup onto a disc.
1) Download and extract cdrtools for windows from here.
2) Run this command to create the iso (case senstive):
mkisofs.exe -relaxed-filenames -J -R -o custom_esxi.iso -b ISOLINUX.BIN -c c:\esxi\boot.cfg -no-emul-boot -boot-load-size 4 -boot-info-table c:\esxi
3) Burn custom_esxi.iso to disc with any utility. I used the Windows 7 built-in iso burner.


Common Errors:
Not specifying boot.cfg in mkisofs
kernel= must be set in /boot.cfg
Fatal error: 32 (Syntax)
Using imgburn
“No DEFAULT or UI configuration directive found”
OR
ata-pata.v00 not found

ks.cfg was not capitalized in isolinux.cfg
cannot find kickstart file on cd-rom with path -- /ks.cfg