This blog is about the silent installation of Red Hat Enterprise Virtualization - Hypervisor 6.4 (RHEV Hypervisor) using DTK. It covers silent installation in both BIOS and UEFI modes.

I.   Prerequisites

  • DTK ELI 4.3 or later
  • RHEV-Hypervisor 6.4 ISO image
  • Dell PowerEdge server 
  • Linux OS host system (for image preparation and creating NFS share)

II.  Preparing RHEV-H image

  • Extract (mount and copy) the contents of RHEV ISO image into a directory (for example,/tmp/rhev/) on a Linux host machine.
    • Example to mount from a command line:
      • #mount –o loop /path/to/rhev.iso /mnt/path/location/
  • From command line, go to /tmp/rhev/LiveOS and execute the script livecd-iso-to-pxeboot.sh with iso image path as input parameter.
                              #livecd-iso-to-pxeboot.sh /path/to/rhevh.iso
  • The above execution creates the tftpboot directory (in current path) with following contents: vmlinuz0, initrd0.img, pxelinux.cfg and pxelinux.0
  • Create a NFS share in host system (see Appendix for help)
  • For both BIOS and UEFI mode deployment, copy vmlinuz0 and  initrd0.img (from tftpboot directory) into NFS share
  • For UEFI mode deployment, additionally two more files needs to be copied. Copy BOOTX64.efi and splash.xpm.gz (from /tmp/rhev/EFI/BOOT/) into NFS share

III. Procedure For RHEV-H Deployment

  • Boot server with DTK ELI 4.3 or later
  • Using Raidcfg, create a virtual disk on which hypervisor will be installed.
    • Example to create a virtual disk (RAID 0) of default size:
      • #raidcfg -ctrl -ac=cvd -c=<Ctrl ID> -ad=<Array Disk>
    • The above command results in creation of virtual disk designated by /dev/sdX (where X=a/b/c...)

A.  BIOS Mode Deployment

1.    Modify partcfg.sh (in /opt/dell/toolkit/template/scripts)
       a. Utility partition is not required, so set it to OFF i.e., in BIOS section, set DT_PARTN_UP=OFF
       b. set DT_DP_SIZE=300
2.    Execute modified partcfg.sh which will create a temporary MBR partition. This partition can be used to store RHEV-H contents required during installation
3.    Mount the RHEV-H NFS share to /tmp/os_src
4.    Export the following variables which are used by ‘lininst.sh’  
       a. DT_HD : The variable which denotes the drive where OS will be installed 
           Example: #export DT_HD = /dev/sdX
       b. DT_OS_SRC : The variable which denotes the mount point of RHEV-H source
           Example: #export DT_OS_SRC=/tmp/os_src
5.    Modify lininst.sh (inside /opt/dell/toolkit/template/scripts)
6.    Modify the bios section as follows:
        a. Comment kernel, initrd and ks.cfg check block
        b. Comment kernel, initrd and ks.cfg copy block
        c. Modify the grub.conf block as follows

default=0
timeout=10
title RHEV Hypervisor install
            
kernel /vmlinuz0 root=live:/XYZ.iso rootfstype=auto :linux storage_init=/dev/sdX storage_vol=::::: local_boot BOOTIF=eth0 adminpw=<hash value of password>
           
initrd /initrd0.img              

  • Note 1 – In root=live:/XYZ, replace XYZ with the name of the RHEV-H iso
  • Note 2 - vmlinuz0 and initrd0.img are kernel and initrd of RHEV-H present in tftpboot directory
  • Note 3 – Kernel arguments:
    a.  storage_init=/dev/sdX, denotes the virtual disk on which RHEV-H has to be installed.
    b.  storage_vol=::::: creates default partitions’ sizes
    c.  'local_boot' formats 'storage_init' before installation
    d.  BOOTIF=eth0 denotes the network port to be used
    e.  adminpw=<hash value of password> denotes the default administrator login password
  • Note 4 – For additional information or kernel arguments please see RHEV-H Installation Guide.
  • Note 5 - Hash value of admin password (on any Linux system) is calculated using the following command:
          #openssl passwd -1

7.    Mount /dev/sdX1 (partition created after partcfg.sh) and copy the vmlinuz0 and initrd0.img from NFS share to this mount.
              mount command example: #mount /dev/sdX1 /mnt
8.    Execute modified lininst.sh, which will install grub in /dev/sdX1 and reboots the system.
9.    After reboot, grub screen prompt is displayed and it chooses the ‘RHEV Hypervisor install’ option
10. RHEV-H installation will proceed on /dev/sdX without any manual intervention
11.  After installation, login as admin and change the admin password

B.  UEFI Mode Deployment

1.   Set DT_DP_SIZE_GPT=300
2.   Execute modified partcfg.sh which will create a temporary GPT partition to store rhev-h image contents present in NFS share.
3.   Mount the RHEV-H NFS share to /tmp/os_src. 
4.   Export the following variables used by ‘lininst.sh’ 
      a.  DT_HD : The variable which denotes the drive where OS will be installed
               Example: export DT_HD = /dev/sdX
      b.  DT_OS_SRC : The variable which denotes the mount point of RHEV-H source
               Example: export DT_OS_SRC=/tmp/os_src
5.   Mount /dev/sdX1 and copy the vmlinuz0, initrd0.img and EFI directory present in NFS share to this mount point.
6.   Create a file named BOOTX64.conf with the following text and copy to /dev/sdX1 in the EFI/BOOT/ directory.

default=0
timeout=10
title RHEV Hypervisor install
            kernel  /vmlinuz0 root=live:/XYZ.iso rootfstype=auto :linux storage_init=/dev/sdX storage_vol=::::: local_boot BOOTIF=eth0 adminpw=<hash value of password>
           
initrd   /initrd0.img 

  • Note 1 – In root=live:/XYZ, replace XYZ with the name of the RHEV-H iso
  • Note 2 - vmlinuz0 and initrd0.img are kernel and initrd of RHEV-H present in tftpboot directory
  • Note 3 – Kernel arguments:
    a.  storage_init=/dev/sdX, denotes the virtual disk on which RHEV-H has to be installed.
    b.  storage_vol=::::: creates default partitions’ sizes
    c.  'local_boot' formats 'storage_init' before installation
    d.  BOOTIF=eth0 denotes the network port to be used
    e.  adminpw=<hash value of password> denotes the default administrator login password
  • Note 4 – For additional information or kernel arguments please refer to RHEV-H installation guide.
  • Note 5 - Hash value of admin password (on any linux system) is calculated using following command:
           #openssl passwd -1

7.   Create an entry in UEFI firmware using the following command:
                    # efibootmgr --create --gpt --disk /dev/sdX  --part 1 --write-signature --label "RHEV Hypervisor" --loader "\\EFI\\BOOT\\BOOTX64.efi"

8.   After reboot, grub screen prompt is displayed and it chooses the ‘RHEV Hypervisor install’ option
9.   RHEV-H installation will proceed on /dev/sdX without any manual intervention (the temporary partition will be removed during installation process)
10. After installation, login as admin and change the admin password

IV.  Appendix

NFS share creation on a host Linux machine (as a root):

1.  Create a folder say /rhev_nfs
2.  Open /etc/exports/
3.  Add the below line in /etc/exports/ and save it
               /rhev_nfs *(rw,async,no_root_squash)
4.  Restart the nfs share by using below command
              #service nfs restart