I've been wanting a home lab for XenServer for quite some time. My major dilemma has been cheapness. I didn't want to spend $400 to build a cheap whitebox server. Also, I didn't need the lab on at all times. So this past Saturday afternoon, I decided to use a spare 500GB hard drive and setup dual booting on my existing Windows 7 x64 machine.
Hardware:
ASUS M4A785TD-M EVO
AMD Phenom II Black Edition
6GB RAM
Primary hard drive for Windows 7 x64
Secondary hard drive for XenServer 5.6 FP1
Software:
XenServer 5.6 FP1
Windows was already installed and happily loading just fine. So, I took the second hard drive and installed it in my machine. I then modified the hard drive order in BIOS to bring the new hard drive to the number 1 position. I went through a typical XenServer install and chose the new hard drive to store my VM's.
XenServer booted just fine. Well, almost just fine. The on board Realtek NIC was found by XenServer but for some reason the XenServer install kills the NIC. I had to unplug the power to the machine before my NIC would come back to life (I went through this scenario several times to verify these results and I'm still not sure why this is happening). The next hiccup, was that even though XenServer now can see the NIC and see that it is connected, there was no network traffic. I searched for a Linux driver for this NIC to no avail. I ended up ordering a DLINK NIC that is on the XenServer HCL from newegg.com for around $18. I should get the NIC sometime this week.
Now on to the fun stuff. I tried searching for someone who is dual booting between Windows 7 and XenServer and did not find much. I did some digging and found XenServer 5.6 FP1 uses extlinux as its bootloader. After doing some more research on chainloading (to pass control of the boot manager to a boot sector) I found the configuration that is able to boot Windows 7 from the XenServer extlinux bootloader. The configuration file is /boot/extlinux.conf, and you can see my modifications below:
default menu.c32
prompt 0
ontimeout windows
timeout 100
label windows
# Windows 7
kernel chain.c32
append hd1
The default menu.c32 loads a boot menu, so you can choose what OS to run. I set the timeout to 100 (10 seconds) and when that expires it uses the ontimeout section which then goes to the windows label. The label windows is what you will see in the boot menu. The kernel chain.c32 tells the boot loader that chainloading is going to be used. The line append h1 is where you specify the hard drive of where the Windows bootloader is.
It took some time to get it working. But, this is just one way to accomplish this fun weekend project. Others have used EasyBCD, which is a boot loader configuration tool for Windows instead of modifying extlinux, but where is the fun in that. Please leave your questions or comments below.
**Update**
Remember to backup your settings in extlinux.conf. When you upgrade XenServer, those settings will be overwritten.
Well it sounded like a dream come true to me since im searching the whole net for an answer on this windows 7/Xenserver dual boot question. But this also doesnt work for me. My 7 is installed on a raid and Xenserver doesnt see the raid. So do you have any idea how to setup the EasyBCD boot settings?
ReplyDeleteI haven't done it myself, but what you would need to do is find a way to chainload from easybcd to extlinux. I've also seen some install Grub on XenServer so that can give you some more options as well.
ReplyDeleteNice Work! It work with xenserver 6.0 and windows 7.
ReplyDeleteI have one problem, on the boot menu, times is in a loop state. By default never chooses an OS.
Any ideas?
Thanks.
Right after I configured the menu I set it back to extlinux's original boot menu as I liked that much better (quicker for me) and my wife complained less. To make it work like how you want it with how I have it setup make the following changes from:
ReplyDeletedefault menu.c32
prompt 0
ontimeout windows
timeout 100
To:
default [label name] (e.g. default windows7)
prompt 1
timeout 100
Thanks for sharing.
ReplyDeleteJust a quick question, is it not possible to create a new partition and install Xenserver on this newly created partition or do you have to instal it on a new disk ?
Cheers, Zacki
You could, but then you would have to make Windows (assuming Windows is on the first partition) handle the boot load process and make sure both Windows and XenServer are available for boot. I personally like the loader on XenServer better than messing with Windows alternatives, so you could start out with a new hard drive and create 2 partitions, The first for XenServer and the second for Windows. You would then need to modify just the XenServer boot loader with the appropriate parameters.
ReplyDeleteAnother idea, would be to have another boot device (maybe even a flash drive) with a boot Linux boot loader on it, then you could possibly plug it in every time you want to access XenServer and just boot to the flash drive and choose the XenServer boot option once you have it configured. I never tried this but it might work.
Thanks for the article - very useful and informative. I now have a useful XenServer and Win7 combo box :)
ReplyDeletethanks for that. really helpful
ReplyDelete