This section documents how to set up and use SUSE Linux Enterprise Server 11 SP2 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.
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. Hardware Requirements
Computer with Pentium II or AMD K7 450 MHz processor
512 MB of RAM for the host
Free Disk Space
7 GB of available disk space for the host.
Ethernet 100 Mbps
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, select + and choose for installation. The installation can also be performed with YaST using the module + .
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 YaSTafter the installation has finished.
When installing and configuring the SUSE Linux Enterprise operating system on the host, be aware of the following best practices and suggestions:
If the host should always run as Xen host, run YaST+ and activate the Xen boot entry as default boot section.
In YaST, click.
Change the default boot to thelabel, then click .
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
reconfigure this timeout, run /etc/init.d/o2cb
configure or edit
in the system configuration.
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.
Determine the amount of memory to set for Domain0.
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 determined with the command xm list.
Select the Xen section.
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.
To set a minimum amount of memory for Domain0, edit the
dom0-min-mem parameter in the
/etc/xen/xend-config.sxp file and restart Xend. For
more information, see Section 5.2, “Controlling the Host by Modifying Xend Settings”.
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:
To use a “emulated” network interface like an emulated
Realtek card, specify
(type ioemu) in the vif
device section of the Xend configuration. An example configuration
would look like:
(device (vif (bridge br0) (uuid e2b8f872-88c7-0a4a-b965-82f7d5bdd31e) (devid 0) (mac 00:16:3e:54:79:a6) (model rtl8139) (type ioemu) ) )
Find more details about editing the Xend configuration at Section 5.3, “Configuring a Virtual Machine by Modifying its Xend Settings”.
When not specifying a model or type, Xend uses the paravirtualized network interface:
(device (vif (bridge br0) (mac 00:16:3e:50:66:a4) (script /etc/xen/scripts/vif-bridge) (uuid 0a94b603-8b90-3ba8-bd1a-ac940c326514) (backend 0) ) )
If the administrator should be offered both options, simply specify both, type and model. The Xend configuration would look like:
(device (vif (bridge br0) (uuid e2b8f872-88c7-0a4a-b965-82f7d5bdd31e) (devid 0) (mac 00:16:3e:54:79:a6) (model rtl8139) (type netfront) ) )
In this case, one of the network interfaces should be disabled on the VM Guest.
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.
|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
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, select the filter and choose 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.
Sometimes it may happen that the graphics system does not work properly.
In this case, add
Before starting to install virtual guests, make sure that the system time is correct. To do this, configure NTP (Network Time Protocol) on the controlling domain:
In YaST select+ .
Select the option to automatically start the NTP daemon during boot. Provide the IP address of an existing NTP time server, then click.
|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
For more information about managing virtual machines, see Chapter 5, Managing a Virtualization Environment.
To take full advantage of VM Guest systems, it is sometimes necessary to assign specific 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 sufficient to use this feature for fully virtualized guests. To make sure that your computer supports this feature, ask your supplier specifically to deliver a system that supports PCI Pass-Through.
Some graphics drivers use highly optimized ways to access DMA. This is not always supported, and thus using graphics cards may be difficult.
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.
The configuration 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.
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
Run+ + .
Xen section and press
Add the PCI number to theline:
When preparing for fully virtualized guests under Xen older than
4.0.0, add the parameter
. Note that
SUSE Linux Enterprise Server 11 SP 2 runs Xen 4.1 and therefore does not require this
Pressand finish YaST.
Reboot the system.
Check if the device is in the list of assignable devices with the command
There are several possibilities to dedicate a PCI device to a VM Guest:
During installation, add the
pci line to the
xm may be used to add or remove PCI
devices on the fly. To Add the device with number
06:01.0 to a guest with name
xm pci-attach sles11 06:01.0
To add the device to the Xend database, add the following section to the Xend database:
(device (pci (dev (slot 0x01) (domain 0x0) (bus 0x06) (vslt 0x0) (func 0x0) ) ) )
For more information about modifying the Xend database, see Section 5.3, “Configuring a Virtual Machine by Modifying its Xend Settings”.
After assigning the PCI device to the VM Guest, the guest system must care for the configuration and device drivers for this device.
Xen 4.0 and newer supports VGA graphics adapter pass-through on fully virtualized VM Guests. The guest can take full control of the graphics adapter with high performance full 3D and video acceleration.
VGA Pass-Through functionality is similar to PCI Pass-Through and as such also requires IOMMU (or Intel VT-d) support from the motherboard chipset and BIOS.
Only the primary graphics adapter (the one that is used when you power on the computer) can be used with VGA Pass-Through.
VGA Pass-Through is supported only for fully virtualized guests. Paravirtual guests (PV) are not supported.
The graphics card cannot be shared between multiple VM Guests using VGA Pass-Through — you can dedicate it to one guest only.
To enable VGA Pass-Through, add the following settings to your fully virtualized guest configuration file
yy:zz.n is the PCI controller ID of the VGA
graphics adapter as found with lspci -v on Domain0.
There are several resources that provide interesting information about PCI Pass-Through in the net: