Virtual Machine Server

Jump to: navigation, search

Susemini.png 本文处于需要翻译的文章的状态,欢迎您积极参与翻译与修订。 翻译人员:无,修订人员:无。

The Xen VM Server lets a single computer running openSUSE Linux 10.x or SLES 10 host one or more VMs. For more information, see An Introduction to Virtualization and Xen Virtual Machine Overview.

Basic Requirements

Detailed system requirement for both openSuse 10 and Novell Suse Enterprise Server 10 can be found here

Install the Xen VM Server Software

You can install the Xen VM Server packages when you install the operating system, or you can install them on a computer already running openSUSE Linux 10.x or SLES 10. When the Xen VM Server packages are installed, the GRUB boot loader is modified to present Xen as a boot option and the xend daemon is set to start automatically. Do not run the Xen VM Server version of the software until you have updated all packages by loading the standard Linux kernel. It is important to have the latest versions of all drivers from third party vendors too.

Version 10.1 Instructions

  1. Before you install and run Xen VM Server software on your SUSE Linux computer, it is recommended that you update your operating system to the most recent software packages available. The most recent software packages for SUSE Linux 10.1 are available here.
  2. Run YaST, and click System > Virtual Machine Management (Xen). The module prompts you to download and install kernel-xen, xen, xen-tools, xen-tools-ioemu (required only for full-virtualization mode), and kernel-xenpae (required only if the computer is 32-bit and must access memory over 3GB; replaces kernel-xen). File:01system vmmxen.png
  3. Note: If the Xen VM Server software was already installed but was not selected at boot, you are prompted to install the software again and reboot the server. If the software was already running, you can now start creating VMs using the Manage Virtual Machines screen.
  4. After installing the software, reboot the computer.
  5. During the reboot process, select the XEN VM Server option from the GRUB boot loader.

Your computer should now be running Xen VM Server software and you can add virtual machines using the YaST module, System > Virtual Machine Management (Xen).

Version 10.2 Instructions

  1. Install openSuse 10.2 (use what ever method you like. These instruction will assume you are installing from a DVD).
  2. If you installed the Xen server as part of the install process, DO NOT BOOT with the Xen Server until after you upate the Linux and 3rd party drivers. Boot with the normal Linux kernel.
  3. Start Yast and go to the Software tab. You will see many of the built in capabilities for managing and updating Linux and associated packages and programs. File:YastControlCenterSoftware.png
  4. Add installation sources. It is important not only to add Suse sources, but 3rd party vendors like nVidia and ATI. You may have to install the ATI driver manually while the nVidia driver will automatically update as part of the normal Online Update process. File:YastConfiguredSoftwareCatalogs.png
  5. Once you have configured all the necessary sources, close the wizard and proceed to the Online Update wizard. Once open, the wizard will check for any available updates and list them. The items in red are high priority updates, but I would recommend checking all items and applying all updates available. The system will then rebuild. I would recommend rebooting the system at this time to make sure that all services get restarted.
  6. If you did not originally install the Xen server software, do so now or skip to the next step. Run Yast and proceed to the Software section and run the Software Management wizard. Once open, select the Filter option; by Patterns. Proceed to the Server Function section and select Xen Virtual Machine Host Server. You'll have to install extra packages because selecting Xen Virtul ... is not enough. Search for the kernel-xen or kernel-xenpae. Kernel-xen is used for systems with less RAM memory than 3Gb and Kernel-xenpae for the others. .Accept the changes and the system will automatically download the software and install it.
  7. Rerun the Online Update Utility to make sure you have all the latest patches for the server software. File:YastSoftwareManagementWizard.png

GRUB Boot Loader

During the installation process of the Xen VM server software, the GRUB boot loader file should have been modified. Here's two examples of what the entries should look like. The first is a typical file and the second is a file specifying the pae kernel.

Sample GRUB Boot Loader File (Typical)

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


Sample GRUB Boot Loader File (Using PAE)

title XEN
 root (hd0,5)
 kernel /boot/xen-pae.gz hyper_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 hyper_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.
  • 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.

There are several ways to check the file to make sure that the entry was made properly. You can use Yast or view the file directly.

  • To view the file directly, go to /boot/grub/menu.lst and use your favorite editor. To use Yast, start Yast and go to the System section and select Boot Loader.

File:YastControlCenterSystem.png

  • You can change the order that the items are listed as well as setting the default boot item. After setting it as default, click edit and add this additional xen hypervisor parameter : dom0_mem=xxxM (eg: 768M means 768Mb of RAM or 2G for 2Gb). This will limit the amount of RAM memory that the Dom0 will use and will leave extra memory for the guests.

File:YastBootLoaderSettings.png

  • Disable powersave functionality on the host and all guest operating systems. On the host computer and other Linux computers, you can use the chkconfig powersaved off command.
  • At this point you can reboot the system and it should automatically boot to the Xen VM server.

This page is part of: