rfc2324.org - HowTo

Running Windows Server in Xen 3 (on Debian Etch)


This is a short description how to install and run a Windows™ system on a Xen 3 machine

Preasumptions

I assume that you're running any linux distribution and know how to handle it.

More precisely, I assume that you are running Debian/GNU Linux Etch to make it easier to tell what I've done.
This should be transferable to any other Linux distribution.

You should have setup some systems before and tried some crazy things like the described ones here, otherwise you might run into trouble if things don't work on the first try.

Requirements

You will need:

So let's go

Make sure you can access your Dom-0 via ssh with X-Forwarding. (xeyes is rather helpful to test this.)

Put the ISO somewhere on the Xen-System, e.g. /data/windows-install.iso

Create a config file for the new windows Dom-U, e.g. /etc/xen/win_2k3.kvm

This could look like this (download file)

#
# /etc/xen/win_2k3.kvm
#
# Example config file for running a Windows system as Xen Dom-U
#
# Maximilian Wilhelm 
#  -- Sun, 07 Oct 2007 05:20:57 +0200
#

# Kernel image file.
kernel = "/usr/lib/xen-3.0.3-1/boot/hvmloader"
device_model='/usr/lib/xen-3.0.3-1/bin/qemu-dm'

# The domain build function. HVM domain uses 'hvm'.
builder='hvm'

# Initial memory allocation (in megabytes) for the new domain.
memory = 512

# A name for your domain. All domains must have different names.
name = "win_2k3"

# Ethernet device
vif = [ 'type=ioemu, mac=00:de:fa:ce:d0:23, bridge=br123' ]

# Disk image
disk = [ "phy:/dev/vg_xen1/win2k3-disk,hda,w", "file:/data/windows-install.iso,hdc:cdrom,r" ]

# boot on floppy (a), hard disk (c) or CD-ROM (d)
#boot="c" # use after installation
boot="d" # use for installing windows, to boot from cd

# enable SDL console for installation
# disable it when running domain productive
sdl=1

# disable VNC console first
# enable it when running domain without SDL
vnc=0
vncviewer=0

# set realtime clock to local time
localtime=1

apic=0
acpi=0
 

Make sure that all paths are correct.
You will search hours if e.g. the device_model is incorrect because Xen won't tell you.

The magic moment

Now you should be able to launch your new Windows™ Dom-U by typing

xm create win_2k3.kvm

and it should pop up a window with the Windows installer...

This could look like this...

If this does not work...
... I might have forgotten something in this howto (in which case you please let me know)
... you did not fulfill all the requirements
... something bad happend.

After finishing the installation you should directly enable Rdesktop access to your box to significantly speed up the GUI.

After installation / graphical things

You might have noticed that it is quite boring that a window with the booting Windows™ pops up every time you start the Dom-U and that the Dom-U dies if you dare to close this window.

This is because of the usage of the SDL console (sdl=1).
If you do not want a "Pop-Up-Window" disabled SDL output by setting sdl=0 and enabling a VNC server by setting vnc=1.

This way Xen will start a VNC-Server which can be used to access the "local console" of your Windows™ system if needed.

Therefore you installed xvnc4viewer earlier :)

Conclusions

After all I liked my Windows™ Server 2003 running in a Xen domain when I managed to get it running.

The felt performance and interactive responsivness of the virtual Windows™ is really good and might be even better the the felt performance of other Windows™ systems running on real hardware.

After upgrading to Xen 3.2 the network performance with the default (virtual) rtl8139 NIC increased dramatically.

My Xen-Server is a Dell PowerEdge 1955 blade server with two Intel® Xeon® 3,3GHz CPUs, 4 GB of RAM and a RAID 1 of two 70G SAS disks. Let' see how much fun Xen with the soon-to-come SAN will be...