Running Windows on Xen

       199 words, 1 minutes

The NetBSD/xen port is able to run M$ Windows domU, since you have a CPU that features the Intel® VMX instruction.

First, ensure that your (Intel®) CPU has the correct feature ; I’m looking for the Intel® Virtualization Technology feature:

# cpuctl identify 0
cpu0: Intel Core 2 (Merom) (686-class), id 0x6f6
(...)
cpu0: features2 0xe3bd<SSE3,DTES64,MONITOR,DS-CPL,<strong>VMX</strong>,EST,TM2,SSSE3,CX16,xTPR,PDCM>
(...)
cpu0: "Intel(R) Core(TM)2 CPU         T7400  @ 2.16GHz"
(...)

The VMX feature means that I should be able to run any Xen-unaware OS.

I was able to run both Windows XP and Windows Server 2003 series using the following configuration file:

name = "whistler"

kernel = "/usr/pkg/lib/xen/boot/hvmloader"
builder='hvm'

memory = 320

vif = [ 'bridge=bridge0, type=ioemu' ]
device_model = '/usr/pkg/libexec/qemu-dm'

#disk = [ 'file:/home/xen/whistler/disk,ioemu:hda,w', 
#       'file:/home/xen/whistler.iso,ioemu:hdc:cdrom,r' ]
disk = [ 'file:/home/xen/whistler/disk,ioemu:hda,w' ]

#boot='d'

vnc = 1
vncdisplay = 1
vncunused = 0
vncpasswd = ""
vnclisten = '192.168.0.20'

usb=1
usbdevice='tablet'

To access the “console”, use a VNC client and connect to $VNCLISTEN on display 1 which should be port 5901. Configure and use TSE ASAP as it is much faster than VNC display.

Don’t try to install the Xen drivers from Citrix & friends. Those don’t work with NetBSD/xen AFAIK.

That’s All Folks!