此内容没有您所选择的语言版本。
5.2. Advanced Installation
5.2.1. Custom Partitioning 复制链接链接已复制到粘贴板!
Custom partitioning on Red Hat Virtualization Host (RHVH) is not recommended. Red Hat strongly recommends using the Automatically configure partitioning option in the Installation Destination window.
If your installation requires custom partitioning, select the I will configure partitioning
option during the installation, and note that the following restrictions apply:
- Ensure the default LVM Thin Provisioning option is selected in the Manual Partitioning window.
- The following directories are required and must be on thin provisioned logical volumes:
-
root (
/
) -
/home
-
/tmp
-
/var
-
/var/log
-
/var/log/audit
Do not create a separate partition for /usr
. Doing so will cause the installation to fail.
/usr
must be on a logical volume that is able to change versions along with RHVH, and therefore should be left on root (/
).
For information about the required storage sizes for each partition, see Section 1.2.3, “Storage Requirements”.
-
The
/boot
directory should be defined as a standard partition. -
The
/var
directory must be on a separate volume or disk. - Only XFS or Ext4 file systems are supported.
Configuring Manual Partitioning in a Kickstart File
The following example demonstrates how to configure manual partitioning in a Kickstart file. See Section 5.2.2, “Automating Red Hat Virtualization Host Deployment” for more information on RHVH Kickstart files.
If you use logvol --thinpool --grow
, you must also include volgroup --reserved-space
or volgroup --reserved-percent
to reserve space in the volume group for the thin pool to grow.
5.2.2. Automating Red Hat Virtualization Host Deployment 复制链接链接已复制到粘贴板!
You can install Red Hat Virtualization Host (RHVH) without a physical media device by booting from a PXE server over the network with a Kickstart file that contains the answers to the installation questions.
General instructions for installing from a PXE server with a Kickstart file are available in the Red Hat Enterprise Linux Installation Guide, as RHVH is installed in much the same way as Red Hat Enterprise Linux. RHVH-specific instructions, with examples for deploying RHVH with Red Hat Satellite, are described below.
The automated RHVH deployment has 3 stages:
5.2.2.1. Preparing the Installation Environment 复制链接链接已复制到粘贴板!
- Log in to the Customer Portal.
- Click Downloads in the menu bar.
- Click Red Hat Virtualization and click Download Latest in the header to go to the product download page.
- Go to Hypervisor Image for RHV 4.2 and click Download Now.
- Make the RHVH ISO image available over the network. See Installation Source on a Network in the Red Hat Enterprise Linux Installation Guide.
Extract the squashfs.img hypervisor image file from the RHVH ISO:
mount -o loop /path/to/RHVH-ISO /mnt/rhvh cp /mnt/rhvh/Packages/redhat-virtualization-host-image-update* /tmp cd /tmp rpm2cpio redhat-virtualization-host-image-update* | cpio -idmv
# mount -o loop /path/to/RHVH-ISO /mnt/rhvh # cp /mnt/rhvh/Packages/redhat-virtualization-host-image-update* /tmp # cd /tmp # rpm2cpio redhat-virtualization-host-image-update* | cpio -idmv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis squashfs.img file, located in the
/tmp/usr/share/redhat-virtualization-host/image/
directory, is called redhat-virtualization-host-version_number_version.squashfs.img. It contains the hypervisor image for installation on the physical machine. It should not be confused with the /LiveOS/squashfs.img file, which is used by the Anacondainst.stage2
option.
5.2.2.2. Configuring the PXE Server and the Boot Loader 复制链接链接已复制到粘贴板!
- Configure the PXE server. See Preparing for a Network Installation in the Red Hat Enterprise Linux Installation Guide.
Copy the RHVH boot images to the
/tftpboot
directory:cp mnt/rhvh/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/
# cp mnt/rhvh/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
rhvh
label specifying the RHVH boot images in the boot loader configuration:LABEL rhvh MENU LABEL Install Red Hat Virtualization Host KERNEL /var/lib/tftpboot/pxelinux/vmlinuz APPEND initrd=/var/lib/tftpboot/pxelinux/initrd.img inst.stage2=URL/to/RHVH-ISO
LABEL rhvh MENU LABEL Install Red Hat Virtualization Host KERNEL /var/lib/tftpboot/pxelinux/vmlinuz APPEND initrd=/var/lib/tftpboot/pxelinux/initrd.img inst.stage2=URL/to/RHVH-ISO
Copy to Clipboard Copied! Toggle word wrap Toggle overflow RHVH Boot Loader Configuration Example for Red Hat Satellite
If you are using information from Red Hat Satellite to provision the host, you must create a global or host group level parameter called
rhvh_image
and populate it with the directory URL where the ISO is mounted or extracted:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Make the content of the RHVH ISO locally available and export it to the network, for example, using an HTTPD server:
cp -a /mnt/rhvh/ /var/www/html/rhvh-install curl URL/to/RHVH-ISO/rhvh-install
# cp -a /mnt/rhvh/ /var/www/html/rhvh-install # curl URL/to/RHVH-ISO/rhvh-install
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2.2.3. Creating and Running a Kickstart File 复制链接链接已复制到粘贴板!
- Create a Kickstart file and make it available over the network. See Kickstart Installations in the Red Hat Enterprise Linux Installation Guide.
Ensure that the Kickstart file meets the following RHV-specific requirements:
The
%packages
section is not required for RHVH. Instead, use theliveimg
option and specify the redhat-virtualization-host-version_number_version.squashfs.img file from the RHVH ISO image:liveimg --url=example.com/tmp/usr/share/redhat-virtualization-host/image/redhat-virtualization-host-version_number_version.squashfs.img
liveimg --url=example.com/tmp/usr/share/redhat-virtualization-host/image/redhat-virtualization-host-version_number_version.squashfs.img
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Autopartitioning is highly recommended:
autopart --type=thinp
autopart --type=thinp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThin provisioning must be used with autopartitioning.
The
--no-home
option does not work in RHVH because/home
is a required directory.If your installation requires manual partitioning, see Section 5.2.1, “Custom Partitioning” for a list of limitations that apply to partitions and an example of manual partitioning in a Kickstart file.
A
%post
section that calls thenodectl init
command is required:%post nodectl init %end
%post nodectl init %end
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Kickstart Example for Deploying RHVH on Its Own
This Kickstart example shows you how to deploy RHVH. You can include additional commands and options as required.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Kickstart Example for Deploying RHVH with Registration and Network Configuration from Satellite
This Kickstart example uses information from Red Hat Satellite to configure the host network and register the host to the Satellite server. You must create a global or host group level parameter called
rhvh_image
and populate it with the directory URL to the squashfs.img file.ntp_server1
is also a global or host group level variable.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Add the Kickstart file location to the boot loader configuration file on the PXE server:
APPEND initrd=/var/tftpboot/pxelinux/initrd.img inst.stage2=URL/to/RHVH-ISO inst.ks=URL/to/RHVH-ks.cfg
APPEND initrd=/var/tftpboot/pxelinux/initrd.img inst.stage2=URL/to/RHVH-ISO inst.ks=URL/to/RHVH-ks.cfg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install RHVH following the instructions in Booting from the Network Using PXE in the Red Hat Enterprise Linux Installation Guide.