C.2. Creating a Red Hat Enterprise Linux 7 Image


Use this section to create an image in the QCOW2 format using a Red Hat Enterprise Linux 7 ISO file.

  1. Using your web browser, download the Red Hat Enterprise Linux binary ISO file to a temporary location, for example, the Downloads directory.
  2. Copy the Red Hat Enterprise Linux binary ISO file to the /var/lib/libvirt/images/ directory.

    [root@host]# cp ~/home/user/Downloads/rhel-server-7.4-x86_64-dvd.iso /var/lib/libvirt/images/
    Copy to Clipboard Toggle word wrap
  3. Verify that virtbr0 is the virtual bridge:

    [root@host]# ip a
    Copy to Clipboard Toggle word wrap
  4. Start libvirtd:

    [root@host]# systemctl start libvirtd
    Copy to Clipboard Toggle word wrap
  5. Navigate to the /var/lib/libvirt/images/ directory:

    [root@host]# cd /var/lib/libvirt/images/
    Copy to Clipboard Toggle word wrap
  6. Prepare the QEMU image:

    [root@host]# qemu-img create -f qcow2 rhel7.qcow2 8G
    Copy to Clipboard Toggle word wrap
  7. Start the installation using virt-install. Use the following example as a guide:

    [root@host]# virt-install --virt-type qemu --name rhel7 --ram 2048 \
    --cdrom rhel-server-7.4-x86_64-dvd.iso \
    --disk rhel7.qcow2,format=qcow2 \
    --network=bridge:virbr0 --graphics vnc,listen=0.0.0.0 \
    --noautoconsole --os-type=linux --os-variant=rhel7
    Copy to Clipboard Toggle word wrap
    注記

    For GUI users, if the instance does not launch automatically, enter the virt-manager command to view the console:

    [root@host]# virt-manager
    Copy to Clipboard Toggle word wrap
  8. Follow the steps of the Red Hat Enterprise Linux installation wizard.

    1. For the installation source, add an HTTP link to your repository in Red Hat Satellite, for example satellite.example.com/pub/export/RHEL7/content/dist/rhel/server/7/7Server/x86_64/os/
    2. For the type of devices your installation uses, select Auto-detected installation media.
    3. For the type of installation destination, select Local Standard Disks.
    4. For other storage options, select Automatically configure partitioning.
    5. For software selection, select Minimal Install.
    6. Set the network interface to ON to ensure the interface activates on system start.
    7. Enter a host name, and click Apply.
    8. Enter a root password.
  9. When the installation completes, reboot the instance and log in as the root user.
  10. Confirm that the network interface is up and that the IP address is assigned:

    # ip a
    Copy to Clipboard Toggle word wrap
  11. Confirm that the hostname is correct:

    # hostname
    Copy to Clipboard Toggle word wrap
  12. Create a /etc/NetworkManager/conf.d/XX-cloud-image.conf file where XX is a two-digit number that indicates order of precedence. Add the following contents to the file:

    [main]
    dns=none
    Copy to Clipboard Toggle word wrap
  13. Proceed to Configuring a Host for Registration.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat