Product SiteDocumentation Site

3.2. Deploying Hypervisors with PXE and tftp

This section covers installing Hypervisors over a network with PXE and tftp. Configuring the DHCP and tftp servers for PXE booting is outside the scope of this book.
  1. Install the rhev-hypervisor package. Refer to Downloading and Installing the RPM Package
  2. Create vmlinuz and initrd images with rhevh-iso-to-pxeboot:
    # rhevh-iso-to-pxeboot /usr/share/rhev-hypervisor/rhev-hypervisor.iso
    
    Your pxeboot image is complete.
    
    Copy tftpboot/ subdirectory to /tftpboot or a subdirectory of /tftpboot.
    Set up your DHCP, TFTP and PXE server to serve /tftpboot/.../pxeboot.0
    
    Note: The initrd image contains the whole CD ISO and is consequently
    very large.  You will notice when pxebooting that initrd can take a
    long time to download.  This is normal behaviour.
    
  3. The output of rhevh-iso-to-pxeboot command is a directory called tftpboot that has the following files in it:
    • pxelinux.0
    • pxelinux.cfg/default
    • vmlinuz0
    • initrd0.img
  4. It is possible to import the vmlinuz and initrd files into PXE and tftp servers.
    Import the files to the appropriate directory.
  5. The pxelinux.cfg/default file provides a template for configuring the PXE server to export the Hypervisor image:
    DEFAULT pxeboot
    TIMEOUT 20
    PROMPT 0
    LABEL pxeboot
    KERNEL vmlinuz0
           APPEND rootflags=loop initrd=initrd0.img 
                  root=live:/rhev-hypervisor.iso 
                  rootfstype=auto ro liveimg nomodeset 
                  check rootflags=ro 
                  crashkernel=512M-2G:64M,2G-:128M 
                  elevator=deadline processor.max_cstate=1 
                  install rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM
    ONERROR LOCALBOOT 0
    
    PXE booted Hypervisors rely on the PXE server passing the MAC address of the PXE interface to the kernel. This is provided by using the IPAPPEND 2 parameter.
    Modify the templates as required for your environment.

Important — Value of root Must Match ISO Name

The root=live:/rhev-hypervisor.iso parameter in pxelinux.cfg/default is a default value. If the ISO file you are using has a name other than rhev-hypervisor.iso it must be passed when calling rhevh-iso-to-pxeboot. For example, for the ISO file rhev_hypervisor_6_2.iso use the command rhevh-iso-to-pxeboot rhev_hypervisor_6_2.iso. This will produce the correct parameter root=live:/rhev_hypervisor_6_2.iso in pxelinux.cfg/default.

3.2.1. Booting a Hypervisor with PXE

For network booting the network interface card must support PXE booting.
To boot a Hypervisor from a PXE server:
  1. Enter your system's BIOS. On most systems, the key or combination of keys is prompted shortly after the system has power. Usually, this key is delete, F1 or F2.
  2. Enable network booting if network booting is disabled.
  3. Set the network interface card as the first boot device.
  4. Boot the system. If the PXE parameters are configured correctly an automated installation will begin.
  5. Change or disable network booting after the Hypervisor is installed. This is to avoid overwriting the installation on each reboot (unless this is desired functionality) and to prevent certain security vulnerabilities.

Important — PXE Boot Interface

The network interface used for PXE boot installation must be same interface used to connect to the Manager.

Note — Kernel Parameters

For more information on the kernel parameters, refer to Section 4.2, “Automated Installation”.
The Hypervisor is now be installed.