Section 11.3. The ESX Server Boot Process


11.3. The ESX Server Boot Process

Several boot loaders are used on Linux systems, such as the Grand Unified bootloader (GRUB) and the Linux Loader (LILO). ESX uses LILO as the boot loader and has system components that expect the presence of LILO as the boot loader, so don't replace LILO with another boot loader, or your server may experience problems. The configuration parameters for the bootloader are contained in /etc/lilo.conf in a human-readable format, but the actual bootloader is stored in a binary format on the boot sector of the default boot disk. This section explains the boot process of ESX Server, as well as how to load the VMkernel and configuration files.

11.3.1. High-Level Boot Process for ESX Server

  1. BIOS is executed on the server.

  2. BIOS launches LILO from the default boot drive.

  3. LILO loads Linux Kernel for the Service Console.

  4. The Service Console launches VMkernel.

  5. MUI Server is started.

  6. Virtual machines can then be launched by VMkernel and managed through MUI.

11.3.2. Detailed Boot Process

As you can see in Figure 11.3, esx is the default boot image that loads automatically after the timeout period. This is actually configured in the /etc/lilo.conf file shown in Figure 11.4 on the line default=esx. The Linux kernel for the Service Console is loaded in the lowest part of memory when it is started and occupies the amount of memory specified during the installation of ESX Server. If you look at the line in the /etc/lilo.conf file shown in Figure 11.4 that reads append="mem=272M cpci=0;*;1:*;2:*;3:*;6:*;". This shows that the Service Console occupies the first 272MB of memory on the server. Figure 11.5 shows a screen shot from the MUI where the Reserved Memory is set in the Options|Startup Profile for the server.

If the Reserved Memory option is changed in the MUI, it will update the /etc/lilo.conf file and write those changes to the Master Boot Record/Boot Sector in binary format.

Figure 11-3. The LILO Boot Menu


Figure 11.4 shows a typical /etc/lilo.conf file for ESX Server.

Figure 11-4. Contents of /etc/lilo.conf


Figure 11-5. Setting Service Console Memory in the MUI


11.3.2.1. The Start-up Process

The start-up process consists of the following steps:

  1. BIOS launches LILO from the Boot Drive Master Boot Record.

  2. LILO loads the Linux kernel and initial RAM disk (initrd) into memory for the Service Console.

  3. LILO starts the kernel and then alerts the kernel as to the location of the initrd, which is then temporarily mounted as the root file system at /initrd. This creates a small file system in memory that allows several programs to run before the real root file system is mounted. This allows the necessary modules and drivers to be loaded for the kernel without requiring the kernel to include every possible driver during the boot. Once the required drivers are loaded, the initrd is dismounted and the real root file system is mounted.

  4. The kernel starts the init process from /sbin. The init process then reads the configuration parameters from the /etc/inittab file, which includes the default runlevel for ESX Server (Figure 11.6). Table 11.1 shows the available runlevels for the Linux kernel. The /etc/inittab file also governs the configuration parameters for the mingetty and vmkstatus processes.

Table 11-1. Linux Runlevels

Runlevel

Mode

1

Single-use mode (This mode can be used to reset the root password.)

2

Not used (user-definable)

3

Full multiuser mode (default level for ESX)

4

Not used (user-definable)

5

Full multiuser (X WindowsNot recommended for ESX)

6

