[ESXi 3.5] PXE Boot to working ESXi 3.5 Hypervisor

Need:
- ESXi 3.5 Iso File
- http://www.accessdata.com/downloads/current_releases/imager/Imager%20Lite%202.6.1.zip to open Iso and extract Files
- 7zip, WinRar, or whatever to unzip Files (7zip Recommended)
- http://syslinux.zytor.com/wiki/index.php/PXELINUX

ESXi 3.5 Extract:
1.) Extract the install.tgz from \CDROM\Sessions 1\Track 01\CDROM.
Its the Rock Ridge (RR in Isobuster) Session. Do NOT choose the one from the ISO / Boot part!

2.) Unzip the install.tgz.

3.) Extract the VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2 from the path install\usr\lib\vmware\installer to an directory of your choice.

4.) Unzip the VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2

5.) Open the File with FTK Imager.

6.) Extract the files of in Partition4\root (4 Files ldlinux.sys, mbootc32, safeboot.c32, syslinux.cfg - which are the bootloaders)

7.) Extract the files of in Partition5\root (7 Files bindmod.tgz, boot.cfg, cim.tgz, environ.tgz, license.tgz, oem.tgz, vmkernel.tgz - which are the ESXi Program Files)

PXELinux Extract:
- com32/mboot/mboot.c32
- com32/menu/menu.c32
- core/pxelinux.0

TFTP
- Create root Folder
- Copy all files from partition5\root Section within that Folder
- Copy all files from PXELinux Extract Section within that Folder
- Create Folder "pxelinux.cfg" within the root Folder
- Create an text file "default" (with NO File Ending or such) in that folder, with following text:

default menu.c32
menu title PXE Boot VMware ESXi
timeout 100

label ESXi
menu label Boot VMware ESXi
kernel mboot.c32
append vmkernel.gz --- binmod.tgz --- environ.tgz --- cim.tgz
ipappend 2

label Hard
menu label Boot from local drive
localboot 0

- Setup your tftp Server as you normally would and PXE Boot!
(For example see my PXE Boot Bart PE Post for setting up Tftpd32 for Windows)

Taken from: http://docs.google.com/View?docid=ddcwgcd6_4fs6s7jcf

[ESXi 3.5] oem.tgz and the power behind it

So, I'm going to write a quick info about ESXis most famous oem.tgz.
The oem.tgz is an file supplied by two sources:
a) the "install" oem.tgz which does sit in the root of your install medium (like pxe tftpboot, or cdrom root)
this is ONLY used DURING the installation
b) the "installed" oem.tgz which does sit in the file install.tgz
this file gets copied during the installation and is therefore active AFTER the installation.
detailed path is in
usr\lib\vmware\installer\Core\VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2
unziped to VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd
and there in Partition 5 the oem.tgz
(AccessData FTK Imager Lite to access)

Do you want to change the oem.tgz of an running ESXi System?
Just enable SSH, use Winscp and copy your oem.tgz to the folder /bootbank and replace the old, empty oem.tgz

The oem.tgz enables you to change the way the installation works.
You can for example add drivers, or add Vendor/Device Codes to the driver table

Mostly used:
- add Vendor / Device code:
/etc/vmware/simple.map

- driver
/mod

Look up driver in ESXi:
lspci -v

Watch which device does load which driver:
lspci -p

Is an HDD recognized?
fdisk -l

Just some quick infos

[ESXi 3.5] PXE Boot to Install

Easy as Cake:
Copy these files from the install CD:
BINMOD.TGZ, CIM.TGZ, IENVIRON.TGZ, LICENSE.TGZ, MBOOT.C32, MENU.C32, OEM.TGZ and VMKERNEL.GZ into your tftpboot Directory.

Insert the normal needed pxelinux.0 File, as well as the pxelinux.cfg Folder which contains following File called "default":

default menu.c32
menu title PXE Boot VMware ESXi
timeout 100

label ESXi3.5U4 Install
kernel mboot.c32
append vmkernel.gz --- binmod.tgz --- ienviron.tgz --- cim.tgz --- oem.tgz --- license.tgz --- install.tgz
ipappend 2

label Hard
menu label Boot from local drive
localboot 0

Have fun!

Taken from: http://www.vm-help.com/esx/esx3i/ESXi_PXE_install.html

[ESXi 3.5+] Enable SSH and Telnet

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).
5) Find the lines that begins with #ssh and remove the #. Then save the file. If you're new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file. Note: there are two lines for SSH with ESXi 4.0 now - one for regular IP and the other for IPv6. You should
6) Once you've closed the vi editor, you can either restart the host or restart the inetd process. To restart inetd run ps | grep inetd to determine the process ID for the inetd process. The output of the command will be something like 1299 1299 busybox inetd, and the process ID is 1299. Then run kill -HUP (kill -HUP 1299 in this example) and you'll then be able to access the host via SSH.

OR

6b) /sbin/services.sh restart

Tip - with some applications like WinSCP, the default encryption cipher used is AES. If you change that to Blowfish you will likely see significantly faster transfers.

