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.8 Provisioning KVM Guests Using Spacewalk

Note

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

To provision a KVM guest:

  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 guest.

    Key

    Enter a meaningful label for the activation key. For example: kvmguest-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 entitlement.

    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.

    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: kvmguest-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

      For a KVM guest, select the virtualization type as KVM Virtualized Guest. KVM supports only HVM guests.

    3. Configure the software packages that kickstart should install on the host in addition to the @Base package. The intended function of the guest system determines the set of packages but Oracle recommends the following additional packages for a KVM guest that is also a Spacewalk client:

      • @guest-agents (Agents used when running under a hypervisor.)

      • @guest-desktop-agents (Agents used when running as a virtualized desktop.)

      • acpid (Allows you to control the power state of the guest from the host.)

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

      • rhncfg

      • rhncfg-actions

      • rhncfg-client

    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. If you want to install the guest by using PXE network booting and kickstart:

    1. 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.

    2. 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.

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

    If you want to install the guest by using network installation, use a boot image made available over HTTP by the Spacewalk server. You can use a full ISO image, a UEK boot image, or a RHCK boot image in conjunction with kickstart, depending on your requirements.