7.2. Modifying the Red Hat Enterprise Virtualization Hypervisor ISO
7.2.1. Introduction to Modifying the Red Hat Enterprise Virtualization Hypervisor ISO
Important
Warning
7.2.2. Installing the edit-node Tool
Procedure 7.2. Installing the edit-node Tool
- Log in to the system on which to modify the Red Hat Enterprise Virtualization Hypervisor ISO file.
- Enable the required repository:
- For Red Hat Enterprise Linux 6:
# subscription-manager repos --enable=rhel-6-server-rhevh-rpms
- For Red Hat Enterprise Linux 7:
# subscription-manager repos --enable=rhel-7-server-rhevh-rpms
- Install the ovirt-node-tools package:
# yum install ovirt-node-tools
7.2.3. Syntax of the edit-node Tool
Options for the edit-node Tool
--name=image_name
- Specifies the name of the modified image.
--output=directory
- Specifies the directory to which the edited ISO is saved.
--kickstart=kickstart_file
- Specifies the path or URL to and name of a kickstart configuration file.
--script=script
- Specifies the path to and name of a script to run in the image.
--shell
- Opens an interactive shell with which to edit the image.
--passwd=user,encrypted_password
- Defines a password for the specified user. This option accepts MD5-encrypted password values. The
--password
parameter can be specified multiple times to modify multiple users. If no user is specified, the default user isadmin
. --sshkey=user,public_key_file
- Specifies the public key for the specified user. This option can be specified multiple times to specify keys for multiple users. If no user is specified, the default user is
admin
. --uidmod=user,uid
- Specifies the user ID for the specified user. This option can be specified multiple times to specify IDs for multiple users.
--gidmod=group,gid
- Specifies the group ID for the specified group. This option can be specified multiple times to specify IDs for multiple groups.
--tmpdir=temporary_directory
- Specifies the temporary directory on the local file system to use. By default, this value is set to
/var/tmp
--releasefile=release_file
- Specifies the path to and name of a release file to use for branding.
--builder=builder
- Specifies the builder of a remix.
--install-plugin=plugin
- Specifies a list of plug-ins to install in the image. You can specify multiple plug-ins by separating the plug-in names using a comma.
--install=package
- Specifies a list of packages to install in the image. You can specify multiple packages by separating the package names using a comma.
--install-kmod=package_name
- Installs the specified driver update package from a yum repository or specified
.rpm
file. Specified.rpm
files are valid only if in whitelisted locations (kmod-specific areas). --repo=repository
- Specifies the yum repository to be used in conjunction with the
--install-*
options. The value specified can be a local directory, a yum repository file (.repo
), or a driver disk.iso
file. --nogpgcheck
- Skips GPG key verification during the
yum install
stage. This option allows you to install unsigned packages.
Manifest Options for the edit-node Tool
--list-plugins
- Prints a list of plug-ins added to the image.
--print-version
- Prints current version information from
/etc/system-release
. --print-manifests
- Prints a list of manifest files in the ISO file.
--print-manifest=manifest
- Prints the specified manifest file.
--get-manifests=manifest
- Creates a
.tar
file of manifest files in the ISO file. --print-file-manifest
- Prints the contents of
rootfs
on the ISO file. --print-rpm-manifest
- Prints a list of installed packages in
rootfs
on the ISO file.
Debugging Options for the edit-node Tool
--debug
- Prints debugging information when the edit-node command is run.
--verbose
- Prints verbose information regarding the progress of the edit-node command.
--logfile=logfile
- Specifies the path to and name of a file in which to print debugging information.
7.2.4. Adding and Updating Packages
Note
http://localhost/myrepo/
or ftp://localhost/myrepo/
.
Important
7.2.4.1. Creating a Local Repository
createrepo
tool provided by the base Red Hat Enterprise Linux Workstation and Red Hat Enterprise Linux Server repositories.
Procedure 7.3. Creating a Local Repository
- Install the createrepo package and dependencies on the system on which to modify the Red Hat Enterprise Virtualization Hypervisor ISO file:
# yum install createrepo
- Create a directory to serve as the repository.
# mkdir exampleLocalrepo
- Copy all required packages and their dependencies into the newly created directory.
- Set up the metadata files for that directory to act as a repository:
# createrepo exampleLocalrepo
7.2.4.2. Example: Adding Packages to the Red Hat Enterprise Virtualization Hypervisor ISO File
Example 7.2. Adding a Single Package to the Red Hat Enterprise Virtualization Hypervisor ISO File
# edit-node --nogpgcheck --install package1 --repo exampleLocalrepo /usr/share/rhev-hypervisor/rhevh-latest-7.iso
Example 7.3. Adding Multiple Packages to the Red Hat Enterprise Virtualization Hypervisor ISO File
# edit-node --nogpgcheck --install "package1,package2" --repo exampleLocalrepo /usr/share/rhev-hypervisor/rhevh-latest-7.iso
7.2.4.3. Example: Updating Packages in the Red Hat Enterprise Virtualization Hypervisor ISO File
Example 7.4. Updating a Single Package in the Red Hat Enterprise Virtualization Hypervisor ISO File
# edit-node --nogpgcheck --install vdsm --repo /etc/yum.repos.d/rhevh.repo /usr/share/rhev-hypervisor/rhevh-latest-7.iso
Example 7.5. Updating Multiple Packages in the Red Hat Enterprise Virtualization Hypervisor ISO File
# edit-node --nogpgcheck --install "vdsm,libvirt" --repo /etc/yum.repos.d/rhevh.repo /usr/share/rhev-hypervisor/rhevh-latest-7.iso
7.2.5. Modifying the Default ID of Users and Groups
7.2.5.1. Example: Modifying the Default ID of a User
user1
to 60
:
Example 7.6. Modifying the Default ID of a Single User
# edit-node --uidmod=user1,60
--uidmod
option multiple times in the same command. The following example changes the default ID of the user user1
to 60
and the default ID of the user user2
to 70
.
Example 7.7. Modifying the Default ID of Multiple Users
# edit-node --uidmod=user1,60 --uidmod=user2,70
7.2.5.2. Example: Modifying the Default ID of a Group
group1
to 60
:
Example 7.8. Modifying the Default ID of a Single Group
# edit-node --gidmod=group1,60
--gidmod
option multiple times in the same command. The following example changes the default ID of the group group1
to 60
and the default ID of the group group2
to 70
.
Example 7.9. Modifying the Default ID of Multiple Groups
# edit-node --gidmod=group1,60 --gidmod=group2,70