Changing the port for SSH
To change the port for SSH, edit the file /etc/services and change the SSH port listed in the file. Save the file and repeat step 6 above.

Enable Telnet
The steps are the same as with SSH, but you'll remove the # from the 2 telnet entries in /etc/inetd.conf. Enabling telnet is not recommended if security is a concern.

You can also download an oem.tgz file which will enable SSH (and FTP). Copy the file to a datastore with the VI client and then to bootbank with the command cp /vmfs/volumes//oem.tgz /bootbank/oem.tgz and then reboot.

Taken from: http://www.vm-help.com/esx40i/ESXi_enable_SSH.php

[SRSS 4.2] How to enable SoftClient on Sunray Server 4.2?

Download:
SoftClient: http://wikis.sun.com/display/SRS5/Home#tab:SRS-5-Documentation

Configuration:
Point a web browser at the Sun Ray server. http://:1660. You will then need to provide the administrative credentials to log into the site. Once into the site you need take the following steps:
1. Click on the Advanced Tab
2. Click on the Systems Policy Sub Tab
3. Check the Software Client Access check box
4. Click on Save

Restart the Server - Click on the servers tab
1. tick the checkbox in front of your server name
2. click on cold restart

The system will go through a dialog about the server restarting.

Done!

Taken from: http://blogs.sun.com/acworkma/entry/how_to_configure_srss_4

[SRSS 4.2] How to install Sun Ray Windows Connector 2.2 on Solaris 10?

Download
Sun Ray Windows Connector (SRWC) 2.2 http://wikis.sun.com/display/SRS5/Home#tab:SRS-5-Documentation
Patches for SRWC2.2 http://www.sun-rays.org/srss.html#patches

Preparation:
Create a group of the connector proxy to run as
# groupadd utsrwc

Installation:

1.) Got root?
su

2.) Extract the software:
# unzip srwc_2.2_solaris.zip

3.) Run the installer
# ./srwc_2.2/installer
Accept the license
Enter the name of the group we just created - utsrwc

4.) Run the automatic configuration script
# /opt/SUNWuttsc/sbin/uttscadm -c

5.) Restart the Sun Ray Server Software
# /opt/SUNWut/sbin/utrestart -c
Note: Now is when we would apply patches. Since this a new release there are not any yet.

Configuration:
Use the web interface for the Sun Ray server to configure the Sun Ray server to present windows desktops. Log into your web admin port http://:1660. The username is admin and the password is the one you gave it during set up.
1. Click on the advanced tab
2. Click on the kiosk mode tab
3. Click on the edit button

We need to create our kiosk mode as the windows connector.
1. Changed the drop down to Sun Ray Connector for Windows OS
2. Type the DNS name or IP of the windows host in the arguments field
3. Click on Ok

At this point you will have a kiosk mode defined and then you will need to tell the server when to use it. This is accomplished by using the the System Policy to turn Kiosk Mode on.
1. Click on the advanced tab
2. Click on the System Policy Sub Tab
3. Click on the enable kiosk mode under card users
4. Click on enable kiosk mode under non card users
5. Click on the Save button

Changing the system policy requires a restart of the Sun Ray Services
1. Click on the Servers Tab
2. tick the checkbox in front of your server name
3. click on cold restart
The system will go through a dialog about the server restarting.

At this point our system is configured to present a windows desktop.

Personal Note:
You can easily add USB functions or Different Kiosk Settings for different Tokens

Taken from: http://blogs.sun.com/acworkma/entry/how_to_install_the_sun

[SRSS 4.2] How to install Sunray Server 4.2 on Solaris 10?

Download
Sun Ray Server Software (SRSS) 4.2 http://wikis.sun.com/display/SRS5/Home#tab:SRS-5-Documentation
Patches for SRSS4.2 http://www.sun-rays.org/srss.html#patches

Preparation:

Solaris Version: SRSS 4.2 requires Solaris 05/09 (u7) verify you have the correct version.
#cat /etc/release
Solaris 10 5/09 s10x_u7wos_08 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 30 March 2009

Installation:

1.) Got root?
su

2.) Extract the software:
# unzip srss_4.2_solaris.zip

3.) Install Java (SRSS 4.2 needs java 1.6 or higher.)C
Check your java version with the following command:
# java -version

Install java 1.6 on your system. The script is chip dependent. Pick x64 or Sparc
# ./srss_4.2/Supplemental/Java_Runtime_Environment/Solaris/jre-6u13-solaris-i586.sh
# mv jre1.6.0_13/ /usr/jdk/
# rm /usr/java
# ln -s /usr/jdk/jre1.6.0_13/ /usr/java

4.) Install Apache Tomcat
# /usr/sfw/bin/gtar -xvz -C /opt -f srss_4.2/Supplemental/Apache_Tomcat/apache-tomcat-5.5.20.tar.gz
# ln -s /opt/apache-tomcat-5.5.20 /opt/apache-tomcat

5.) Install the Sun Ray Server Software
# ./srss_4.2/utinstall
take all of the defaults
Note: Now is when we would apply patches. Since this a new release there are not any yet.
# reboot

