Product SiteDocumentation Site

Chapter 7. Installing the Red Hat Enterprise Virtualization Hypervisor

7.1. Installation Media
7.1.1. Preparation Instructions
7.1.2. Preparing a Hypervisor USB Storage Device
7.1.3. Preparing a Hypervisor from a CD-ROM or DVD
7.2. Installation
7.2.1. Interactive Installation
7.3. Configuration
7.3.1. Logging In
7.3.2. Status
7.3.3. Network
7.3.4. Security
7.3.5. Logging
7.3.6. Kernel Dump
7.3.7. Remote Storage
7.3.8. RHEV-M
7.3.9. Red Hat Network
7.4. Using the Hypervisor
This chapter covers installing and integrating Red Hat Enterprise Virtualization Hypervisors with a Red Hat Enterprise Virtualization Manager.

Important — DNS Configuration

The Red Hat Enterprise Virtualization Hypervisor must exist in the same DNS domain as the Red Hat Enterprise Virtualization Manager.

Note — Automated Installations

Red Hat Enterprise Virtualization Hypervisor installations can be automated or conducted without interaction. This type of installation is only recommended for advanced users. Refer to the Red Hat Enterprise Virtualization — Hypervisor Deployment Guide for more information.

7.1. Installation Media

This section covers creating installation media and preparing your systems before installing a Red Hat Enterprise Virtualization Hypervisor.
This section covers installing Red Hat Enterprise Virtualization Hypervisors on a local storage device. This storage device is a removable USB storage device, an internal hard disk drive or solid state drive. Once the hypervisor is installed, the system will boot the hypervisor and all configuration data is preserved on the system.

7.1.1. Preparation Instructions

The rhev-hypervisor package is needed for installation of hypervisors. The rhev-hypervisor package contains the hypervisor CD-ROM image. The following procedure installs the rhev-hypervisor package.
Releases of Red Hat Enterprise Virtualization Hypervisor are distributed using the Red Hat Enterprise Virtualization Hypervisor (v.6 x86_64) channel, also referred to by the identifier rhel-x86_64-server-6-rhevh in Red Hat Network.
Downloading and Installing the RPM Package
The Red Hat Enterprise Virtualization Hypervisor channel contains additional tools for USB and PXE installations in the rhev-hypervisor-tools package, which is a dependency for the rhev-hypervisor.

Note

Red Hat Enterprise Linux 6.2 and later allows more than one version of the hypervisor ISO image to be installed at one time. As such, rhev-hypervisor.iso is now a symbolic link to a uniquely-named version of the hypervisor ISO image, such as /usr/share/rhev-hypervisor/rhevh-6.2-20111006.0.el6.iso. Different versions of the hypervisor ISO can be installed alongside each other, allowing administrators to run and maintain a cluster on a previous version of the hypervisor while upgrading another cluster for testing.
  1. Log in to the system on which the Red Hat Enterprise Virtualization Manager is installed. You must log in as the root user.
  2. Subscribe the machine to the RHN channel using the rhn-channel command.
    # rhn-channel --add --channel=rhel-x86_64-server-6-rhevh
  3. Use yum to install the rhev-hypervisor and rhev-hypervisor-tools packages.
    # yum install "rhev-hypervisor*"
Result:
The hypervisor ISO image is installed into the /usr/share/rhev-hypervisor/ directory. The symbolic link /usr/share/rhev-hypervisor/rhev-hypervisor.iso is updated to point to the ISO image.
The rhevh-iso-to-disk and rhevh-iso-to-pxeboot scripts are installed to the /usr/bin directory.
BIOS Settings and Boot Process Troubleshooting
Before installing Red Hat Enterprise Virtualization Hypervisors it is necessary to verify the BIOS is correctly configured for the chosen installation method. Many motherboard and PC manufacturers disable different booting methods in the BIOS. Most BIOS chips boot from the following devices in order:
  1. 3.5 inch diskette
  2. CD-ROM or DVD device
  3. Local hard disk
Many BIOS chips have disabled one or more of the following boot methods: USB storage devices, CD-ROMs, DVDs or network boot. To boot from your chosen method, enable the method or device and set that device as the first boot device in BIOS.
Most but not all motherboards support the boot methods described in this chapter. Consult the documentation for your motherboard or system to determine whether it is possible to use a particular boot method.

