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.
This manual offers an introduction to virtualization technology of your SUSE Linux
Enterprise Desktop. It features an overview of the various elds of application and installation types of each of the platforms supported by SUSE Linux Enterprise Desktop
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:
KDE User Guide (↑KDE User Guide)
Introduces the KDE desktop of SUSE Linux Enterprise Desktop. It guides you
through using and conguring the desktop and helps you perform key tasks. It is
intended mainly for users who want to make efcient use of KDE as their default
desktop.
GNOME User Guide (↑GNOME User Guide)
Introduces the GNOME desktop of SUSE Linux Enterprise Desktop. It guides you
through using and conguring the desktop and helps you perform key tasks. It is
intended mainly for end users who want to make efcient use of GNOME desktop
as their default desktop.
Application Guide (↑Application Guide)
Learn how to use and congure key desktop applications on SUSE Linux Enterprise
Desktop. This guide introduces browsers and e-mail clients as well as ofce applications and collaboration tools. It also covers graphics and multimedia applications.
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.
In addition to the comprehensive manuals, several quick start guides are available:
KDE Quick Start (↑KDE Quick Start)
Gives a short introduction to the KDE desktop and some key applications running
on it.
viiiVirtualization with Xen
GNOME Quick Start (↑GNOME Quick Start)
Gives a short introduction to the GNOME desktop and some key applications
running on it.
OpenOfce.org Quick Start
Gives a short introduction into the OpenOfce.org suite and its modules for writing
texts, working with spreadsheets, or creating graphics and presentations.
Lists the system requirements and guides you step-by-step through the installation
of SUSE Linux Enterprise Desktop 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 product 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/documentation where you can
download PDF or HTML versions of the manuals for your product.
2Feedback
Several feedback channels are available:
Bugs and Enhancement Requests
For services and support options available for your product, refer to http://www
.novell.com/services/.
To report bugs for a product component, please use http://support.novell
.com/additional/bugreport.html.
Submit enhancement requests at https://secure-www.novell.com/rms/
rmsTool?action=ReqActions.viewAddPage&return=www.
About This Manualix
User Comments
We want to hear your comments and suggestions about this manual and the other
documentation included with this product. Use the User Comments feature at the
bottom of each page in the online documentation or go to http://www.novell
.com/documentation/feedback.html 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
•
Dancing Penguins (Chapter Penguins, ↑Another Manual): This is a reference to a
chapter in another manual.
xVirtualization with Xen
Part I. Getting Started 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 Virtualization3
• 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.
• A number of network devices, connected to the virtual network provided by the
controlling domain.
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.
4Virtualization with Xen
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.
• 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 13, Virtual Machine Drivers (page 105).
• 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 Desktop 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 Virtualization5
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.
6Virtualization with Xen
Figure 1.2
Desktop Showing Virtual Machine Manager and Virtual Machines
Introduction to Xen Virtualization7
Setting Up a Virtual Machine
Host
This section documents how to set up and use SUSE Linux Enterprise Desktop 11 SP1
as a virtual machine host.
In most cases, the hardware requirements for the Domain0 are the same as those for
the SUSE Linux Enterprise Desktop 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 Host9
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 Device
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 Desktop products
based on code path 10 and later. Code path 10 products include Open Enterprise Server
2 Linux, SUSE Linux Enterprise Desktop 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
View > 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:
10Virtualization 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 Domain0 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 default amount of memory for Domain0, so the memory
can be allocated appropriately to the hypervisor. An adequate 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 Domain0.
1
Setting Up a Virtual Machine Host11
2
At Domain0, type xm info to view the amount of memory that is available on
the machine. The memory that is currently allocated by Domain0 can be deter-
mined with the command xm list.
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 5.2, “Controlling the Host by Modifying Xend Settings” (page 36).
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 Host13
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
Sometimes 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
14Virtualization 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 Desktop see Section 12.2, “Virtual Machine Clock Settings” (page 100).
For more information about managing virtual machines, see Chapter 5, Managing a
Virtualization Environment (page 33).
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.
• Guests with dedicated PCI devices cannot be live migrated to a different host.
Setting Up a Virtual Machine Host15
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:
16Virtualization 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 Machines19
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 9).
• 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. For procedures to create the installation sources, see the SUSE Linux Enterprise Desktop 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.
The actual conguration le for the Xen guests that is used for the installation is stored
at /etc/xen/vm/. The default location for image les is /var/lib/xen/images.
Be aware, that the conguration may be changed later on, but these changes will only
be available in the Xend. For more information about Xend, see Section 5.3, “Conguring a Virtual Machine by Modifying its Xend Settings” (page 37).
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.
20Virtualization with Xen
Loading...
+ 110 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.