Este conteúdo não está disponível no idioma selecionado.
7.4. Automated Installation of the Hypervisor (Advanced)
This section covers the kernel command line parameters for Red Hat Enterprise Virtualization Hypervisors. These parameters can be used to automate installation. The parameters are described in detail and an example parameter string for an automated installation is provided.
This installation method is an alternative to the interactive installation. Using the method covered in this chapter with a PXE server can, with some configuration, deploy multiple 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.
7.4.1. How the Kernel Arguments Work Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Below is a description of the Red Hat Enterprise Virtualization Hypervisor start up sequence. This may be useful for debugging issues with automated installation.
- The ovirt-early service sets storage, network and management parameters in the
/etc/default/ovirtfile. These parameters are determined from the kernel arguments passed to the Hypervisor during the boot sequence. - The
/etc/init.d/ovirt-firstbootscript determines the type of installation to perform based on the parameters set on the kernel command line or the TUI installation.
7.4.2. Required Parameters Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
At a minimum, the following parameters are required for an installation:
- One of the following parameters, depending on the type of installation or reinstallation that you wish to perform:
install, to begin an installation (even if it detects an existing installation).reinstall, to remove a current installation and begin a completely clean reinstall.upgrade, to upgrade an existing installation.
- The
storage_initparameter, to initialize a local storage device. - The
BOOTIFparameter, to specify the network interface which the Hypervisor uses to connect to the Manager. When using PXE boot,BOOTIFmay be automatically supplied bypxelinux.
These parameters are discussed in further detail in the sections that follow.
If you want to use Red Hat Enterprise Virtualization Hypervisor with Red Hat Enterprise Virtualization Manager, you must also provide at least one of the following parameters:
adminpw- Allows you to log in with administrative privileges to configure Red Hat Enterprise Virtualization Hypervisor.
management_server- Specifies the Red Hat Enterprise Virtualization Manager to be used.
rhevm_admin_password- Specifies the password to be used during the process of adding a host in Red Hat Enterprise Virtualization Manager.
7.4.3. Storage Parameters Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following parameters configure local storage devices for installing a Hypervisor.
storage_init- The
storage_initparameter is required for an automated installation; it initializes a local storage device.Hypervisors use one storage device for local installation. There are several methods for defining which disk to initialize and install on.- For USB storage devices, use the
usbparameter to select the disk type. For example:storage_init=usb
storage_init=usbCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For SCSI hard drives, use the
scsiparameter to select the disk type. For example:storage_init=scsi
storage_init=scsiCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For hard drives on the ATA bus, including SATA hard drives that may also appear on the SCSI bus, use the
ataparameter to select the disk type. For example:storage_init=ata
storage_init=ataCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Alternatively, the storage device can be specified by using the Linux device name as the
storage_initparameter. Using device names in the format/dev/disk/by-idis not supported.storage_initmust use the format/dev/mapper/diskor/dev/disk. In this example the/dev/sdadevice is specified:storage_init=/dev/sda
storage_init=/dev/sdaCopy to Clipboard Copied! Toggle word wrap Toggle overflow
When specifying astorage_initvalue ofusb,scsi, oratayou can also append a serial number to explicitly set which device to use. Determine the serial numbers for all disks attached to the system by running the command in the example below:Example 7.15. Finding
udevSerial Numbersfor d in /dev/sd?; do echo $d `udevadm info -q env -n $d | egrep 'ID_BUS=|ID_SERIAL='`; done /dev/sda ID_SERIAL=ST9500325AS_6VE867X1$ for d in /dev/sd?; do echo $d `udevadm info -q env -n $d | egrep 'ID_BUS=|ID_SERIAL='`; done /dev/sda ID_SERIAL=ST9500325AS_6VE867X1Copy to Clipboard Copied! Toggle word wrap Toggle overflow When providing both a storage type and the serial number, ensure that the two values are separated by a colon (:). For example:storage_init=ata:3600508b100104a3953545233304c0003
storage_init=ata:3600508b100104a3953545233304c0003Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
If reinstalling Red Hat Enterprise Virtualization Hypervisor over an existing instance on a multipathed iSCSI machine, specify the storage type and serial number to avoid installation errors.Note
Consistency of devices names following a system restart is not guaranteed. Device names are liable to change. storage_vol- The
storage_volparameter is used to partition the storage device set by thestorage_initparameter. Afterstorage_vol=, you can specify the size in megabytes of the following partitions: Boot, Swap, Root, Config, Logging, and Data.The Boot partition is always 50 MB and cannot be reconfigured. The Root partition for Red Hat Enterprise Virtualization Hypervisor 7 is always 8600 MB and cannot be reconfigured. The remaining partitions are described in more detail below:Partitions defined by the
storage_volparameterSwap- The swap partition is used for swapping pages of memory that are not frequently accessed to the hard drive. This frees pages of memory in RAM that are in turn used for pages which are accessed more frequently, increasing performance. The default size of the swap partition is calculated based on the amount of RAM installed in the system and over-commit ratio (default is 0.5). 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 8 MB.To determine the size of the swap partition, see https://access.redhat.com/knowledge/solutions/15244.Use the formula from the Red Hat Knowledgebase solution above and add storage for the over-commit ratio (RAM multiplied by the over-commit ratio).
Recommended swap + (RAM * over-commit) = swap partition size
Recommended swap + (RAM * over-commit) = swap partition sizeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Leaving the value empty allows the system to sets the 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 8 MB.
Logging- The logging partition stores all logs for the Hypervisor. The logging partition requires a minimum of 2048 MB storage. However, it is recommended to allocate more storage to the logging partition if resources permit.
Data- The data partition must be large enough to hold core files for KVM. Core files depend on the RAM size for the guests. 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 as the host's system RAM. The data partition also stores the Hypervisor ISO file for Hypervisor upgrades.The data partition requires a minimum of 512 MB storage. The recommended size is at least 1.5 times as large as the RAM on the host system plus an additional 512 MB. It can be configured to take up all remaining space by giving it a size value of
-1, or disabled by giving it a size value of0.
Partitions can be specified in any order. The syntax for specifying each partition issize,type. Each partition specified is separated by a colon (:). To specify a 256MB Swap partition, and a 4096MB Logging partition, the whole parameter isstorage_vol=256,Swap:4096,Logging.Note
The old method of specifying partition sizes is still valid. In the old method, the partition sizes must be given in a particular order, as shown here:storage_vol=BOOT:SWAP:ROOT:CONFIG:LOGGING:DATA
storage_vol=BOOT:SWAP:ROOT:CONFIG:LOGGING:DATACopy to Clipboard Copied! Toggle word wrap Toggle overflow However, since the Boot and Root partitions cannot be reconfigured, sizes for these partitions can be omitted, like so:storage_vol=:SWAP::CONFIG:LOGGING:DATA
storage_vol=:SWAP::CONFIG:LOGGING:DATACopy to Clipboard Copied! Toggle word wrap Toggle overflow If you fail to specify a size, the partition will be created at its default size. To specify a 256MB Swap partition, and a 4096MB Logging partition, the correct syntax is:storage_vol=:256:::4096:
storage_vol=:256:::4096:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following is the standard format of thestorage_volparameter:storage_vol=256,EFI:256,Root:4096,Swap
storage_vol=256,EFI:256,Root:4096,SwapCopy to Clipboard Copied! Toggle word wrap Toggle overflow iscsi_name- The
iscsi_nameparameter is used to set the iSCSI Initiator Name. The iSCSI Initiator name is expected to take the form of an iSCSI Qualified Name (IQN). This format is defined by RFC 3720, which is available at http://tools.ietf.org/html/rfc3720.The IQN is made up of the following elements, separated by the.character:- The literal string
iqn - The date that the naming authority took control of the domain in yyyy-mm format
- The reversed domain name - demo.redhat.com becomes com.redhat.demo
- Optionally, a storage target name as specified by the naming authority - preceded by a colon
Example 7.16.
iscsi_nameThe following illustrates the IQN for an iSCSI initiator attached to the demo.redhat.com domain where the domain was established in July 2011.iscsi_name=iqn.2011-07.com.redhat.demo
iscsi_name=iqn.2011-07.com.redhat.demoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.4.4. Networking Parameters Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Several networking options are available. The following parameters 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 Red Hat Enterprise Virtualization Manager network is attached to.
The following list contains descriptions and usage examples for both optional and mandatory parameters.
Networking Parameters
BOOTIF- The
BOOTIFparameter is required for an automated installation.TheBOOTIFparameter specifies the network interface which the Hypervisor uses to connect to the Red Hat Enterprise Virtualization Manager.Important
When using PXE to boot Hypervisors for installation using theIPAPPEND 2directive causesBOOTIF=<MAC>to be automatically appended to the kernel arguments. If theIPAPPEND 2directive is used it is not necessary to use theBOOTIFparameter.TheBOOTIFparameter 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#- Indicates to use the NIC as determined by the kernel driver initialization order (where
#is the number of the NIC). To determine the number boot the Hypervisor and select Shell from the Hypervisor Configuration Menu. Useifconfig | 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
BOOTIF=eth0Copy to Clipboard Copied! Toggle word wrap Toggle overflow <MAC>- Indicates to use the MAC address explicitly defined inside the brackets.
ip- The
ipparameter sets the IP address for the network interface controller defined by theBOOTIFparameter. Theipparameter accepts either an IP address (in the form 0.0.0.0) ordhcp.ip=192.168.1.1
ip=192.168.1.1Copy to Clipboard Copied! Toggle word wrap Toggle overflow ip=dhcp
ip=dhcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow ipv6- The
ipv6parameter is an alias for theipparameter. It accepts eitherdhcporauto. netmask- The
netmaskparameter sets the subnet mask for the IP address defined with theipparameter.netmask=255.255.255.0
netmask=255.255.255.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow gateway- The
gatewayparameter sets the Internet gateway.gateway=192.168.1.246
gateway=192.168.1.246Copy to Clipboard Copied! Toggle word wrap Toggle overflow dns- The
dnsparameter sets the address of up to two DNS servers. Each DNS server address must be separated by a comma.dns=192.168.1.243,192.168.1.244
dns=192.168.1.243,192.168.1.244Copy to Clipboard Copied! Toggle word wrap Toggle overflow hostname- The
hostnameparameter sets the hostname. The hostname must be a fully-qualified and resolvable domain name.hostname=rhev1.example.com
hostname=rhev1.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow ntp- The
ntpparameter sets the address of one or more Network Time Protocol servers. Each NTP server address must be separated by a comma.ntp=192.168.2.253,192.168.2.254
ntp=192.168.2.253,192.168.2.254Copy to Clipboard Copied! Toggle word wrap Toggle overflow vlan- The
vlanparameter sets the VLAN identifier for the network connected to the Red Hat Enterprise Virtualization Manager. This parameter should be set where VLANs are in use.vlan=vlan-id:
vlan=vlan-id:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:vlan=36:
vlan=36:Copy to Clipboard Copied! Toggle word wrap Toggle overflow bond- The
bondparameter configures a bond. Each interface name must be separated by a comma.BOOTIF=bond01 bond=bond01:nic1,nic2
BOOTIF=bond01 bond=bond01:nic1,nic2Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.4.5. Red Hat Network (RHN) Parameters Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
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. Where registration is to occur against a satellite server, the rhn_url parameter must be provided.
rhn_type- Sets the RHN entitlement method for this machine.
samsets the entitlement method to Certificate-based RHN, which integrates the Customer Portal, content delivery network, and subscription service (subscription management).classicsets the entitlement method to RHN Classic, which uses the traditional channel entitlement model (channel access) to provides a global view of content access but does not provide insight into system-level subscription uses. The default value issam. rhn_username- The
rhn_usernameparameter sets the username used to connect to RHN.rhn_username=testuser
rhn_username=testuserCopy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_password- The
rhn_passwordparameter sets the password used to connect to RHN.rhn_password=testpassword
rhn_password=testpasswordCopy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_activationkey- The
rhn_activationkeyparameter 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_activationkeyandrhn_usernameare provided, therhn_activationkeyvalue will be used.rhn_activationkey=7202f3b7d218cf59b764f9f6e9fa281b
rhn_activationkey=7202f3b7d218cf59b764f9f6e9fa281bCopy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_org- This parameter is used only with SAM. Registers the system to SAM in the same way as
--org org_name --activationkey key_valuewhen combined with therhn_activationkeyparameter on the kernel command line.rhn_org=org_name
rhn_org=org_nameCopy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_url- The
rhn_urlparameter sets the URL of the satellite server used to register the host.rhn_url=https://satellite.example.com
rhn_url=https://satellite.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_ca_cert- The
rhn_ca_certparameter 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-CERT.rhn_ca_cert=https://satellite.example.com/pub/RHN-ORG-TRUSTED-SSL-CERT
rhn_ca_cert=https://satellite.example.com/pub/RHN-ORG-TRUSTED-SSL-CERTCopy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_profile- The
rhn_profileparameter sets the name of the profile to be registered with RHN for this host. The default value is the system hostname.rhn_profile=testhost
rhn_profile=testhostCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.4.6. Authentication Parameters Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
adminpw- The
adminpwparameter is used to set the password for theadminuser. The value provided must already be hashed. All hashing schemes supported by the shadow password mechanism are supported. The recommended way to hash a password for use with this parameter is to run the following command:openssl passwd -1
# openssl passwd -1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Theopensslcommand will prompt for the password to use. A hashed representation of the password will be returned which can be used as theadminpwvalue. rootpw- The
rootpwparameter is used to set a temporaryrootpassword. A password change is forced the first timerootlogs on to the system. The value provided must already be hashed. All hashing schemes supported by the shadow password mechanism are supported. The recommended way to hash a password for use with this parameter is to run the following command:openssl passwd -1
# openssl passwd -1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Theopensslcommand will prompt for the password to use. A hashed representation of the password will be returned which can be used as therootpwvalue.Important
Therootpassword is not set by default and is not supported unless enabled at the request of Red Hat support. rhevm_admin_password- The
rhevm_admin_passwordparameter sets arootpassword and enables SSH password authentication. The value provided must already be hashed. All hashing schemes supported by the shadow password mechanism are supported. The recommended way to hash a password for use with this parameter is to run the following command:openssl passwd -1
# openssl passwd -1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Theopensslcommand will prompt for the password to use. A hashed representation of the password will be returned which can be used as therhevm_admin_passwordvalue.Important
Setting this parameter has the side-effect of enabling SSH password authentication, which is unsupported unless enabled at the request of Red Hat support. We recommend disabling SSH password authentication after initial configuration is complete. ssh_pwauth- The
ssh_pwauthparameter is used to select whether or not password authentication is enabled for SSH connections. Possible values are0(disabled) and1(enabled). The default value is0.ssh_pwauth=1
ssh_pwauth=1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
SSH password authentication is disabled by default and is not supported unless enabled at the request of Red Hat support.
7.4.7. Other Parameters Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
firstboot- The
firstbootparameter indicates that the system should be treated as if there is no existing installation.Thereinstallparameter is a direct alias of thefirstbootparameter, and can be used interchangeably withfirstboot.Warning
Using thefirstbootparameter erases existing data if a disk on the system has a Volume Group namedHostVG. Combining thefirstbootparameter with thestorage_initparameter also erases data on any disks specified withstorage_init. install- The
installparameter indicates that the system should be treated as if there is no existing installation. Theinstallparameter is intended to be used when booting from CD-ROM, DVD, USB, or PXE media. cim_enabled- Enables the use of Common Information Model (CIM) management infrastructure.
cim_passwd- Configures a password for your Common Information Model (CIM) management infrastructure.
disable_aes_ni- Disables the AES-NI encryption instruction set. Possible values are
yorn. kdump_nfs- This parameter configures an NFS server for kdump. The syntax for this parameter is
kdump_nfs=hostname:nfs_share_path, for example,kdump_nfs=nfshost.redhat.com:/path/to/nfs/share. local_boot- The
local_bootparameter is an alias for theupgradeparameter. local_boot_trigger- Sets a target URL to check and disables PXE when installation completes successfully, so that the system boots from disk on subsequent boots.
netconsole- The
netconsoleparameter sets the address of a server to which kernel messages should be logged. Thenetconsoleparameter takes an IP address or fully qualified domain name and, optionally, a port (the default port is 6666).netconsole=rhev.example.com:6666
netconsole=rhev.example.com:6666Copy to Clipboard Copied! Toggle word wrap Toggle overflow nfsv4_domain- The
nfsv4_domainparameter specifies a domain to use for NFSv4. nocheck- The
nocheckparameter will skip the MD5 check of the installation ISO, which might be time consuming if the media is remote or slow. management_server- The
management_serverparameter sets the address of the Red Hat Enterprise Virtualization Manager. Themanagement_serverparameter takes an IP address or fully qualified domain name and, optionally, a port (the default port is 443).management_server=rhev.example.com:443
management_server=rhev.example.com:443Copy to Clipboard Copied! Toggle word wrap Toggle overflow mem_overcommit- The
mem_overcommitparameter specifies the multiplier to use for adding extra swap to support memory over-commit. The default over-commit value is 0.5.mem_overcommit=0.7
mem_overcommit=0.7Copy to Clipboard Copied! Toggle word wrap Toggle overflow qemu_pxe- The
qemu_pxeparameter is used to select which network boot loader is used in virtual machines. Possible values aregpxeandetherboot. .qemu_pxe=gpxe
qemu_pxe=gpxeCopy to Clipboard Copied! Toggle word wrap Toggle overflow reinstall- The
reinstallparameter indicates that the system should be treated as if there is no existing installation.Thefirstbootparameter is a direct alias of thereinstallparameter, and can be used interchangeably withreinstall.Warning
Using thereinstallparameter erases existing data if a disk on the system has a Volume Group namedHostVG. Combining thereinstallparameter with thestorage_initparameter also erases data on any disks specified withstorage_init. snmp_password- Enables and configures a password for the Simple Network Management Protocol.
syslog- Configures an rsyslog server at the address specified. You can also specify a port. The syntax is
syslog=hostname[:port]. upgrade- The
upgradeparameter 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_initparameter. 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. uninstall- The
uninstallparameter removes an existing Red Hat Enterprise Virtualization installation. The host volume group will be removed and the system rebooted.
7.4.8. An Automated Hypervisor Installation Example Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
This example uses the kernel command line parameters for an automated Hypervisor installation.
Important
This example may not work accurately on all systems. The parameter descriptions above should be reviewed and the example modified as appropriate for the systems on which deployment is to occur.
The following is a typical example for installing a Hypervisor with the kernel command line parameters.
In this example, the Manager is located at the hostname:
rhevm.example.com, and the netconsole server is located on the same machine.
:linux storage_init=/dev/sda storage_vol=::::: local_boot BOOTIF=eth0 management_server=rhevm.example.com netconsole=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 guests booting over a network with PXE. Automatically installing from PXE is not covered by this guide.