|
|
Windows XP in XENFrom ezUnix
IntroductionXen is like the Mach microkernel, where you can have multiple operating systems running at once and a thin kernel handles switching between them and managing device access. This thin layer in Xen is called the hypervisor, and is analogous to the Mach microkernel. It provides an idealized hardware layer that you port your OS to, and in return you get the ability to run multiple operating system instances at once (e.g., run two copies of Redhat's latest, one copy of the Novell Desktop, and an NetBSD), freeze and restore snapshots of a running OS, and more.
RequirementsCPU with Intel's VM or AMD's AMD-V technology.
PreparationCreate the Xen disk image. This image file will be used as a "hard drive" for your installation.
# dd if=/dev/zero of=winxp.img bs=1M count=20480
InstallationInstall meta package with all the software needed to run a XEN DOM0 server: # apt-get install ubuntu-xen-server You will need to reboot your computer and boot the XEN kernel. It will be automatically added to your grub menu. After reboot you may want to start xen tools with following command: # /etc/init.d/xend start
Configuration filesEdit /etc/xen/xend-config.sxp and make sure the (network-script network-bridge) and (vif-script vif-bridge)
options are not commented.
#Kernel and memory size kernel = '/usr/lib/xen/boot/hvmloader' builder = 'hvm' memory = '512' vcpus=1 pae=0 acpi=0 apic=0 #cpus = device_model = '/usr/lib/xen/bin/qemu-dm' disk = [ 'tap:aio:/home/fridge/virtual/windows/winxp.img,ioemu:xvda,w', 'phy:/dev/scd0,ioemu:xvdc:cdrom,r' ] #disk = [ 'tap:aio:/xen/winxp.img,ioemu:xvda,w', 'tap:aio:/some_place/winxp.iso,ioemu:xvdc:cdrom,r' ] #disk = [ 'phy:/xen/winxp.img,ioemu:hda,w', 'file:/some_place/winxp.iso,ioemu:hdc:cdrom,r' ] # Hostname and Networking name = 'winxp' vif = [ 'type=ioemu, bridge=xenbr0, mac=00:00:00:ff:fe:01' ] # Behaviour boot = 'd' #d is cdrom boot, c is disk boot. nographic='0' vnc = '01' vncviewer = '1' sdl='0' audio='1' soundhw='sb16' stdvga='0' serial='pty' ne2000='0' on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' Note that the "boot='d'" designates that this Xen image should boot off of the 'cdrom image'.
Also note that this image is set to place the console onto a VNC enabled terminal. You can also use SDL to access the graphics console. Here you can find a fully commented config file: Windows.txt Installing Windows XP in XENRestart XEN after you changed the config files: # /etc/init.d/xend restart Put your Windows XP install CD into CD tray and begin installation: # xm create winxp It should show something like # xm create winxp Using config file "/etc/xen/winxp". VNC= 1 Started domain winxp
# vncviewer 127.0.0.1:0 Note that the VNC session number (:0 above) matches to the Xen Domain ID for the session you just created.
Press F8 when prompted to accept license and chose Send F8 from the vncviewer menu that pops up.
Once installed - using rdesktopDon't be too worried about the problems with the VNC console. You only really need to use it to do the initial install & setup.
ControlPanel->System->Remote tab Enable that - and you can then connect to your client with Remote Desktop.
Cave CatsThe vncviewer may hang sometimes not showing any progress. Simply restart it to fix this problem.
Additional SoftwareTo make your life easier you may want to install virt-manager which is a desktop user interface for managing virtual machines.
ScreenshotsAnd some obligatory screnshots:
References
|