Reboot (Don't ever set the default runlevel to 6.)


Figure 11-6. A Section of the /etc/inittab File That Shows Runlevels


The purpose of /etc/rc.d/rc.sysinit is to initialize the system by performing the following actions:

  • Load modules governed by /etc/modules.conf

  • Mount the /proc file system

  • Set the system clock

  • Set up keyboard mapping for the console

  • Set the hostname of the ESX Server

  • Remount the root files systems in rewrite mode

Figure 11.7 displays the entries in the /vare/log/boot.log file that show rc.sysinit activities during the booting up of ESX Server. The grep command was used to show only log entries containing rc.sysinit.

Figure 11-7. Output for the boot.log File Using the grep Command to Show Entries for Only rc.sysinit


The rc script executes all the S scripts located in the directory of the default runlevel, which for ESX Server is /etc/rc.d/rc3.d (runlevel 3), shown in Figure 11.8 All scripts that start with "S" are executed in numbered order starting from lowest to highest. For example, S00vmkstart runs before S10network, which runs before S11vmware, and so on. The scripts shown in Figure 11.8 are really symbolic links to the actual scripts that reside in the /etc/rc.d/init.d directory. For users unfamiliar with Linux, a symbolic link is similar to a shortcut in Windows. It is a file that points to another file or directory in a different location. Also, notice the scripts that start with "K." These are symbolic links to the scripts that are called during a shutdown, reboot, or when changing the runlevel to stop running daemons/services in an orderly manner.

Figure 11-8. Contents of the /etc/rc.d/rc3.d Directory


Figure 11.9 displays the output of the ls l command, which shows the actual location that the symbolic links point to in the /etc/rc.d/rc3.d directory.

Figure 11-9. Command Output Showing the Location to Which Symbolic Links Are Pointing


11.3.2.1.1. Important Scripts for Runlevel 3

The S10network script performs the following actions:

  • Initializes the network interfaces

  • Sets the Service Console IP address found in the /etc/sysconfig/network-scripts/ifcfg-eth0 file

Figure 11.10 shows the contents of /etc/sysconfig/network-scripts/ifcfg-eth0.

Configuring & Implementing…
Changing the Service Console IP

To change the IP address of the service console, you can run setup and select network configuration, or you can run netconfig to change the ESX Server Host IP. These two options also allow you to change your default gateway and DNS server IP addresses. To manually change your ESX Server IP address, you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 and change the line IPADDR=192.1.1.1 to your new address. To have it take affect without rebooting, run the following command service network restart.


Figure 11-10. The Contents of /etc/sysconfig/network-scripts/ifcfg-eth0 Service Console Interface


The S11vmware script performs the following actions:

  • Loads the required object modules into memory, specifically vmnixmod.o, which is necessary for vmloader to make system calls

  • Starts vmloader, which makes the necessary system call and loads the VMkernel.

  • Starts the vmware-serverd or vmware-ccagent daemons during boot time to perform autostarts on virtual machines

  • Starts vmklogger to carry system log traffic

  • Starts vmkdump to extract any dumps for the core dump file

Configuring & Implementing…
Changing the Hostname or Default Gateway

To change the hostname of your server, you need to edit three files.

First, edit the /etc/sysconfig/network file, shown in Figure 11.11 You can manually edit this file to change the default gateway or hostname of the server. If you want to change the hostname, you also need to edit the /etc/hosts file and the /usr/lib/vmware-mui/apache/conf/httpd.conf file. In the /etc/hosts file, make sure you type the fully qualified domain name (FQDN) of the server in the following manner:

 192.1.1.1.    servername.domain.net    servername 

In the /usr/lib/vmware-mui/apache/conf/httpd.conf file, find the line labeled ServerName and change the server name to the FQDN of your server. The httpd.conf file may be set to read only, so you may need to run chmod to set the +w attribute before you can edit the file. Finally, you must run the following two commands for the changes to take affectservice network restart and hostname newhost.domainname.netor reboot your ESX Server.


Figure 11-11. The Contents of the /etc/sysconfig/network File


S12syslog starts syslogd daemon, which is governed by /etc/syslog.conf. The default logging directory for VMkernel is /var/log, while VMware-specific log files start with vmk. All VMware services use local6 for their facility name to log traffic. The VMware logging configuration in /etc/syslog.conf is shown in Figure 11.12

Figure 11-12. A Section of the /etc/syslog.conf File that Contains VMware Logging Details


S55sshd starts the secure shell daemon governed by /etc/ssh/sshd_config. This daemon is what allows remote Secure Shell logins and manages those connections.

Configuring & Implementing…
Changing the Primary DNS Server

To change the IP address of the primary DNS server that your ESX Server points to, edit the /etc/resolv.conf file and change the line nameserver 192.1.1.1 to the new IP address for your DNS server.


S56xinetd script starts the xinetd daemon which is governed by /etc/xinetd.conf. This daemon runs other daemons on demand when they are required. This helps conserve system resources by not running unneeded daemons until they are required. The way it achieves this is by listening for incoming port requests that it has specific knowledge of and launches the required daemon to service the incoming request. This includes vmware-serverd, vmware-ccagent (Virtual Center), and when starting Remote Console sessions. The vmware-serverd daemon interacts with the MUI, while vmware-ccagent interacts with the MUI and Virtual Center (VC) if ESX Host is managed by VC.

Designing & Planning…
Protocol Configuration

Depending on how your network infrastructure is set up, you may need to change the default configuration of ESX Server to meet the requirements of your organization.


S91httpd.vmware script starts the MUI Web server. The MUI server uses the Apache Web server to service MUI sessions. The Web server then communicates with vmware-serverd or vmware-ccagent (Virtual Center) to retrieve the required information from ESX Server.

Designing & Planning…
Remote Console Port (vmware-authd)

By default, the VMware Remote Console application uses Port 902. If this port is already in use by another application within your environment, you may wish to change the default port address. To do so, edit /etc/init.d/xinetd.d/vmwareauthd and change the port = 902 line to the new port address. Next, restart the xinetd daemon using the following command: killall USR2 xinetd. Afterward, edit /etc/vmware/config and edit the authd.client.port line by changing 902 to the new port address.





Virtualization With VMware ESX Server
Configuring VMware ESX Server 2.5 (Vol 1)
ISBN: 1597490199
EAN: 2147483647
Year: 2005
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net