6.) Configure the Sun Ray Server Software:
# /opt/SUNWut/sbin/utconfig
Take all of the defaults except for:
Enable remote server administration? (y/[n])? y
Configure Sun Ray Kiosk Mode? (y/[n])? y
#reboot

7.) Configure the parms file and tell the server what firmware to offer out
# mkdir /tftpboot
# vi /tftpboot/srssconfig
The file should look like the following:
servers=
# /opt/SUNWut/sbin/utfwadm -A -a -V -i /tftpboot/srssconfig -f /opt/SUNWut/lib/firmware_gui

8.) Turn on LAN connections:
# /opt/SUNWut/sbin/utadm -L on
# /opt/SUNWut/sbin/utrestart -c

At this point you have a basic Sun Ray server up and running. Any Sun Rays on the network should be displaying the Solaris log in and you should be able to log into your Solaris server through a Sun Ray.

Personal Notes:
I did use a second NIC for the SunRay, so I did configure an pcn1 with 192.168.128.1 on static on Solaris 10 installation.
Therefore I need to reconfigure SSRSS4.2 to use that:

# /opt/SUNWut/sbin/utadm -l # show SRSS config
LAN connections: On
Sun Ray interconnect framework is not configured
# /opt/SUNWut/sbin/utadm -r # remove SRSS Network Config
Sun Ray interconnect framework is not configured
# /opt/SUNWut/sbin/utadm -a pcn1 # configure SRSS for pcn 1
#got an error here as it was already configured during Solaris 10 installation - so lets remove that:
# mv /etc/hostname.pcn1 /etc/hostname.pcn1.bak
# /opt/SUNWut/sbin/utadm -a pcn1 # try again and it works!

Taken from: http://blogs.sun.com/acworkma/entry/how_to_build_a_sun2

[SRSS 4.1+] How to use different Kiosk Sessions for different tokens

1. Create kiosk session configuration
In SRCC Web Interface

2. Back it up
# cd # Make sure your are in a reasonable directory to store your configurations
# PATH=${PATH}:/opt/SUNWut/sbin # Save yourself (and me) some typing
# utkiosk -e session -s > UserSession.conf
* If you have configured applications, also save the application list to a file:
# utkiosk -e session -a > UserSessionApps.list

3. Store your kiosk session configuration in the Sun Ray data store.
Use a name that starts with a capital letter - all-lowercase names are reserved.

* If you don't need an application list, you can simply upload your UserSession.conf file like this:
# utkiosk -i UserSession -f UserSession.conf

* If you did create an application list, the command looks like this:
# utkiosk -i UserSession -f UserSession.conf -A UserSessionApps.list

4. Configure individual tokens to use this kiosk session configuration.
Here is how to configure one of this configurations to a selected, registred (!) Token OR DTU.

* How to register:
# utuser -a "CleverCard.0123456789,localhost,0,John Doe,"

* Now you can assign the UserSession configuration to the token:
# utkioskoverride -r CleverCard.0123456789 -s kiosk -c UserSession
Note: This will enable Kiosk Mode for this token, even if it isn't enabled globally.

* If you have stored multiple session configurations, you can view them using:
# utkiosk -l
session
UserSession

The session configuration is the default kiosk configuration, which is used for all kiosk session that haven't been assigned an override.

Example UserSession.conf for Windows Connector WITH USBTool:
KIOSK_SESSION=uttsc
KIOSK_SESSION_TIMEOUT_DETACHED=12000
KIOSK_SESSION_ARGS=-r disk:USBDRVS=$HOME/USBDRVS 192.168.1.1

Taken from: http://blogs.sun.com/joergb/entry/using_different_kiosk_sessions_for

[ SRSS 4.1+] How to use SunRay USB Ports on Solaris 10?

Download this: http://blogs.sun.com/danielc/resource/usbdrived
chmod +x
./usbdrived install

Using it with Windows Connector:
The Argument is: "-r disk:USBDRVS=$HOME/USBDRVS 192.168.1.1" - where you should replace the IP Adress with your Terminal Server

Notes:
- After adding a Drive, it can take up nearly a Minute until it comes "online"!
- The SunRay 1 use USB 1.1 - so that thing is quite slowly!

Troubleshooting:
- Can you see usbdrived running in your Solaris session? (ps -ef | grep usbdrived)
- Can you see a file called "Attaching USB Drives to your Sun Ray README.txt" on your Solaris desktop?
- Did you install it properly? If so, can you see and what permissions does this have:
/usr/dt/config/Xsession.d/1350.usbdrived (It should be executable by everybody, something like rwxr-xr-x)
- When you plug in a USB drive, does it mount in /tmp/SUNWut/mnt/ under Solaris?
- Under Windows, can you see in "My Computer" a Network drive (In "Others") called "USBDRVS" and is there a file within that explains usage?
- Have you hit refresh in file manager when looking at your USBDRVS mount?
- Most important and useful of all: Do any mounts show up if on a Solaris Sun Ray session you issue: /opt/SUNWut/bin/utdiskadm -l

Taken from: http://blogs.sun.com/danielc/entry/a_usb_drive_daemon_for1