Warning — BIOS Settings Vary Between Manufacturers

BIOS settings vary between manufacturers. Any specific examples of BIOS settings may be inaccurate for some systems. Due to this inconsistency, it is necessary to review the motherboard or system manufacturer's documentation.
Confirm Hardware Virtualization Support
Verify that your system is capable of running the Red Hat Enterprise Virtualization Hypervisor. Hypervisors require that virtualization extensions are present and enabled in the BIOS before installation proceeds.
  1. Boot the hypervisor from removable media. For example, a USB stick or CD-ROM.
  2. When the message Automatic boot in 30 seconds... is displayed, and begins counting down from thirty, press any key to skip the automatic boot process.
  3. Ensure the Install or Upgrade option is selected and press Tab to edit the boot parameters.
  4. Add the rescue parameter to the list of boot parameters shown on the screen, then press Enter. This action will boot the hypervisor in rescue mode.
  5. Once the hypervisor boots, verify your CPU contains the virtualization extensions with the following command:
    # grep -E 'svm|vmx' /proc/cpuinfo
    
    Output displays if the processor has the hardware virtualization extensions.
  6. Verify that the KVM modules load by default:
    # lsmod | grep kvm
    
Result:
If the output includes kvm_intel or kvm_amd then the kvm hardware virtualization modules are loaded and the system meets the requirements. If the output does not include the required modules then you must check that your hardware supports the virtualization extensions and that they are enabled in the system's BIOS.

7.1.2. Preparing a Hypervisor USB Storage Device

The hypervisor is able to install itself onto USB storage devices or solid state disks. However, the initial boot/install USB device must be a separate device from the installation target. Network booting with PXE and tftp provides the greatest flexibility and scalability. For environments where network restrictions prevent network booting, or for systems without PXE capable network interface cards, a local media installation such as CD-ROM or USB is necessary. Booting from USB storage devices is a useful alternative to booting from CD, for systems without CD-ROM drives.

Note — USB Boot Support

Not all systems support booting from a USB storage device. Ensure that your system's BIOS supports booting from USB storage devices before proceeding.

7.1.2.1. Making a USB Storage Device into a Hypervisor Boot Device

This section covers making USB storage devices which are able to be used to boot hypervisors.
7.1.2.1.1. Using rhevh-iso-to-disk to Create USB Install Media
The rhevh-iso-to-disk command will install a hypervisor onto a USB storage device. The rhevh-iso-to-disk command is part of the rhev-hypervisor package. Devices created with this command are able to boot the hypervisors on systems which support booting via USB.
The basic rhevh-iso-to-disk command usage follows this structure:
# rhevh-iso-to-disk image device
Where the device parameter is the partition name of the USB storage device to install to. The image parameter is a ISO image of the hypervisor. The default hypervisor image location is /usr/share/rhev-hypervisor/rhev-hypervisor.iso. The rhevh-iso-to-disk command requires devices to be formatted with the FAT or EXT3 file system.

Note — Partitions and rhevh-iso-to-disk

rhevh-iso-to-disk uses a FAT or EXT3 formatted partition or block device.
USB storage devices are sometimes formatted without a partition table, use /dev/sdb or similar device name.
When a USB storage device is formatted with a partition table, use /dev/sdb1 or similar device name.
  1. Install the rhev-hypervisor package. Refer to Downloading and Installing the RPM Package
  2. Use the rhevh-iso-to-disk command to copy the .iso file to the disk. The --format parameter formats the disk. The --reset-mbr initializes the Master Boot Record (MBR). The example uses a USB storage device named /dev/sdc.
    Example 7.1. Use of rhevh-iso-to-disk
    # rhevh-iso-to-disk --format --reset-mbr /usr/share/rhev-hypervisor/rhev-hypervisor.iso /dev/sdc
    Verifying image...
    /usr/share/rhev-hypervisor/rhev-hypervisor.iso:   eccc12a0530b9f22e5ba62b848922309
    Fragment sums: 8688f5473e9c176a73f7a37499358557e6c397c9ce2dafb5eca5498fb586
    Fragment count: 20
    Checking: 100.0%
    
    The media check is complete, the result is: PASS.
    
    It is OK to use this media.
    Copying live image to USB stick
    Updating boot config file
    Installing boot loader
    syslinux: only 512-byte sectors are supported
    USB stick set up as live image!
    

