10.6. Setting up the Virtual Machine Server

This section guides you through the steps to set up and run a VM Server.

10.6.1. Installing Software Packages

Software packages can be installed during the installation or on a computer already running openSUSE. All required packages are installed automatically when starting the YaST Xen installation module if they are not already installed. Namely, these are: xen, xen-libs, xen-tools, xen-tools-ioemu, and kernel-xen.

During Installation of openSUSE

  1. Begin the installation.

  2. On the Installation Settings screen, click Change > Software.

  3. Select the check box next to the selection for XEN Virtual Machine Host Server.

  4. Follow the prompts to complete the installation.

After completing the installation, proceed to Section 10.6.2, “Verifying That the GRUB Boot Loader Boots the VM Server”.

Already Running openSUSE

  1. From the Start menu, launch YaST.

  2. Click System > Software Management.

  3. Select the check box next to the selection for Xen Virtual Machine Host Server.

  4. Click Accept and complete the procedures to install the packages.

After installing the packages, proceed to Section 10.6.2, “Verifying That the GRUB Boot Loader Boots the VM Server”.

10.6.2. Verifying That the GRUB Boot Loader Boots the VM Server

When the Xen software packages are installed, the GRUB boot loader is automatically updated to present the VM Server as a boot option. The GRUB boot loader configuration file is usually saved to /boot/grub/menu.lst.

You might want to compare your GRUB boot loader configuration file with the sample below to confirm that it was updated to correctly boot VM Server. The first example shows a typical GRUB boot loader file updated to load the Xen software. The second file shows a GRUB boot loader file that loads a PAE-enabled kernel, which allows 32-bit computers to access memory over 4 GB.

Sample GRUB Boot Loader File (Typical)

title XEN 
    root (hd0,5)
    kernel /boot/xen.gz hypervisor_parameters
    module /boot/vmlinuz-xen kernel_parameters 
    module /boot/initrd-xen
   

Sample GRUB Boot Loader File (PAE)

title XEN
    root (hd0,5) 
    kernel /boot/xen-pae.gz hypervisor_parameters
    module /boot/vmlinuz-xenpae kernel_parameters 
    module /boot/initrd-xenpae
   

The title line specifies the name of the GRUB module. Do not change this line because YaST looks for the word Xen to verify that packages are installed.

The root line specifies which partition holds the boot partition and /boot directory. Replace (hd0,5) with the correct partition. For example, if hda1 holds the /boot directory, the entry would be (hd0,0).

The kernel line specifies the directory and filename of the hypervisor software. Replace hypervisor_parameters with the parameters to pass to the hypervisor. A common parameter is dom0_mem=amount_of_memory, which specifies how much memory to allocate to the VM Server. The amount of memory is specified in KB, or you can specify the units, for example 128M. If the amount is not specified, the VM Server takes the maximum possible memory for its operations. For more information about hypervisor parameters, see the XenSource Web Site or the user documentation in /usr/share/doc/packages/xen/html/user/index.html.

The first module line specifies the directory and filename of the Linux kernel to load. Replace kernel_parameters with the parameters to pass to the kernel. These parameters are the same parameters as those that can be passed to a standard Linux kernel on physical computer hardware.

The second module line specifies the directory and filename of the RAM disk used to boot the VM Server.

When the computer boots, the GRUB boot loader should now present the VM Server as a boot option.

10.6.3. Booting the Virtual Machine Server

  1. When the computer boots, select the VM Server (Xen) option from the GRUB boot loader screen.

  2. Log in to the computer as the root user.

  3. Verify that the computer is running as a VM Server by entering xm list in a terminal window.

    VM Server is running if the xm list command works.

The computer should now be running as a VM Server. Follow the steps in Section 10.7, “Creating Virtual Machines” to create virtual machines to run on the VM Server.

10.6.3.1. VM Server Troubleshooting

The following information can be helpful if the computer does not successfully boot as a VM Server.