This documentation was contributed by Scott Grayban ( sgrayban @ gmail.com ). They are specific to Debian, and may need modification for other Linux distributions :
Pre-Requisites for Installing a Windows Xen Guest
A XEN kernel must be installed and running at boot time.
Make sure you have HVM/VMX enabled in the bios - if you don't have this you can't run windows
In console type
xm dmesg | grep VMX
You should see...
(XEN) HVM: VMX enabled
If you don't you will need to restart the server and get into the BIOS and look for an option related to virtualization support.
If your BIOS does not have this you can not run any HVM guests, that means you can not run any version of Windows.
Turn off VNC for all xen linux guests and restart them.
vi /etc/xen/scripts/qemu-ifupand enter :
echo -c 'config qemu network with xen bridge for '
ifconfig $1 0.0.0.0 up
brctl addif eth0(your bridge) $1
Change to the xen directory for the rest of the steps with
Create blank 80GB disk image with :
dd if=/dev/zero of=xenwin.img bs=1024k seek=81920 count=0
apt-get install libcdio-utils
Get cd/dvd info and make sure its the right one
Create the WindowsXP ISO
dd if=/dev/(s|h)da of=Windows.iso
vi xenwin.cfgand enter :
kernel = "/usr/lib/xen-default/boot/hvmloader"
builder = 'hvm'
vif = [ 'type=ioemu,bridge=eth0,ip=assigned-ip,mac=22:61:34:00:00:01' ] MAC address has to start with 22:61:34 or 00:16:3e
address = 'assigned-ip'
netmask = '255.255.255.XXX'
memory = 1024
shadow_memory = 8
name = "xenhvm" # domain prefix name
cdrom = 'file:/xen/Windows.iso' # name of iso image you created above
disk = [ 'file:/xen/xenwin.img,hdc,w', 'file:/xen/Windows.iso,hdb:cdrom,r' ]
device_model = '/usr/lib/xen-default/bin/qemu-dm'
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot must be dc to install windows after that you change it to c or cd
boot = "dc"
boot = "c"
vnc = 1 # use VNC to insall and setup windows after that is done you can disable this
vncconsole = 0
vncpasswd = 'password'
vncviewer = 1
vncunused = 1
vnclisten = 'Domain-0 IP'
vcpus = 2 # number of cpu's to assign
stdvga = 0
serial = 'pty'
usbdevice = 'tablet' # Required for USB mouse
on_reboot = 'restart'
on_crash = 'restart'
Run the next 2 commands at the console
xm create xenwin.cfg
Make sure that the tapX interface is assign to ethX you set in bridge= vif setting
Type the next command at the console :
and continue with the windows install and setup
Setup your windows networking using the correct IP/mask/gateway/dns
Setup remote desktop access if you need/want it
Turn VNC off in the xenwin.cfg file by setting
vnc = 0
This step has to be done because XEN/qemu-dm will force the port to be 5900 and it will interfere with the other xen linux vnc guests.
Re-enable vnc for the xen linux guests if you turned them off in Step 2 and restart the guests.
Import the windows instance into Cloudmin at Add System -> Add Xen instance
You should be able to access the windows server via RDP(remote desktop) as Administrator and start/stop/reboot and manage the windows guest as a normal windows server.
That means you can run the updates or install any windows apps that you might need.
Note - The default passwords for Administrator and new user is temp1234 if you are using the paid version of my WindowsXP img file that is fully functional and ready to use.
YOU MUST HAVE already bought WindowsXP and have a valid license to get the XEN img file, at order time you will have to electronically sign that agreement. Cloudmin might offer a free Windows ISO at some point.
For information above pricing of Xen Windows images, see https://www.borgnet.net/clients/knowledgebase/13/Debian-Lenny-WindowsXP-HVM-HOWTOorsetup.html