Articles about computing. What are you interested in?

.htaccess, android, apache, bloxsom, bluetooth, broadcast, case, chat, client-server, command-line, configuration, cool'n'quiet, cooling, cpu, disk suspension, dsl, error, fan, fan controller, file management, firefox, firewall, freeware, google, google earth, gpg, gps, grub, hardware, heatsink, howto, images, internet, jabber, lapping, linux, measurement, messaging, motherboard, mp3, mysql, network, password, pda, perl, phone, programming, programming , qemu, rdp, regex, router, screen recording, script, security, shell, silencing, software, spreadsheet, spyware, system recover, tools, ubuntu, virtualization, visual basic, VMWare, vnc, vpn, web, windows, wireless, xen, xmpp, xp

Running Windows XP in Xen from its own partition

Some months ago I made some experiments with Xen and I succeeded to install and run Windows XP as a guest using Xen 3.0. In that case Windows was located in a single file and was installed through Xen. My purpose now is to make Xen running an already installed Windows from its own partition. Just to be more specific, this is my machine configuration: I want to log into linux and run my existing Windows XP from its own partition on the EIDE disk.

I previously tried to reach this goal but I only got grub error "GRUB loading stage 1.5" and "Error 21", meaning an unknown error during the boot process.

After upgrading the packages Ubuntu was proposing I decided to try again and I downloaded and compiled Xen 3.0.4 (see the packages to be installed first in my other post about running Windows inside Xen):
# cd /usr/src
# hg clone
# cd xen-3.0.4-testing.hg
# make world
# make install
The next steps are exactly the same I wrote here, replacing with as the kernel version and 3.0.2-3 with 3.0.4-1 as Xen version. I briefly report them here:
# mv /lib/tls /lib/tls.disabled
# cd /boot
# /sbin/depmod -a 2.6.16-xen
Edit /etc/mkinitramfs/modules: loop max_loop=64
# cd /boot
# mkinitramfs -o initrd.img-
# ln -sf initrd.img- initrd.img-2.6-xen
In /boot/grub/menu.lst I did nothing because I already had this:
title Xen 3.0 / XenLinux 2.6 
kernel /boot/xen-3.gz dom0_mem=1024000
module /boot/vmlinuz-2.6-xen root=/dev/sda1 ro
module /boot/initrd.img-2.6-xen
(my machine has 2GB of RAM: I reserved 1GB to Xen and I will give the other 1GB to Windows guest).
Instead I had to do these steps again:
# mv /etc/udev/rules.d/xen-backend.rules /etc/udev/rules.d/92-xen-backend.rules
Then edit /etc/init.d/xend after "/proc/xen/capabilities":
if [ ! -d /var/run/xend ] ; then
    mkdir -p /var/run/xend

if [ ! -d /var/run/xenstored ] ; then
    mkdir -p /var/run/xenstored
And edit /etc/init.d/xendomains:
After rebooting my pc I checked Xen was using 1GB only:
# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      965     2 r-----   132.5

I already knew that my pc has AMD hardware virtualization capabilities, but let's check again if it's enabled (look for svm):

# cat /proc/cpuinfo | grep svm
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx 
mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx 
mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
# xm dmesg | grep SVM
(XEN) AMD SVM Extension is enabled for cpu 0.
(XEN) AMD SVM Extension is enabled for cpu 1.

And now the challenge begins!


Posted by: Z24 | Wed, May 04 2011 | Category: /linux | Permanent link | home
Tagged as: , , , , , ,

Did I save you time or trouble?

Thanks ;-)
Search MyComputingArt

word word = any word
+word +word = all the words
regexp pattern

Search hardware reviews


since August 2006

free counters
since September 2009

Powered by Blosxom
FlagCounter Locations of visitors Map

Valid HTML 4.01 Strict    Valid CSS!

To contact the webmaster and author write to: info<at>mycomputingart<dot>com
©, year(today()).