Este contenido no está disponible en el idioma seleccionado.
5.2. RHEV Hypervisor Kernel Parameters and Automated Installation
This section covers the kernel command line parameters for RHEV Hypervisors. These parameters can be used to automate installation. The parameters are described in detail and an example is provided for an automated installation.
This installation method is an alternative to the interactive installation covered by Section 5.1.2, “The RHEV Hypervisor Configuration Menu”. Using the method covered in this chapter with a PXE server can, with some configuration, deploy multiple RHEV Hypervisors without manually accessing the systems.
It is important to understand how the parameters work and what effects they have before attempting automated deployments. These parameters can delete data from existing systems if the system is configured to automatically boot with PXE.
5.2.1. How the kernel arguments work
Below is a description of the RHEV Hypervisor start up sequence. This may be useful for debugging issues with automated installation.
- The
ovirt-early
script sets storage, network and management parameters in the/etc/default/ovirt
file. These parameters are determined from the kernel arguments passed to the Hypervisor during the boot sequence. - The
/etc/init.d/ovirt-firstboot
script executes special RHEV scripts and start up procedures. - An automated installation begins if all the required parameters are set.
5.2.2. Required parameters
At a minimum, the following parameters are required for an automated installation:
storage_init
to initialize a local storage device.BOOTIF
to specify the network interface which the Hypervisor uses to connect to the Manager. When using PXE boot,BOOTIF
may be automatically supplied by pxelinux.management_server
to specify the Manager server.
5.2.3. Storage parameters
The following parameters configure local storage devices for installing a RHEV Hypervisor.
5.2.3.1. storage_init
The
storage_init
parameter is required for an automated installation.
The
storage_init
parameter initializes a local storage device. Presently, RHEV Hypervisors use one storage device for local installation. There are four methods for defining which disk to initialize and install on.
- For USB storage devices, use the
usb
parameter to select disk type, as reported byudev ID_BUS
. Optionally, append a serial number to explicitly define which device to use. For example:storage_init=usb:
Generic_STORAGE_DEVICE_0000145418-0:0
- For SCSI hard drives, use
storage_init=scsi:
serialnumber
. Optionally, append a serial number to explicitly define which device to use. For example:storage_init=scsi:SCSI_HITACHI_HTS5416_SBADDFF
- For CCISS devices, use
storage_init=cciss:
serialnumber
. Optionally, append a serial number to explicitly define which device to use. For example:storage_init=cciss:3600508b100104a3953545233304c0003
- Alternatively, the storage device can be specified by using the Linux device name as the
storage_init
parameter. Using device names in the format /dev/disk/by-id is not supported.storage_init
must use the format /dev/mapper/$DISK or /dev/$DISK. In this example the/dev/sda
device is specified:storage_init=/dev/sda
Note that these device names are not guaranteed to refer to the same device every time the system boots.
Note
Serial numbers can be found with this script. The script lists serial numbers for all disks attached to the system.
for d in /dev/sd?; do eval $(udevinfo -q env -n $d); echo $d $ID_SERIAL;done
5.2.3.2. storage_vol
The
storage_vol
parameter is used to partition the storage device set by the storage_init
parameter.
After
storage_vol=
there are six values separated by colons.
Values can be left undefined. If a value is not defined the installation will use the default value. The first and third values represent the boot and root partitions respectively, which have fixed sizes. These values cannot be set and should be left undefined.
All values are in megabytes (MB). Do not append units onto the end of the values.
Setting a size value of
-1
sets the partition to take up all remaining disk space. Note that this can only be used with the Data partition.
The following is the standard format of the
storage_vol
parameter with each element described in the list below.
Example 5.5. Format of the storage_vol parameter
storage_vol=:SWAP::CONFIG:LOGGING:DATA
SWAP
- The swap partition is used for swapping underused memory to the hard drive to speed up memory performance. The default size of the swap partition is calculated from amount of RAM and overcommit ratio (default is 0.5). RHEV Hypervisors must have a swap partition and the swap partition cannot be disabled by setting its size to 0. The minimum size for the swap partition is 5MB.Red Hat Knowledgebase has an article on determining the size of the swap partition.Use the formula from the Red Hat Knowledgebase and add storage for the overcommit ratio (RAM multiplied by the overcommit ratio).
Recommended swap + (RAM * overcommit) = swap partition size
Leaving the value empty sets a recommended value for the swap partition. CONFIG
- The config partition stores configuration files for the Hypervisor. The default and minimum size for the configuration partition is 5MB.
LOGGING
- The logging partition stores all logs for the Hypervisor. The logging partition is required and the recommended size is 2048MB.
DATA
- The data partition must be large enough to hold core files for KVM. Core files depend on the RAM size for the virtual machine. The data partition must also be large enough to store kernel dump files, also known as kdumps. A kdump file is usually the same size the host's system RAM. The data partition also stores the RHEV Hypervisor ISO file for RHEV Hypervisor upgrades.The data partition should be at least 1.5x as large as the RAM on the host system plus an additional 512MB in size. The minimum size is 256MB.The default size for the data partition is the remaining available disk space (labeled as -1).
Example 5.6. Example: Using the storage_vol parameter to partition default sizes
storage_vol=:::::
Example 5.7. Example: Using the storage_vol parameter to partition certain sizes sizes
We want to set the
storage_vol
parameter such that the following are true:
- The Boot partition is defined as the fixed size of 50MB.
- The Swap partition is defined as 4000MB.
- The Root partition is defined as the fixed size of 512MB.
- The Config partition is defined as 5MB.
- The Logging partition is defined as 2048MB.
- The Data partition is defined to take up all remaining disk space.
Therefore, the
storage_vol
parameter will look like this:
storage_vol=:4000::5:2048:-1
5.2.4. Networking and RHEV Manager parameters
Several networking options are available. The following information must be appended for the Hypervisor to automatically install:
- Setting the IP address or DHCP.
- Setting the hostname if the hostname is not resolved with DHCP.
- The interface the RHEV Manager network is attached to.
Networking and RHEV Manager parameters
BOOTIF
- Required for automated installations.
BOOTIF
specifies the network interface that the Hypervisor uses to connect to the RHEV Manager. It takes arguments in one of three forms:link
- Indicates to use the first interface (as enumerated by the kernel) with an active link. This is useful for systems with multiple network interface controllers but only one plugged in.
eth#
(where#
is the number of the NIC)- Indicates to use the NIC as determined by the kernel driver initialization order. To determine the number boot into RHEV and select Shell from the Hypervisor Configuration Menu. Use
ifconfig | grep eth*
to list the network interfaces attached to the system. There is no guarantee that on the next reboot the network interface controller will have the sameeth#
mapping.BOOTIF=eth0
<MAC>
- Indicates to use the MAC address explicitly defined inside the brackets.
Important
When using PXE to boot Hypervisors for installation using theIPAPPEND 2
directive causesBOOTIF=<MAC>
to be automatically appended to the kernel arguments. If you use the IPAPPEND 2 directive you do not need to use theBOOTIF
parameter. ip
- Sets the IP address for the network interface controller defined by the
BOOTIF
parameter. Theip
parameter accepts either an IP address (in the form 0.0.0.0) or the valuedhcp
(for DHCP).ip=192.168.1.1
ip=dhcp
netmask
- The
netmask
parameter sets the subnet mask for the IP address defined with theip
parameter.netmask=255.255.255.0
gateway
- The
gateway
parameter sets the Internet gateway.gateway=192.168.1.246
dns
- The
dns
parameter sets the addresses of one or more DNS servers. Each DNS server must be separated by a colon.dns=192.168.1.243:192.168.1.244
hostname
- The
hostname
parameter sets the hostname. The hostname must be a fully-qualified and resolvable domain name.hostname=rhev1.example.com
ntp
- The
ntp
parameter sets the addresses of one or more Network Time Protocol servers. Each NTP server must be separated by a colon.ntp=192.168.2.253:192.168.2.254
vlan
- The
vlan
parameter sets the VLAN identifier for the network connected to the RHEV Manager. Set this parameter if you are using VLANs.vlan=
VLAN-ID
5.2.5. Red Hat Network (RHN) parameters
These parameters are used to automatically register the hypervisor host with the Red Hat Network (RHN). At a minimum, either the
rhn_activationkey
or both the rhn_username
and rhn_password
parameters must be provided. If you are registering to a satellite server, you must also provide a value for the rhn_url
parameter.
rhn_username
- The
rhn_username
parameter sets the username used to connect to RHN.rhn_username=testuser
rhn_password
- The
rhn_password
parameter sets the password used to connect to RHN.rhn_password=testpassword
rhn_activationkey
- The
rhn_activationkey
parameter sets the activation key used to connect to RHN. Activation keys are used to register systems, entitle them to an RHN service level, and subscribe them to specific channels and system groups, all in one action. If bothrhn_activationkey
andrhn_username
are provided, therhn_activationkey
value will be used.rhn_activationkey=7202f3b7d218cf59b764f9f6e9fa281b
rhn_url
- The
rhn_url
parameter sets the URL of the satellite server used to register the host.rhn_url=https://your-satellite.example.com
rhn_ca_cert
- The
rhn_ca_cert
parameter sets the URL of the CA certificate used to connect to the satellite server. If it is not provided, the default value isrhn_url
/pub/RHN-ORG-TRUSTED-SSL-CERTrhn_ca_cert=https://your-satellite.example.com/pub/RHN-ORG-TRUSTED-SSL-CERT
rhn_profile
- The
rhn_profile
parameter sets the name of the profile to be registered with RHN for this host. The default value is the system hostname.rhn_profile=testhost
5.2.6. Other parameters
management_server
- The
management_server
parameter is required for an automated installation.Themanagement_server
parameter sets the address of the RHEV Manager. Themanagement_server
parameter takes an IP address or fully qualified domain name and, optionally, a port (the default port is 443). It is required for an automated installation.management_server=rhev.example.com:443
netconsole_server
- The
netconsole_server
parameter sets the address of the RHEV Manager. Thenetconsole_server
parameter takes an IP address or fully qualified domain name and, optionally, a port (the default port is 25285).netconsole_server=rhev.example.com:25285
mem_overcommit
- The
mem_overcommit
parameter specifies the multiplier to use for adding extra swap to support memory overcommit. The default overcommit value is 0.5.mem_overcommit=0.7
firstboot
- The
firstboot
parameter starts the interactive configuration menu. On systems that have a RHEV Hypervisor installed and some systems with LVM volumes, thefirstboot
parameter may be required to trigger the interactive installation. Refer to Section 5.1.2, “The RHEV Hypervisor Configuration Menu” for installation from the configuration menu. upgrade
- The
upgrade
parameter will upgrade the existing hypervisor image to the version provided by the boot media. The hypervisor will be automatically upgraded and rebooted once complete. If a hypervisor image is not yet installed, the image will be installed to the device selected with thestorage_init
parameter. When performing an upgrade, the previous boot entry is saved as BACKUP ingrub.conf
. If the reboot following the upgrade procedure fails, the BACKUP boot entry will be automatically selected as the new default. local_boot
- The
local_boot
parameter is an alias for theupgrade
parameter. nocheck
- The
nocheck
parameter will skip the MD5 check of the installation ISO, which can be time consuming if the media is remote or slow. qemu_pxe
- The
qemu_pxe
parameter is used to select which network bootloader is used in virtual machines. Possible values aregpxe
andetherboot
. For compatibility with RHEV Hypervisor 5.4-2.1, the default value isetherboot
.qemu_pxe=gpxe
5.2.7. Example: Automated RHEV Hypervisor Installation
This example uses the kernel command line parameters for an automated RHEV Hypervisor installation. Ensure you customize the example for your environment as not all installations are the same.
Warning
This example may not work accurately on all systems. Review the descriptions of the parameters above and modify as required for your systems.
The following is a typical example for installing a RHEV Hypervisor with the kernel command line parameters
In this example, the RHEV Manager is located at the hostname:
rhevm.example.com
.
:linux storage_init=/dev/sda storage_vol=::::: local_boot BOOTIF=eth0 management_server=rhevm.example.com netconsole=rhevm.example.com
Note
The kernel parameters can be automatically appended to virtual machines booting over a network with PXE. Automatically installing from PXE is not covered by this guide.