8.1.2. Kickstart Your Host System

8.1.2. Kickstart Your Host System

Next, kickstart your host system using your newly-created kickstart profile. There are three different scenarios for kickstarting your host system. Please read through these three scenarios below, and follow the instructions for the scenario that applies best to you:

8.1.2.1. Your Host System Has Red Hat Enterprise Linux 4 or Earlier Installed

In this case, register your host system to your Satellite and schedule the kickstart process via the Satellite's web interface.

  1. First, register your host system to your Satellite. Use ssh to connect to your host system. Register your host system to your satellite issuing the following command as root:

    	      rhnreg_ks
    	      --serverUrl=htt://your-satellite.example.com/XMLRPC \
    	      --username=username --password=password
    
    

    Note

    If your host system is already registered to a different Red Hat Network server, asdd the --force option to the command above.

  2. Next, open up the host system's profile in the Satellite web interface. Log into the web interface of your Satellite at https://your-satellite.example.com/. Click on the Systems tab in the top red navigation bar. You should see the host system you just registered — click on its profile name to access its system profile page.

  3. Add a provisioning entitlement to your host system. From your host system profile page, click on DetailsProperties tab. Check the Provisioning checkbox in the Add-On Entitlements field, and click the Update Properties button in the lower right hand corner of the screen.

  4. Next, schedule the kickstart. You are brought back to the host system's profile page. You should now see a Provisioning tab in the system profile. Click on this tab. This should bring up the Schedule Kickstart page for the system.

  5. Select the kickstart profile we created for this host earlier. Then, select the Schedule Kickstart and Finish button in the lower right-hand corner of the screen.

    Note

    If you do not see the kickstart profile you created earlier on the host system's Schedule Kickstart page, you may have created a kickstart profile for an architecture that does not match the architecture of the host system you have registered. If this is the case, open the kickstart profile by navigating to SystemsKickstartProfiles within the Satellite web interface, and clicking on the label for the host system's kickstart profile. Click on the Kickstart DetailOperating System tab, and select items under the Base Channel and Available Trees selections that match the architecture of your host system. Click on the Update Kickstart button in the lower right hand corner of the screen, and navigate back to the host system's Schedule Kickstart page, following the steps above this note.

  6. After scheduling the kickstart, you will be taken to a Kickstart Status screen in the Satellite's web interface. Keep your web browser open to that page to follow along with the host system's progress.

  7. Use ssh to connect to the host system, and run the command rhn_check. This should cause the kickstart process to behind immediately rather than the next time the rhn_check process runs on the system. You should immediately see output indicating the start of a kickstart process on the host system, and it will eventually warn you that the system is going dow for reboot in three minutes.

  8. After three minutes have passed, the system will reboot. Follow the progress of the kickstart via the Satellite web interface.

  9. Depending on various factors, the kickstart process may take between ten and thirty minutes. At the end of this time period, the Satellite kickstart status page should indicate if the kickstart finished successfully.

    Tip

    If the kickstart fails, the Satellite kickstart status page should indicate that there was a failure. For more details on why the kickstart failed, click on the EventsHistory tab in the host system's profile, and click on the name of the kickstart event that failed to get more details on the failure. It may also be useful to consult /var/log/up2date on the host system for troubleshooting purposes.

8.1.2.2.  You Host System Does Not have Red Hat Enterprise Linux Installed

First, create a boot CD to initiate the kickstart on your host system. You will be able to use the kickstart profile we created in earlier steps to provision the host. Note you must have physical access to the machine you intend to use in order to follow these steps:

  1. You will find an ISO to create a boot CD for you host by using ssh to log into your Satellite. It is at the following location on your satellite:

    /var/satellite/rhn/kickstart/ks-rhel-i386-server-5/images/boot.iso
    

    For details on how to use this ISO image to burn a CD using Linux, please refer to the following Red Hat Knowledgebase Article:

    http://kbase.redhat.com/faq/FAQ_80_446.shtm

    If you must burn this ISO image to CD using another operating system, please refer to the following Knowledgebase Article:

    http://kbase.redhat.com/faq/FAQ_35_1897.shtm

    Tip

    It is possible to use a flash-memory USB key to boot your system in order to kickstart it. Refer to the Red Hat Enterprise Linux System Administration Guide (available at http://www.redhat.com/docs/manuals/enterprise/) for tips on how to do this. Note that your host system's hardware must support boot via these devices.

  2. Insert the boot CD in the drive and reboot the system, making sure the CD-ROM drive is set as the primary boot device in the system's' BIOS.

  3. After reboot, you should find yourself at a boot prompt. Type the following command at this prompt to start your kickstart:

    linux \
    ks=http://your-satellite.example.com/iskcstart/ks/label/the profile label you created earlier
    

    Note

    For some systems you may either need to add ksdevice=eth0 to the command above or disable one of two or more NICs in the system's BIOS to avoid confusion during the kickstart process.

  4. The kickstart for your host system should begin. It should take around fifteen minutes to complete. Upon successful completion of this kickstart, you will have provisioned a host system for your virtual guest and registered it to you Satellite.

8.1.2.3. Your Host System Has Red Hat Enterprise Linux 5 Installed

You should register your host system to your Satellite and check to see if the required xen packages are installed on the system. If they are not, install them using the Satellite

  1. Fist, register your host system to your Satellite. Use ssh to connect to your host system. Register your host system to your satellite issuing the following command as root:

    rhnref_ks --serverUrl=http://your-satellite.example.com/XMLRPC \
    --username=username --password=password
    

    Note

    If your host system is already registered to a different Red Hat Network server, add the --force to the command above.

  2. Next, open up the host system's profile in the Satellite web interface. Log into the web interface of your Satellite at https://your-satellite.example.com/. Click on the Systems tab in the top red navigational bar. You should see the host system you just registered - click on its profile name to access its system profile page.

  3. Make sure your system has access to the software channels it needs to access the software required for hosting virtual guests. From your host system's profile page, click on the Alter Channel Subscriptions link in the upper right side of the profile page under the Subscribed Channels header. Check the RHEL Virtualization and Red Hat Network Tools for RHEL Server checkboxes and click the Change Subscriptions button underneath the list of channels.

  4. Next, check to see if you have the necessary software installed for hosting virtual guest on the system. On the host system, issue the following command as root:

    rpm -q xen kernel-xen rhn-virtualization-host
    

    If rpm indicates these packages are not installed, you must install them by running the following command as root on the system:

    yum install dxen kernel-xen rhn-virtualization-host
    

    You will then need to edit the /etc/grub.conf configuration file to boot the new xen kernel by default. To do this, select the lines in grub.conf that pertain to the xen kernel from the beginning of the title line to the end of the initrd line, copy the lines, delete them, and paste them so they are the first kernel entry in grub.conf. Also ensure that the value of the default variable at the top of grub.conf is set to a value of '0'.

  5. Reboot the system, boot it into the xen kernel. The system should not automatically boot into the xen kernel on reboot but if you would like to make sure it has for troubleshooting purposes, use the command uname -r to see if the running kernel is a xen kernel. If you do not see the xen string in the name of the kernel, you have not booted into the correct kernel.

    Note

    If the system already has xen and kernel-xen installed you do not need to reboot after installing rhn-virtualization-host.

  6. You will also need to install and run the osad package in order for your host system to be responsive to commands sent from the Satellite, such as start, pause, resume, and shutdown. To install:

    yum install -y osad
    

    after installation, you should then start the osad process:

    /sbin/service osad restart
    
  7. Your host system should now be ready for RHN virtual guest provisioning.