The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

4.7 Provisioning KVM Hosts Using Spacewalk

Note

The procedure in this section outlines the steps for using Spacewalk to provision a KVM host. It requires the following prerequisites:

  • You are familiar with how to set up and use activation keys and kickstart profiles in Spacewalk and how to configure Cobbler, DHCP, and boot loaders to support network installation of client systems.

    See Chapter 3, Creating Activation Keys, Section 4.4, “Working with Kickstart Profiles”, and Section 4.5, “Installing Client Systems Using Kickstart”.

  • You have set up a base channel and Kickstartable tree for the Oracle Linux distribution that you want to install on the KVM host.

  • The system that you configure as a KVM host must have VT-x acceleration enabled in the BIOS or UEFI firmware and be able to forward this capability to any KVM guests. Suitable systems are bare-metal systems with VT-x enabled and Oracle VM virtual machines that have been configured with this capability. Oracle VirtualBox virtual machines do not support this functionality and are not suitable.

To provision a KVM host:

  1. In Spacewalk, create an activation key that is specific to KVM hosts on the desired platform: Oracle Linux 6 (x86_64) or Oracle Linux 7 (x86_64). Enter the key settings as follows:

    Description

    Enter a description for the key. For example: Oracle Linux 7 (x86_64) KVM host.

    Key

    Enter a meaningful label for the activation key. For example: kvmhost-oraclelinux7-x86_64.

    Usage

    Leave blank to allow unlimited use by clients.

    Base Channels

    Select the base channel with which the key is associated. For example: Oracle Linux 7 (x86_64) Base.

    Add-on Entitlements

    Select the Provisioning and either the Virtualization or Virtualization Platform entitlements.

    Note

    Entitlements are deprecated and will be replaced in a future version of Spacewalk. However, you must still configure entitlements for activation keys in Spacewalk 2.4

    The Provisioning entitlement allows Spacewalk to update packages, apply errata, or deploy configuration files on a client system that registers using this activation key.

    The Virtualization and Virtualization Platform entitlements are mutually exclusive. Virtualization allows up to four KVM guests, whereas Virtualization Platform allows unlimited KVM guests.

    If you want to enable the configuration file deployment feature, this option is available if you modify the activation key after creating it.

    Universal Default

    Select if the key should be used as the default activation key for all newly-registered systems.

    Note

    Oracle strongly recommends that you do not associate any channels with a universal default key. Spacewalk uses the universal default key if a key is not specified so it might be used by any version of any operating system.

  2. In Spacewalk, create a kickstart profile for KVM host systems on the desired platform:

    1. Associate the activation key that you created in step 1 with the profile.

    2. Enter the profile settings as follows:

      Label

      Enter a label for the profile. for example: kvmhost-ol7u2-x86_64.

      Base Channel

      Select the base channel with which the distribution is associated. For example: Oracle Linux 7 Update 2 (x86_64) Base.

      Kickstartable Tree

      Select the kickstart distribution with which the profile is associated. For example: ol7u2-x86_64-server.

      Virtualization Type

      Select the virtualization type as None.

    3. Configure the software packages that kickstart should install on the host in addition to the @Base and @Core packages:

      Virtualization packages (required for a KVM host):
      • @virtualization-hypervisor

      • @virtualization-tools

      Virtualization packages (recommended):
      • qemu-kvm-tools (Provides debugging and diagnostic utilities.)

      • virt-manager (Provides a graphical Virtual Machine Manager that you can use with KVM.)

      • virt-viewer (Provides a graphical console client for connecting to virtual machines.)

      Graphical desktop packages (required to use the Virtual Machine Manager):
      • @^graphical-server-environment (Provides a full graphical server environment.)

      • @fonts

      • @gnome-desktop (Select an alternate desktop environment such as KDE if preferred.)

      • @x11

      Spacewalk client packages (recommended):

      • rhncfg

      • rhncfg-actions

      • rhncfg-client

      Suggested optional packages:
      • @input-methods

      • @internet-browser

      • @multimedia

      • kexec-tools

      • osad (Allows you to apply updates and actions to a client system immediately from the Spacewalk server.)

    4. In the kickstart profile, configure any kickstart advanced options that you require, such as keyboard, lang, or network.

    5. Set up the %pre or %post sections for any pre or post-installation configuration that you want kickstart to perform.

      For example, you can enable configuration file management and remote commands by including the rhncfg, rhncfg-actions, and rhncfg-client packages and configuring rhn-actions-control to run in the post-installation shell:

      rhn-actions-control --enable-all
  3. Configure Cobbler or DHCP to provide IP and TFTP settings so that the guest being installed can access the appropriate boot loader to continue the provisioning process.

  4. Configure the boot-loader configuration file that the boot loader uses to locate the installation kernel, the ram-disk image, and the kickstart file served by Spacewalk.

  5. Having set up the Spacewalk kickstart profile, Cobbler, DHCP, and boot-loader configuration, boot the target host system from the network to start the installation process.