Figure 2814

Xen virtualization model domO with xen-tools first domU

second domU

Xen hypervisor


The Xen hypervisor can be thought of as a thin software layer running directly on top of the hardware. The initial operating system is then installed on top of Xen. That first operating system is essential; Xen on its own does not give you any access to the system. But when you have a Xen-aware operating system installed with the necessary tools inside it, you can install and control other operating systems through it. The difference with the traditional model is that all the operating systems are "guests" of Xen. They all run on top of the hypervisor layer, even the first operating system to be installed.

In the world of Xen, operating systems running on top of the hypervisor are known as domains. The initial OS that contains the Xen tools is called "domain 0'' or domO; the others are called "unprivileged domains'' or domUs.

Xen permits two methods of running virtual operating systems: paravirtualization and hardware-assisted virtualization. Paravirtualization works with standard hardware, while hardware-assisted virtualization will only work with the latest generation of (virtualization-enabled) processors.

Xen is extremely efficient. When running an operating system as a paravirtualized virtual machine under Xen, you see only a very small reduction in performance (a few percent) compared to running the same OS with the same resources on physical hardware. Hardware-assisted virtualization is less efficient than paravirtualization, but is the only way to run unmodified operating systems (if you have a suitable processor).

j r - - p Processors that support hardware assisted virtualization (sometimes called ''full virtu

' - ~ ■"■> ■ alization'') became available from both AMD and Intel in 2006. The two companies'

offerings are both supported by Xen for hardware-assisted virtualization. AMD's processors with this capability were developed under the codename Pacifica and are now referred to as AMD-V.

The comparable Intel processors are known as VT-X (previously codenamed Vanderpool). Already, most processors on the market have this feature.

To get started with Xen, you need to have the right packages installed. The easiest way to do this is from the YaST Virtualization menu. Choose the item "Install Hypervisor and Tools.'' This installs the packages that you need and adjusts the boot menu so that you can boot into Xen next time.

It is instructive to look at the GRUB menu file /boot/grub/menu.lst at this point; a section will have been written by YaST that looks something like this:

title XEN -- openSUSE 11.0 - root (hd0,0) kernel /boot/xen.gz module /boot/vmlinuz- root=/dev/sda1 module /boot/initrd-

This shows that the kernel you are going to run is actually xen.gz. The Linux kernel (a modified version as you can see from its name ending in -xen) is a module to xen.gz, as is the Linux initial ramdisk.

r : r j To determine whether a particular processor is capable of hardware-assisted virtual-

.■ ■ i".-.,"..■¿•CV-.w-j ization, look in /proc/cpuinfo. If the line beginning with flags contains either svm (AMD) or vmx (Intel), the processor has this capability.

To be able to do anything with Xen, you now need to reboot and choose the Xen option. You can, of course, make that the default if you always want to be able to run Xen.

Now you can choose the Manage Virtual Machines item from YaST, or simply type the command virt-manager (as root). You will notice that there is already one virtual machine running (see Figure 28-15). That is because dom0 (the initial operating system) is itself running on top of the Xen hypervisor.

FIGURE 28-15

virt-manager before any new virtual machines are defined

FIGURE 28-15

virt-manager before any new virtual machines are defined

Choose New Machine from the File menu, and you will see a new window that allows you to start creating a virtual machine (see Figure 28-16).

FIGURE 28-16

Starting the creation of a new virtual machine

FIGURE 28-16

Starting the creation of a new virtual machine

Tills assistant will guide you through c roaring a now virtual machine (VM) You will be ashed Tot some Information about the VM you'd like to create, such as

Tills assistant will guide you through c roaring a now virtual machine (VM) You will be ashed Tot some Information about the VM you'd like to create, such as

• The type of operating system that wilt run in the new VM

■ Whether the VM will be lulty virtu allied or paravirtuaiized

The location of the riles necessary to install

• an upeiatiny system on the VM 01 a disk that already has an operating system

Other charactenstics of the VM, such as memory processors aria network adapters

For the most current information on Novell VM server technology, see http // wwwnoveli convdocumcntaaorvtcchnology/ vrri server

Jf£anccl| ^Howard

In the next screen (see Figure 28-17) you can choose the operating system, and then you are asked to edit the detailed settings for the virtual machine, including the installation source. The installation source can be an ISO image or a network installation source. The virtual hard disk can be a file on the filesystem, or a physical disk, partition or logical volume (for much better performance).

The detailed settings you have chosen are then displayed (see Figure 28-18), and you can choose to start the installation of the virtual machine, which will display in its own window, as shown in Figure 28-19.

Now, look again at the Virtual Machine Manager window: Two domains are displayed, with details of their resource usage, as shown in Figure 28-20.

Hardware-Assisted Virtualization

On traditional processors, only paravirtualization is possible. This means that a modified kernel is needed in the domU. In practice this means that only Linux and one or two other open source operating systems (NetBSD, OpenBSD, plan9) are capable of running in paravirtualized mode. Sun has recently added support for Xen to Solaris. But it is not possible to run Windows in par-avirtualized mode.

Was this article helpful?

0 0

Post a comment