Result:
The USB storage device (/dev/sdc) is ready to be used to boot a system and install the hypervisor on it.
7.1.2.1.2. Using dd to Create USB Install Media
The dd command can also be used to install a hypervisor onto a USB storage device. Media created with the command can boot the hypervisor on systems which support booting via USB. Red Hat Enterprise Linux provides dd as part of the coreutils package. Versions of dd are also available on a wide variety of Linux and Unix operating systems.
Windows users are able to obtain the dd command through installation of Red Hat Cygwin, a free Linux-like environment for Windows. Refer to Procedure 7.2, “Using dd to Create USB Install Media on Systems Running Windows” for instruction on the installation and use of Red Hat Cygwin to install the hypervisor to a USB storage device.
The basic dd command usage follows this structure:
# dd if=image of=device
Where the device parameter is the device name of the USB storage device to install to. The image parameter is a ISO image of the hypervisor. The default hypervisor image location is /usr/share/rhev-hypervisor/rhev-hypervisor.iso. The dd command does not make assumptions as to the format of the device as it performs a low-level copy of the raw data in the selected image.
Procedure 7.1. Using dd to Create USB Install Media
  1. Install the rhev-hypervisor package. Refer to Downloading and Installing the RPM Package
  2. Use the dd command to copy the .iso file to the disk. The example uses a USB storage device named /dev/sdc.
    Example 7.2. Use of dd
    # dd if=/usr/share/rhev-hypervisor/rhev-hypervisor.iso of=/dev/sdc
    243712+0 records in
    243712+0 records out
    124780544 bytes (125 MB) copied, 56.3009 s, 2.2 MB/s
    

    Warning — All Data on the Device Specified Will be Overwritten

    The dd command will overwrite all data on the device specified for the of parameter. Any existing data on the device will be destroyed. Ensure that the correct device is specified and that it contains no valuable data before invocation of the dd command.
Result:
The USB storage device (/dev/sdc) is ready to boot a hypervisor.
Procedure 7.2. Using dd to Create USB Install Media on Systems Running Windows
  1. Access http://www.redhat.com/services/custom/cygwin/ and click the Red Hat Cygwin official installation utility link. The rhsetup.exe executable will download.
  2. As the Administrator user run the downloaded rhsetup.exe executable. The Red Hat Cygwin installer will display.
  3. Follow the prompts to complete a standard installation of Red Hat Cygwin. The Coreutils package within the Base package group provides the dd utility. This is automatically selected for installation.
  4. Copy the rhev-hypervisor.iso file downloaded from Red Hat Network to C:\rhev-hypervisor.iso.
  5. As the Administrator user run Red Hat Cygwin from the desktop. A terminal window will appear.

    Important — Run Red Hat Cygwin as Administrator

    On the Windows 7 and Windows Server 2008 platforms it is necessary to right click the Red Hat Cygwin icon and select the Run as Administrator... option to ensure the application runs with the correct permissions.
  6. In the terminal run cat /proc/partitions to see the drives and partitions currently visible to the system.
    Example 7.3. View of Disk Partitions Attached to System
    Administrator@test /
    $ cat /proc/partitions
    major minor  #blocks  name
        8     0  15728640 sda
        8     1    102400 sda1
        8     2  15624192 sda2
    

  7. Plug the USB storage device which is to be used as the media for the hypervisor installation into the system. Re-run the cat /proc/partitions command and compare the output to that of the previous run. A new entry will appear which designates the USB storage device.
    Example 7.4. View of Disk Partitions Attached to System
    Administrator@test /
    $ cat /proc/partitions
    major minor  #blocks  name
        8     0  15728640 sda
        8     1    102400 sda1
        8     2  15624192 sda2
        8    16    524288 sdb
    

  8. Use the dd command to copy the rhev-hypervisor.iso file to the disk. The example uses a USB storage device named /dev/sdb. Replace sdb with the correct device name for the USB storage device to be used.
    Example 7.5. Use of dd Command Under Red Hat Cygwin
    Administrator@test /
    $ dd if=/cygdrive/c/rhev-hypervisor.iso of=/dev/sdb& pid=$!
    

    The provided command starts the transfer in the background and saves the process identifier so that it can be used to monitor the progress of the transfer. Refer to the next step for the command used to check the progress of the transfer.

    Warning — All Data on the Device Specified will be Overwritten

    The dd command will overwrite all data on the device specified for the of parameter. Any existing data on the device will be destroyed. Ensure that the correct device is specified and that it contains no valuable data before invocation of the dd command.
  9. Transfer of the ISO file to the USB storage device with the version of dd included with Red Hat Cygwin can take significantly longer than the equivalent on other platforms.
    To check the progress of the transfer in the same terminal window that the process was started in send it the USR1 signal. This can be achieved by issuing the kill in the terminal window as follows:
    kill -USR1 $pid
  10. When the transfer operation completes the final record counts will be displayed.
    Example 7.6. Result of dd Initiated Copy
    210944+0 records in
    210944+0 records out
    108003328 bytes (108 MB) copied, 2035.82 s, 53.1 kB/s
    
    [1]+	Done			dd if=/cygdrive/c/rhev-hypervisor.iso of=/dev/sdb
    

