Product SiteDocumentation Site

17.2.2. KVM to Xen

The following procedure covers changing from the KVM hypervisor to the Xen hypervisor. This procedure assumes the kvm package is installed and enabled.
  1. Install the Xen packages

    Install the kernel-xen and xen package if you have not already done so.
    # yum install kernel-xen xen
    
    The kernel-xen package may be installed but disabled.
  2. Verify which kernel is in use

    Use the uname command to determine which kernel is running.
    $ uname -r
    2.6.23.14-107.fc8
    
    The "2.6.23.14-107.fc8" kernel is running on the system. This is the default kernel. If the kernel has xen on the end (for example, 2.6.23.14-107.fc8xen) then the Xen kernel is running and you can skip the substep.
    1. Changing the default kernel to the Xen kernel

      The grub.conf file determines which kernel is booted. To change the default kernel edit the /boot/grub/grub.conf file as shown below.
      default=0
      timeout=5
      splashimage=(hd0,0)/grub/splash.xpm.gz
      hiddenmenu
      title Fedora (2.6.23.14-107.fc8)
              root (hd0,0)
              kernel /vmlinuz-2.6.23.14-107.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
              initrd /initrd-2.6.23.14-107.fc8.img
      title Fedora (2.6.23.14-107.fc8xen)
              root (hd0,0)
              kernel /xen.gz-2.6.23.14-107.fc8
              module /vmlinuz-2.6.23.14-107.fc8xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
              module /initrd-2.6.23.14-107.fc8xen.img
      
      Notice the default=0 parameter. This is instructing the GRUB boot loader to boot the first entry, the default kernel. Change the default to 1 (or the number for the Xen kernel):
      default=1
      timeout=5
      splashimage=(hd0,0)/grub/splash.xpm.gz
      hiddenmenu
      title Fedora (2.6.23.14-107.fc8)
              root (hd0,0)
              kernel /vmlinuz-2.6.23.14-107.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
              initrd /initrd-2.6.23.14-107.fc82.6.23.14-107.fc8.img
      title Fedora (2.6.23.14-107.fc8xen)
              root (hd0,0)
              kernel /xen.gz-2.6.23.14-107.fc8
              module /vmlinuz-2.6.23.14-107.fc8xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
              module /initrd-2.6.23.14-107.fc8xen.img
      
  3. Reboot to load the new kernel

    Reboot the system. The computer will restart with the Xen kernel. Verify with the uname command:
    $ uname -r
    2.6.23.14-107.fc8xen
    
    If the output has xen on the end the Xen kernel is running.