Getting started with Xen virtualization

Windows as a Guest

The Xen developers have made sure that you can run Windows as a Guest operating system in a Dom U. But there are some restrictions: the trick only works on PCs with a recent Intel processor capable of supporting Vanderpool Technology (VT) or on a recent AMD process with Secure Virtual Machine (AMD SVM). The list of suitable candidates [3] is maintained by XenSource and is typically up to date.

Configuration

The steps for configuring a Windows Dom U are similar to those for setting up a Linux guest. Listing 4 shows a ready-made configuration file: The example assumes that the hda3 Dom 0 partition is the root partition for Windows.

Listing 4

Configuration File for a Windows Dom U

01 kernel  = '/usr/lib/xen-3.0.3-1/boot/hvmloader'
02 builder = 'hvm'
03 memory  = '512'
04 device_model='/usr/lib/xen-3.0.3-1/bin/qemu-dm'
05 disk    = [ 'phy:/dev/hda3,ioemu:hda,w','file:/root/wincd.iso,ioemu:hdc:cdrom,r' ]
06 name    = "windows"
07 hostname = "windows"
08 vif = ['type=ioemu, bridge=xenbr0']
09 # Behaviour
10 boot='d'
11 vnc=1
12 vncviewer=1
13 sdl=0

The Windows guest can be installed directly from the installation CD, or, as shown in our example, from the wincd.iso backup image created with the dd tool. Installing from an ISO file is far quicker and more convenient than virtually booting the CD.

A Dom U is typically used as a server without a monitor attached. The output from the Windows system is thus directed to a VNC server; the server's IP address is defined by the vnc-listen parameter in the last line of the Xen configuration file /etc/xen/xend-config.sxp; the syntax is (vnc-lis-ten '1.2.3.4').

This completes the configuration of the Xen Windows Dom U; Windows itself will create the required filesystem in the Windows setup phase. Then, you can launch the Windows Dom U and use VNC to connect to port 5090 on the host system and complete the setup.

When Windows prompts you to remove the CD from the drive after copying the system files, you must make sure that Xen will boot the Xen domain from the virtual disk, and not from the CD, on restart. To do so, you need to change the value for boot in the configuration file from d to c and restart the virtual machine.

At the end of the installation, you should have a working Windows system.

Xenman [4], which has now reached version 0.6, is a tool for managing Xen servers and starting or stopping virtual machines (Figure 3). The administrator can connect to one or multiple Xen servers, click to create new domains, or move domains from one server to another. An overview of the performance (Dashboard, Figure 4) is also included.

Figure 3: Xenman, a graphical admin console for a Xen server, boots a Fedora guest system.
Figure 4: Dashboard provides a graphical health state display for the Xen server.

Xenman makes life easier for both newcomers and experienced administrators. It is designed for multiple server management and SSH tunneling, and it gives you the option of collectively managing all server images, which means that Xen can boot the Dom U belonging to Server A on Server B if need be.

Migration

One of Xen's special features is its ability to migrate the virtual server from one host to another while the server is running. To test this, all you need is two Xen servers and a single virtual machine. In the simplest case, you can use NFS for the shared data, but ISCSI or DRBD are also perfectly suitable. In your Xen server configuration file, enable the following settings:

(xend-relocation-server yes)
(xend-relocation-address ' ')
(xend-relocation-hosts-allow ' ')

To migrate the virtual system from one server to another, just type xm migrate --live Dom U target server.

Interruption to services while the virtual machine is on the move will not normally exceed a couple of tenths of a second.

Read full article as PDF:

030-033_xen.pdf (633.92 kB)

Related content

  • KVM

    KVM brings the kernel into the virualization game. We’ll explain why the Linux world is so interested in this promising virtualization alternative.

  • Linux Integration Services

    Microsoft provides a collection of tools for faster and more efficient Linux virtualization in the Hyper-V environment.

  • VMware ESX Server

    Improved resource balancing, central administration, and service consolidation – you can only win with virtualization. Linux Magazine visits a communal data center for a practical look at virtualization in the workplace.

  • vSphere

    The free vSphere Hypervisor 5.0 lets companies enter into professional virtualization without the overhead of a commercial solution. If you decide you need additional enhancements later, you can always upgrade to enhanced VMware solutions.

  • Virtualization Tools

    Running server systems in virtual environments is a popular approach, but the technology offers benefits to desktop users. In this article, we investigate some virtual desktop alternatives.

comments powered by Disqus

Direct Download

Read full article as PDF:

030-033_xen.pdf (633.92 kB)

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia