This manual is protected under Novell intellectual property rights. By reproducing, duplicating or
distributing this manual you explicitly agree to conform to the terms and conditions of this license
agreement.
This manual may be freely reproduced, duplicated and distributed either as such or as part of a bundled
package in electronic and/or printed format, provided however that the following conditions are fullled:
That this copyright notice and the names of authors and contributors appear clearly and distinctively
on all reproduced, duplicated and distributed copies. That this manual, specically for the printed
format, is reproduced and/or distributed for noncommercial use only. The express authorization of
Novell, Inc must be obtained prior to any other use of any manual or part thereof.
For Novell trademarks, see the Novell Trademark and Service Mark list http://www.novell
.com/company/legal/trademarks/tmlist.html. * Linux is a registered trademark of
Linus Torvalds. All other third party trademarks are the property of their respective owners. A trademark
symbol (®, ™ etc.) denotes a Novell trademark; an asterisk (*) denotes a third party trademark.
All information found in this book has been compiled with utmost attention to detail. However, this
does not guarantee complete accuracy. Neither Novell, Inc., SUSE LINUX Products GmbH, the authors,
nor the translators shall be held liable for possible errors or the consequences thereof.
8.3SUSE Drivers for Red Hat Enterprise Linux 4 on Xen . . . . . . . . . .87
8.4SUSE Drivers for Red Hat Enterprise Linux 5 on Xen . . . . . . . . . .91
8.5SUSE Drivers for Windows on Xen . . . . . . . . . . . . . . . . . .95
8.6SUSE Drivers for SUSE Linux Enterprise Server on Xen . . . . . . . . .103
A SXP Conguration Options105
About This Manual
This manual offers an introduction to virtualization technology of your SUSE Linux
Enterprise Server. It features an overview of the various elds of application and installation types of each of the platforms supported by SUSE Linux Enterprise Server as
well as a short description of the installation procedure.
Many chapters in this manual contain links to additional documentation resources. This
includes additional documentation that is available on the system as well as documentation available on the Internet.
For an overview of the documentation available for your product and the latest documentation updates, refer to http://www.novell.com/documentation.
Quality service is also available. Experts can answer questions about installation or
conguration, make reliable security updates available, and support development
projects.
Documentation regarding the Open Enterprise Server 2 is found at http://www
.novell.com/documentation/oes2/index.html.
1Available Documentation
We provide HTML and PDF versions of our books in different languages. The following
manuals for users and administrators are available on this product:
Deployment Guide (↑Deployment Guide)
Shows how to install single or multiple systems and how to exploit the product
inherent capabilities for a deployment infrastructure. Choose from various approaches, ranging from a local installation or a network installation server to a mass deployment using a remote-controlled, highly-customized, and automated installation
technique.
Administration Guide (↑Administration Guide)
Covers system administration tasks like maintaining, monitoring and customizing
an initially installed system.
Security Guide (↑Security Guide)
Introduces basic concepts of system security, covering both local and network security aspects. Shows how to make use of the product inherent security software
like Novell AppArmor (which lets you specify per program which les the program
may read, write, and execute) or the auditing system that reliably collects information about any security-relevant events.
System Analysis and Tuning Guide (↑System Analysis and Tuning Guide)
An administrator's guide for problem detection, resolution and optimization. Find
how to inspect and optimize your system by means of monitoring tools and how
to efciently manage resources. Also contains an overview of common problems
and solutions and of additional help and documentation resources.
Virtualization with Xen (page 1)
Offers an introduction to virtualization technology of your product. It features an
overview of the various elds of application and installation types of each of the
platforms supported by SUSE Linux Enterprise Server as well as a short description
of the installation procedure.
Storage Administration Guide
Provides information about how to manage storage devices on a SUSE Linux Enterprise Server.
In addition to the comprehensive manuals, several quick start guides are available:
Lists the system requirements and guides you step-by-step through the installation
of SUSE Linux Enterprise Server from DVD, or from an ISO image.
Linux Audit Quick Start
Gives a short overview how to enable and congure the auditing system and how
to execute key tasks such as setting up audit rules, generating reports, and analyzing
the log les.
Novell AppArmor Quick Start
Helps you understand the main concepts behind Novell® AppArmor.
Find HTML versions of most SUSE Linux Enterprise Server manuals in your installed
system under /usr/share/doc/manual or in the help centers of your desktop.
Find the latest documentation updates at http://www.novell.com/
viiiVirtualization with Xen
documentation where you can download PDF or HTML versions of the manuals
for your product.
2Feedback
Several feedback channels are available:
• To report bugs for a product component or to submit enhancement requests, please
use https://bugzilla.novell.com/. If you are new to Bugzilla, you
might nd the Bug Writing FAQs helpful, available from the Novell Bugzilla home
page.
• We want to hear your comments and suggestions about this manual and the other
documentation included with this product. Please use the User Comments feature
at the bottom of each page of the online documentation and enter your comments
there.
3Documentation Conventions
The following typographical conventions are used in this manual:
•
/etc/passwd: directory names and lenames
•
placeholder: replace placeholder with the actual value
•
PATH: the environment variable PATH
•
ls, --help: commands, options, and parameters
•
user: users or groups
•
Alt, Alt + F1: a key to press or a key combination; keys are shown in uppercase as
on a keyboard
•
File, File > Save As: menu items, buttons
• ►amd64 em64t: This paragraph is only relevant for the specied architectures.
The arrows mark the beginning and the end of the text block. ◄
About This Manualix
•
Dancing Penguins (Chapter Penguins, ↑Another Manual): This is a reference to a
chapter in another manual.
xVirtualization with Xen
Introduction to Xen
Virtualization
Virtualization of operating systems is used in many different computing areas. It nds
its applications in server consolidation, energy saving efforts, or the ability to run older
software on new hardware, for example. This chapter introduces and explains the
components and technologies you need to understand to set up and manage a Xen-based
virtualization environment.
1.1Basic Components
The basic components of a Xen-based virtualization environment are the Xen hypervisor,
the Domain0, any number of other VM Guests, and the tools, commands, and conguration les that let you manage virtualization. Collectively, the physical computer running all these components is referred to as a VM Host Server because together these
components form a platform for hosting virtual machines.
The Xen Hypervisor
The Xen hypervisor, sometimes referred to generically as a virtual machine monitor,
is an open-source software program that coordinates the low-level interaction between virtual machines and physical hardware.
The Domain0
The virtual machine host environment, also referred to as Domain0 or controlling
domain, is comprised of several components, such as:
1
Introduction to Xen Virtualization1
• The SUSE Linux operating system, which gives the administrator a graphical
and command line environment to manage the virtual machine host components
and its virtual machines.
NOTE
The term “Domain0” refers to a special domain that provides the management environment. This may be run either in graphical or in command
line mode.
• The xend daemon (xend), which stores conguration information about each
virtual machine and controls how virtual machines are created and managed.
• A modied version of QEMU, which is an open-source software program that
emulates a full computer system, including a processor and various peripherals.
It provides the ability to host operating systems in full virtualization mode.
Xen-Based Virtual Machines
A Xen-based virtual machine, also referred to as a VM Guest or DomU consists
of the following components:
• At least one virtual disk that contains a bootable operating system. The virtual
disk can be based on a le, partition, volume, or other type of block device.
• Virtual machine conguration information, which can be modied by exporting
a text-based conguration le from xend or through Virtual Machine Manager.
Management Tools, Commands, and Conguration Files
There is a combination of GUI tools, commands, and conguration les to help
you manage and customize your virtualization environment.
1.2Understanding Virtualization
Modes
Guest operating systems are hosted on virtual machines in either full virtualization
mode or paravirtual mode. Each virtualization mode has advantages and disadvantages.
2Virtualization with Xen
• Full virtualization mode lets virtual machines run unmodied operating systems,
such as Windows* Server 2003 and Windows XP, but requires the computer running
as the VM Host Server to support hardware-assisted virtualization technology, such
as AMD* Virtualization or Intel* Virtualization Technology.
Some guest operating systems hosted in full virtualization mode, can be congured
to run the Novell* Virtual Machine Drivers instead of drivers originating from the
operating system. Running virtual machine drivers improves performance dramatically on guest operating systems, such as Windows XP and Windows Server 2003.
For more information, see Chapter 8, Virtual Machine Drivers (page 85).
• Paravirtual mode does not require the host computer to support hardware-assisted
virtualization technology, but does require the guest operating system to be modied
for the virtualization environment. Typically, operating systems running in paravirtual mode enjoy better performance than those requiring full virtualization mode.
Operating systems currently modied to run in paravirtual mode are referred to as
paravirtualized operating systems and include SUSE Linux Enterprise Server 11
and NetWare® 6.5 SP8.
1.3Xen Virtualization Architecture
The following graphic depicts a virtual machine host with four virtual machines. The
Xen hypervisor is shown as running directly on the physical hardware platform. Note,
that the controlling domain is also just a virtual machine, although it has several additional management tasks compared to all other virtual machines.
Introduction to Xen Virtualization3
Figure 1.1
On the left, the virtual machine host’s Domain0 is shown running the SUSE Linux operating system. The two virtual machines shown in the middle are running paravirtualized
operating systems. The virtual machine on the right shows a fully virtual machine running an unmodied operating system, such as Windows Server 2003 or Windows XP.
Virtualization Architecture
1.4The Virtual Machine Host
After you install the virtualization components and reboot the computer, the GRUB
boot loader menu displays a Xen menu option. Selecting the Xen menu option loads
the Xen hypervisor and starts the Domain0 running the SUSE Linux operating system.
Running on Domain0, the SUSE Linux operating system displays the installed text
console or desktop environment, such as GNOME or KDE. The terminals of VM Guest
systems are displayed in their own window inside the controlling Domain0 when opened.
4Virtualization with Xen
Figure 1.2
Desktop Showing Virtual Machine Manager and Virtual Machines
Introduction to Xen Virtualization5
Setting Up a Virtual Machine
Host
This section documents how to set up and use SUSE Linux Enterprise 11 as a virtual
machine host.
In most cases, the hardware requirements for the Domain0 are the same as those for
the SUSE Linux Enterprise Server operating system, but additional CPU, disk, memory,
and network resources should be added to accommodate the resource demands of all
planned VM Guest systems.
TIP
Remember that VM Guest systems, just like physical machines, perform better
when they run on faster processors and have access to more system memory.
The following table lists the minimum hardware requirements for running a typical
virtualized environment. Additional requirements have to be added for the number and
type of the respective guest systems.
Table 2.1
nent
Hardware Requirements
Minimum RequirementsSystem Compo-
2
Computer with Pentium II or AMD K7 450 MHz processorComputer
512 MB of RAM for the hostMemory
Setting Up a Virtual Machine Host7
Minimum RequirementsSystem Compo-
nent
7 GB of available disk space for the host.Free Disk Space
DVD-ROM DriveOptical Drive
20 GBHard Drive
Ethernet 100 MbpsNetwork Board
IP Address• One IP address on a subnet for the host.
• One IP address on a subnet for each VM Guest.
Xen virtualization technology is available in SUSE Linux Enterprise Server products
based on code path 10 and later. Code path 10 products include Open Enterprise Server
2 Linux, SUSE Linux Enterprise Server 10, SUSE Linux Enterprise Desktop 10, and
openSUSE 10.x.
The virtual machine host requires a number of software packages and their dependencies
to be installed. To install all necessary packages, run YaST Software Management, select
the lter Patterns and choose Xen Virtual Machine Host Server for installation. The
installation can also be performed with YaST using the module Virtualization > InstallHypervisor and Tools.
After the Xen software is installed, restart the computer.
Updates are available through your update channel. To be sure to have the latest updates
installed, run YaST Online Update after the installation has nished.
2.1Best Practices and Suggestions
When installing and conguring the SUSE Linux Enterprise operating system on the
host, be aware of the following best practices and suggestions:
8Virtualization with Xen
•
If the host should always run as Xen host, run YaST System > Boot Loader and
activate the Xen boot entry as default boot section.
•
In YaST, click System > Boot Loader.
•
Change the default boot to the Xen label, then click Set as Default.
•
Click Finish.
• Close Virtual Machine Manager if you are not actively using it and restart it when
needed. Closing Virtual Machine Manager does not affect the state of virtual machines.
• For best performance, only the applications and processes required for virtualization
should be installed on the virtual machine host.
• When using both, iSCSI and OCFS2 to host Xen images, the latency required for
OCFS2 default timeouts in SP2 may not be met. To recongure this timeout, run
/etc/init.d/o2cb configure or edit O2CB_HEARTBEAT_THRESHOLD
in the system conguration.
2.2Managing Domain 0 Memory
When the host is set up, a percentage of system memory is reserved for the hypervisor,
and all remaining memory is automatically allocated to Domain0.
A better solution is to set a minimum and maximum amount of memory for domain 0,
so the memory can be allocated appropriately to the hypervisor. An adequate maximum
amount would be 20 percent of the total system memory up to 2 GB. An appropriate
minimum amount would be 512 MB.
2.2.1 Setting a Maximum Amount of
Memory
Determine the amount of memory to set for domain 0.
1
2
At Domain0, type xm list to view the currently allocated memory.
Setting Up a Virtual Machine Host9
Run YaST > Boot Loader.
3
Select the Xen section.
4
5
In Additional Xen Hypervisor Parameters, add dom0_mem=mem_amount
where mem_amount is the maximum amount of memory to allocate to Domain0.
Add K, M, or G, to specify the size, for example, dom0_mem=768M.
Restart the computer to apply the changes.
6
2.2.2 Setting a Minimum Amount of Memory
To set a minimum amount of memory for Domain0, edit the dom0-min-mem parameter in the /etc/xen/xend-config.sxp le and restart xend. For more informa-
tion, see Section 4.2, “Controlling the Host by Modifying xend Settings” (page 32).
2.3Network Card in Fully Virtualized
Guests
In a fully virtualized guest, the default network card is an emulated Realtek network
card. However, it also possible to use the split network driver to run the communication
between Domain0 and a VM Guest. By default, both interfaces are presented to the
VM Guest, because the drivers of some operating systems require both to be present.
When using SUSE Linux Enterprise, only the paravirtualized network cards are available
for the VM Guest by default. The following network options are available:
emulated
To use a “emulated” network interface like an emulated Realtek card, specify
(type ioemu) in the vif device section of the xend conguration. An example
In this case, one of the network interfaces should be disabled on the VM Guest.
Setting Up a Virtual Machine Host11
2.4Starting the Virtual Machine Host
If virtualization software is correctly installed, the computer boots to display the GRUB
boot loader with a Xen option on the menu. Select this option to start the virtual machine
host.
NOTE: Xen and Kdump
In Xen, the hypervisor manages the memory resource. If you need to reserve
system memory for a recovery kernel in Domain0, this memory has to be reserved by the hypervisor. Thus, it is necessary to add the parameter
crashkernel=size@offset to the kernel line instead of using the line
with the other boot options. For more about Kdump, see also http://www
If the Xen option is not on the GRUB menu, review the steps for installation and verify
that the GRUB boot loader has been updated. If the installation has been done without
selecting the Xen pattern, run the YaST Software Management, select the lter Patterns
and choose Xen Virtual Machine Host Server for installation.
After booting the hypervisor, the Domain0 virtual machine starts and displays its
graphical desktop environment. If you did not install a graphical desktop, the command
line environment appears.
TIP: Graphics Problems
In some rare cases it may happen that the graphics system does not work
properly. In this case, add vga=ask to the boot parameters. To activate permanent settings, use vga=mode-0x??? where ??? is calculated as 0x100 +
VESA mode from http://en.wikipedia.org/wiki/VESA_BIOS
_Extensions, e.g. vga=mode-0x361.
Before starting to install virtual guests, make sure that the system time is correct. To
do this, congure NTP (Network Time Protocol) on the controlling domain:
In YaST select Network Services > NTP Conguration.
1
12Virtualization with Xen
Select the option to automatically start the NTP daemon during boot. Provide
2
the IP address of an existing NTP time server, then click Finish.
NOTE: Time Services on Virtual Guests
Hardware clocks commonly are not very precise. All modern operating systems
try to correct the system time compared to the hardware time by means of an
additional time source. To get the correct time on all VM Guest systems, also
activate the network time services on each respective guest or make sure that
the guest uses the system time of the host. For more about IndependentWallclocks in SUSE Linux Enterprise Server see Section 7.4.3, “Virtual Machine
Clock Settings” (page 81).
For more information about managing virtual machines, see Chapter 4, Managing a
Virtualization Environment (page 29).
2.5PCI Pass-Through
To take full advantage of VM Guest systems, it is sometimes necessary to assign specic PCI devices to a dedicated domain. When using fully virtualized guests, this
functionality is only available if the chipset of the system supports this feature, and if
it is activated from the BIOS.
This feature is available from both, AMD* and Intel*. For AMD machines, the feature
is called IOMMU, in Intel speak, this is VT-d. Note that Intel-VT technology is not
sufcient to use this feature for fully virtualized guests. To make sure that your computer supports this feature, ask your supplier specically to deliver a system that supports
PCI Pass-Through.
Limitations
• Some graphics drivers use highly optimized ways to access DMA. This is not always
supported, and thus using graphics cards may be difcult.
• When accessing PCI devices behind a PCIe bridge, all of the PCI devices must be
assigned to a single guest. This limitations does not apply to PCIe devices.
Setting Up a Virtual Machine Host13
The conguration of PCI Pass-Through is twofold. First, the hypervisor must be informed at boot time that a PCI device should be available for reassigning. Second, the
PCI device must be assigned to the VM Guest.
2.5.1 Conguring the Hypervisor for PCI
Pass-Through
1
Select a device to reassign to a VM Guest. To do this run lspci and read the
device number. For example, if lspci contains the following line:
06:01.0 Ethernet controller: Digital Equipment Corporation DECchip
21142/43 (rev 41)
In this case, the PCI number is (06:01.0).
Run yast > System > Boot Loader.
2
3
Select the Xen section and press Edit.
Add the PCI number to the Optional Kernel Command Line Parameter line:
4
pciback.hide=(06:01.0)
5
When preparing for fully virtualized guests, add the parameter iommu=1 to
Additional Xen Hypervisor Parameters.
Press Ok and nish YaST.
6
Reboot the system.
7
Check if the device is in the list of assignable devices with the command
8
xm pci-list-assignable-devices
2.5.2 Assigning PCI Devices to VM Guest
Systems
There are several possibilities to dedicate a PCI device to a VM Guest:
14Virtualization with Xen
Adding the device while installing:
During installation, add the pci line to the conguration le:
pci=['06:01.0']
Hot adding PCI devices to VM Guest systems
The command xm may be used to add or remove PCI devices on the y. To Add
the device with number 06:01.0 to a guest with name sles11 use:
xm pci-attach sles11 06:01.0
Adding the PCI device to xend
To add the device to the xend database, add the following section to the xend
database:
A virtual machine is comprised of data and operating system les that dene the virtual
environment. Virtual machines are hosted and controlled by the VM Host Server. This
section provides generalized instructions for installing virtual machines.
Virtual machines have few if any requirements above those required to run the operating
system. If the operating system has not been optimized for the virtual machine host
environment, the unmodied OS can run only on hardware-assisted virtualization
computer hardware, in full virtualization mode, and requires specic device drivers to
be loaded. The hardware that is presented to the VM Guest depends on the conguration
of the Xend.
You should be aware of any licensing issues related to running a single licensed copy
of an operating system on multiple virtual machines. Consult the operating system license
agreement for more information.
NOTE: Virtual Machine Architectures
The virtual machine host runs only on x86, AMD64 and Intel 64 hardware. It
does not run on other system architectures such as Itanium, or POWER. A 64bit virtual machine host can also run a 32-bit operating system, while a 32-bit
host cannot run a 64-bit client. This holds true for both, the controlling domain
and all further guests.
3
Setting Up Virtual Machines17
3.1Creating a Virtual Machine
Before creating a virtual machine, you need the following:
•
Install a host server as described in Chapter 2, Setting Up a Virtual Machine Host
(page 7).
• If you want to use an automated installation le (AutoYaST, NetWare® Response
File, or RedHat Kickstart), you should create and download it to a directory on the
host machine server or make it available on the network.
• For NetWare and OES Linux virtual machines, you need a static IP address for
each virtual machine you create.
• If you are installing Open Enterprise Server (OES) 2 Linux, you need a network
installation source for OES 2 Linux software including the SUSE Linux Enterprise
Server 10 SP2 media and the OES 2 Linux add-on CD. For procedures to create
the installation sources, see Section “Setting Up the Server Holding the Installation
Sources” (Chapter 14, Remote Installation, ↑Deployment Guide).
For further prerequisites, consult the manuals of the respective operating system to install.
The Create Virtual Machine Wizard (YaST > Virtualization > Create Virtual Machines)
helps you through the steps required to create a virtual machine and install its operating
system. The information that follows is generalized for installing any operating system.
In addition to these instructions, you should consult Chapter 7, Xen Guest Systems
(page 75) for information specic to the operating system you are installing.
The actual conguration les for the Xen guests are stored at /etc/xen/vm/. The
default location for image les is /var/lib/xen/images.
Launch the Create Virtual Machine Wizard by using one of the following methods:
•
From the virtualization host server desktop, click YaST > Virtualization > Create
Virtual Machine
•
From within Virtual Machine Manager, click New.
•
At the command line, enter vm-install.
18Virtualization with Xen
If the wizard does not appear or the vm-install command does not work, review
the process of installing and starting the virtualization host server. The virtualization
software might not be installed properly.
3.2Installing an Operating System
You can choose to run an installation program or choose a disk or disk image that already
has an installed and bootable operating system.
Figure 3.1
If you choose to run an installation program, you are presented with a list of operating
systems. Select the one you want to install.
The Summary page shows you a summary of the virtual machine you are creating. You
can click on any of the headings to edit the information. As you edit the information in
the Summary, consult Chapter 7, Xen Guest Systems (page 75) for instructions specic
to the operating system you are installing.
Installing an Operating System
Setting Up Virtual Machines19
Figure 3.2
Summary
Information about the following operating systems is included:
• OES NetWare Virtual Machines, see Section 7.1, “NetWare Virtual Machines”
(page 75).
• OES Linux Virtual Machines, see Section 7.2, “OES Linux Virtual Machines”
(page 75).
• SUSE Linux Virtual Machines, see Section 7.4, “SUSE Linux Virtual Machines”
(page 77).
• Windows Virtual Machines, see Section 7.5, “Windows Virtual Machines”
(page 84).
When running through the creation of a VM Guest, the following steps have to be accomplished:
20Virtualization with Xen
Loading...
+ 102 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.