OBS User unknown
2007-02-11 10:48:10 +00:00
committed by Git OBS Bridge
parent 241ee9df04
commit d7002a96b9
166 changed files with 35454 additions and 7164 deletions

View File

@@ -18,7 +18,7 @@ About
Xen allows you to run multiple virtual machines on a single physical machine.
See the Xen homepage for more information:
http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
http://www.cl.cam.ac.uk/research/srg/netos/xen/
If you want to use Xen, you need to install the Xen hypervisor and a number of
supporting packages. During the initial SUSE installation (or when installing
@@ -30,11 +30,13 @@ instead, you wish to install Xen manually later, install the following packages:
xen
xen-libs
xen-tools
xen-tools-ioemu (Only required for hardware-assisted virtualization)
xen-tools-ioemu (Required for hardware-assisted virtualization)
multipath-tools (Required by xen-tools for domUloader)
xen-doc-* (Optional)
python-gtk (Optional, to install VMs graphically)
virt-manager (Optional, to manage VMs graphically)
tightvnc (Optional, to view VMs)
yast2-vm (Optional, to facilitate creation and management of VMs)
multipath-tools (Required by yast2-vm, for domUloader)
yast2-vm (Optional, convenient icons to install/manage VMs)
You then need to reboot your machine. Instead of booting a normal Linux
kernel, you will boot the Xen hypervisor and a slightly changed Linux kernel.
@@ -44,10 +46,10 @@ hardware.
This approach is called para-virtualization, since it is a partial
virtualization (the Linux kernel needs to be changed slightly, to make the
virtualization easier). It results in very good performance (consult
http://www.cl.cam.ac.uk/Research/SRG/netos/xen/performance.html) but has the
downside of unchanged operating systems not being supported. However,
upcoming hardware features (e.g., Intel's VT and AMD's Virtualization) will
help overcome this limitation.
http://www.cl.cam.ac.uk/research/srg/netos/xen/performance.html) but has the
downside of unchanged operating systems not being supported. However, new
hardware features (e.g., Intel's VT and AMD's V) are overcoming this
limitation.
Terminology
@@ -73,7 +75,7 @@ machines".
The acronym "HVM" refers to a hardware-assisted virtual machine. These are
VMs that have not been modified (e.g., Windows) and therefore need hardware
support such as Intel's VT or AMD's Virtualization to run on Xen.
support such as Intel's VT or AMD's V to run on Xen.
Kernels
@@ -155,8 +157,8 @@ Start Scripts
-------------
Before you can create additional VMs (or use any other xm command) xend must
be running. This init script is part of the xen-tools package, and it is
activated at installation time. You can (de)activate it using insserv (or
chkconfig). You can also start it manually with "rcxend start".
activated at installation time. You can (de)activate it using insserv. You
can also start it manually with "rcxend start".
One other relevant startup script is xendomains. This script can be used to
start other VMs when the VM server boots. It also cleanly shuts down the
@@ -165,59 +167,53 @@ symbolic link in /etc/xen/auto that points to the VM's configuration file.
Look in /etc/sysconfig/xendomains for relevant settings.
Creating a VM with YaST
-----------------------
YaST is the recommended method to create VMs. The YaST module (from the
yast2-vm package) handles creating both the VM's configuration file and
disk(s). YaST can help install any operating system, not just SUSE.
Creating a VM with vm-install
-----------------------------
The vm-install program (part of the xen-tools package, and accessible
through YaST's Control Center) is the recommended method to create VMs. This
program handles creating both the VM's configuration file and disk(s). It can
help install any operating system, not just SUSE.
From the command line, run "yast2 xen". From the GUI, start YaST, select
"System", then start "Virtual Machine Management (Xen)". For full
functionality, YaST must run in graphical mode, not ncurses.
The first screen shows all created and running VMs. To create a new one,
click "Add". Now adjust the VM's configuration to your liking.
From the command line, run "vm-install". If the DISPLAY environment
variable is set and the supporting packages (python-gtk) are installed, a
graphical wizard will start. Otherwise, a text wizard will start.
Xen does not yet properly support removable media in VMs in paravirtual mode,
so installing an operating system from CDs can be difficult. We recommend
using a network installation source, a DVD, or a DVD ISO. CDs do, however,
work as expected in fully-virtual mode.
Note that paravirtualized SUSE Linux will default to using a text-based
installation. To perform a graphical installation, add "vnc=1" to the
"Installation Options" line in YaST. See this page for further guidance on
installing via VNC:
Note that older paravirtualized SUSE Linux (older than SLES 10 SP1) will
default to using a text-based installation. To perform a graphical
installation of these OSs, add "vnc=1" to the "Additional Arguments" field
(found on the "Operating System Installation" page in the wizard). See this
page for further guidance on installing via VNC:
http://www.novell.com/coolsolutions/feature/15568.html
SLES 10 SP1 and later will automatically install graphically, as they contain
the paravirtual frame buffer driver.
Once you have the VM configured, click "Next". YaST will now create a
Once you have the VM configured, click "OK". The wizard will now create a
configuration file for the VM, and create a disk image. The disk image will
exist in /var/lib/xen/images, and a corresponding config file will exist in
/etc/xen/vm. The operating system's installation program will then run within
the VM.
When the VM shuts down (because the installation -- or at least the first stage
of it -- is done), YaST gives you a chance to finalize the VM's configuration.
This is useful, for example, if the installer and the application that will
run in the VM have different memory or network requirements.
When the VM shuts down (because the installation -- or at least the first
stage of it -- is done), the wizard gives you a chance to finalize the VM's
configuration. This is useful, for example, if the installer and the
application that will run in the VM have different memory or network
requirements.
The creation of VMs can be automated with AutoYaST. A single AutoYaST profile
can control the VM's settings (regardless of OS type) and/or the actual
installation of the OS within the VM (for SUSE only). Perhaps the easiest way
to create such a profile is to install a SUSE OS within a VM and "clone" the
operating system in the final stage of the OS installation. Then copy the
resulting file (/root/autoinst.xml) into the VM server's filesystem, into the
directory /var/lib/autoinstall/repository/. Start the AutoYaST tool (YaST >
Miscellaneous > Autoinstall) and then open the profile. Select the "Virtual
Machine Management (Xen)" heading, and add the settings for the VM. Save the
profile. Now the single profile can direct both the configuration of a VM,
and the installation of the OS within the VM.
The creation of VMs can be automated; read the vm-install man page for more
details. The installation of an OS within the VM can be automated if the OS
supports it.
Creating a VM Manually
----------------------
If you create a VM manually (as opposed to using YaST, which is the recommended
way), you will need to create a disk (or reuse an existing one) and a
configuration file.
If you create a VM manually (as opposed to using vm-install, which is the
recommended way), you will need to create a disk (or reuse an existing one)
and a configuration file.
Each VM needs to have its own root filesystem. The root filesystem can live on
a block device (e.g., a hard disk partition, or an LVM2 or EVMS volume) or in
@@ -253,22 +249,10 @@ boots. (See "Network Troubleshooting" below.) XenSource has been allocated a
range of MAC addresses with the OUI of 00-16-3E. By using MACs from this
range you can be sure they will not conflict with any physical adapters.
To get started quickly, you can use a modified rescue image from the Novell
SUSE installation CD/DVD. It's on the first CD/DVD in the boot/ directory with
the name "rescue". To make it usable with Xen, run the script
/usr/share/doc/packages/xen/mk-xen-rescue-img.sh (run it with no arguments to
get help). The script replaces the normal Linux kernel in the image with a
Xen-enabled Linux kernel (among other things; read the script for details).
The script also creates a matching configuration file. The disadvantage of
using the rescue way of constructing a root filesystem is that the result does
not have an RPM database, so you can't easily add packages using rpm. On the
positive side, the result is relatively small yet has most of what's needed to
get started with networking.
Managing Virtual Machines
-------------------------
VMs can be managed from the command line or from YaST.
VMs can be managed from the command line or from virt-manager.
To create a new VM from the command line, use a command like:
xm create my-vm
@@ -372,10 +356,6 @@ FW_FORWARD_ALWAYS_INOUT_DEV="xenbr0".
If xenbr0 and xenbr1 are being used, the line should be:
FW_FORWARD_ALWAYS_INOUT_DEV="xenbr0 xenbr1".
If you use the rescue images created by the above mentioned script, you'll
have a boot script inside that parses the ip=.... boot parameter. You can set
this parameter in the config file, and can have networking work automatically.
When using bridging, the eth0 in domain 0 device will be renamed to peth0 and
its MAC address will be set to fe:ff:ff:ff:ff:ff and ARP will be disabled.
veth0 will take over the old MAC address, be renamed to eth0, and be enabled
@@ -475,13 +455,15 @@ grow the virtual hardware beyond what the kernel has been booted with. But
you can trick domU Linux to prepare for a larger amount of RAM by passing the
mem= boot parameter.
The export of virtual hard disks from files in Xen is handled via the loopback
driver. You can easily run out of those, as by default only 8 loopback devices
are supported. You can change this by inserting:
The export of virtual hard disks from files in Xen can be handled via the
loopback driver (although in Xen 3.0.4, this is being replaced by the "blktap"
user-space driver.) If you are still using loopback, you can easily run out
of loopback devices, as by default only 8 are supported. You can change this
by inserting:
options loop max_loop=64
into /etc/modprobe.conf.local in domain 0.
Similarly, the netback driver comes up with 8 virtual network device pairs
Similarly, the netback driver comes up with 4 virtual network device pairs
(vif0.X - vethX). You can change this by inserting:
options netloop nloopbacks=64
into /etc/modprobe.conf.local in domain 0.
@@ -526,7 +508,7 @@ may help. Xen and Linux understand similar ACPI boot parameters. Try the
options acpi=off,force,strict,ht,noirq or acpi_skip_timer_override. Other
useful debugging options to Xen may be nosmp, noreboot, mem=1024M,
sync_console, noirqbalance (Dell). For a complete list of Xen boot options,
consult chapter 10.3 of the Xen users' manual.
consult chapter 11.3 of the Xen users' manual.
If domain 0 Linux crashes on X11 startup, please try to boot into runlevel 3.