This is probably the most difficult experience I got from Linux lately. Indeed xen is powerful, but it still got many bugfixes to work on. Once you stepped on one it will take a long time to fix it. One tough nut to crack.
I got Pentium D in my box and it supports VT, so it's possible to execute Windows without any modification to the Window's kernel (which is not a good idea). The related information could be found here.
The box is running on Debian testing (etch). Here is the easiest setup I found so far:
Use apt-get install or aptitude to install the following packages:
linux-image-xen-686
xen-ioemu-3.0.3-1
The rest will automatically installed by dependency. Once you finished, reboot to the grub option "Xen 3.0.3-1-i386". Add a new file called /etc/xen/winxp:
kernel = "hvmloader"
builder='hvm'
memory = 512
name = "winxp"
vif = [ 'type=ioemu, bridge=xenbr0' ]
disk = [ 'file:/home/xen/disk.img,ioemu:hda,w',
'file:/home/xen/winxp.iso,hdc:cdrom,r' ]
#cdrom = '/dev/hda'
device_model = 'qemu-dm'
boot="dca"
sdl=1
vnc=0
nographic=0
localtime=1
Notice the 'disk' line. We have to use the cd image, so the win xp iso file must be prepared first.
dd if=/dev/cdrom of=winxp.iso
Right now we can't actually use the real /dev/cdrom because the qemu-dm that comes with this version seems still got problems. Then we modify /etc/xen/xend-config.sxp, and make sure the following lines are unmarked.
(network-script network-bridge)
(vif-script vif-bridge)
Remember to restart /etc/init.d/xend once you finished. Then
sudo xm create winxp
I cannot run it as root because the SDL will not be able to find the display. Doesn't matter, just sudo it. The win installation screen should appear now. After the installation, mark the 'boot' line in /etc/xen/winxp to let it boot by the default order hd->cdrom->floppy.
The Windows runs fairly fast on xen. It doesn't feel like it's running on a VM, instead it feels like native. I think xen did what it promised to do.
沒有留言 :
張貼留言