Result:
The USB storage device (/dev/sdb) is ready to boot a hypervisor.

7.1.2.2. Booting a Hypervisor USB Storage Device

Booting a hypervisor from a USB storage device is similar to booting other live USB operating systems. To boot from a USB storage device:
  1. Enter the system's BIOS menu to enable USB storage device booting if not already enabled.
    1. Enable USB booting if this feature is disabled.
    2. Set booting USB storage devices to be first boot device.
    3. Shut down the system.
  2. Insert the USB storage device that contains the hypervisor boot image.
  3. Restart the system.
Result:
The hypervisor will boot automatically.
If the hypervisor is running, you must now initialize the local storage device. Refer to Section 7.2.1.1, “Booting from the Installation Media” for details.

7.1.3. Preparing a Hypervisor from a CD-ROM or DVD

It is possible to install the hypervisor with a CD-ROM or DVD.

7.1.3.1. Making a Hypervisor CD-ROM Boot Disk

Burn the hypervisor image to a CD-ROM with the cdrecord command. The cdrecord command is part of the cdrecord package which is installed on Red Hat Enterprise Linux by default.
  1. Verify that the cdrecord package is installed on the system.
    Example 7.7. Verify Installation of cdrecord Package
    # rpm -q cdrecord
    cdrecord-2.01-10.7.el5
    

    If the package version is in the output the package is available.
    If it is not listed, install cdrecord:
    # yum install cdrecord
    
  2. Insert a blank CD-ROM or DVD into your CD or DVD writer.
  3. Record the ISO file to the disc. The cdrecord command uses the following:
    cdrecord dev=device /iso/file/path/
    This example uses the first CD-RW (/dev/cdrw) device available and the default hypervisor image location, /usr/share/rhev-hypervisor/rhev-hypervisor.iso.
    Example 7.8. Use of cdrecord Command
    # cdrecord dev=/dev/cdrw /usr/share/rhev-hypervisor/rhev-hypervisor.iso
    

Result:
If no errors occurred, the hypervisor is ready to boot. Errors sometimes occur during the recording process due to errors on the media itself. If this occurs insert another writable disk and repeat the command above.
The hypervisor uses a program (isomd5sum) to verify the integrity of the installation media every time the hypervisor is booted. If media errors are reported in the boot sequence you have a bad CD-ROM. Follow the procedure above to create a new CD-ROM or DVD.

7.1.3.2. Booting a Hypervisor CD-ROM

For many systems, the default BIOS configuration boots from CD-ROM first. If booting from CD-ROM is disabled or is not the first boot device refer to BIOS Settings and Boot Process Troubleshooting and your manufacturers manuals for more information.
To boot from CD-ROM insert the hypervisor CD-ROM and then restart the computer.
The hypervisor will start to boot. If the hypervisor does not start to boot your BIOS may not be configured to boot from CD-ROM first or booting from CD-ROM may be disabled.
If the hypervisor is running, you must now initialize the local storage device. Refer to Section 7.2.1.1, “Booting from the Installation Media” for details.