领先的中文IT技术网站    IT技术从现在起飞

飞诺旗下: 技术社区 | 在线电子书 | 在线试题 | 资源下载 | 飞诺搜索 | 技术博客
用户名: 密   码:
   飞诺网 加入收藏
飞诺网 Linux 新闻频道 开发频道 系统频道 服务器 网络频道 网络安全 Java频道 C/C++ PHP开发 电子书 资源下载 社 区 博 客 在线试题
操作系统 Linux Windows xp Windows 2003 Windows 2000/NT DOS Mac OS X Vista FreeBSD Solaris SCO UNIX AIX Windows 2008
编程开发 JAVA C/C++ C++ VC C语言 VB C# Delphi Foxpro 汇编 shell编程 游戏开发 软件工程师 WEB开发 PHP ASP Asp.net JSP AJAX CGI JavaScript HTML CSS 数据库 MSSQL Mysql Oracle Access Sybase DB2 sql2005 Office Word Excel Powerpoint Wps 认证考试 二级C语言 三级网络 程序员 网络工程师 思科认证

您当前的位置:飞诺网 >> linux >> Linux技术文章

My hard way to install Xen

www.firnow.com    时间 : 2009-09-25  作者:匿名   编辑:小张 点击:   [ 评论 ]



My hard way to install Xen

After I decided to research virtualization technology, my first task is to build a virtual cluster. Since I chould not get the root right from the HPC center, I had to make a try on my pc. First of all, I should install a virtual machine, and this is the start of my nightmare.

I google one paper named "Building a Virtual Cluster with Xen" which described the every detail, so I decided to implement it. I downloaded Ubuntu 9.04 CD img and Wubi.exe to install an Ubuntu in my pc, and I got the latest version of Xen, which is 3.4.1. I have to declare that, I have no internet where I do my work, so, many of you can imagine how bitter I suffered when I checked the prerequisites packages, finding that system lack of some. What's worse, some packages are not suitable because of its version. To solve it, I download the DVD img which can make me much more convenient to update those packages. However, some packages could not be satisfied in the end. And I found the installation needed internet access which made me very disappointing.

My senior told me to try KVM which is installed in Ubuntu. But, I found it was a false impression. I had to install Qemu. Soon, I found Qemu was not the key problem. The cpu of my pc does not support VT, that is, I could not run KVM. So I turned to VMware. The strange thing is I could not download the software because of the internet problem.

Suddenly, I found a paper named "Install Xen 3.3.1 in Federo 10" which told me how to install Xen offline. Since I have a Fedora 8 in Vmware, I immediately got down to working. I learned the last lesson in Ubuntu, I abondoned the idea to install a lower version of Xen. So I tried Xen 3.4.1. Ironically, this time, the verison of Fedora is too low to satisfy the Xen installation. I asked my another senior to download Fedora 11 DVD, and I hoped to release myself, because I felt so terrible during the course.

Unfortunately, the process of Xen installation on Fedora 11 is much shorter than 8, even if I tried Xen 3.3.0. I am nearly going crazy! Soon, I remembered when I installed Xen 3.0.1 in Fedora 8, the installation was succefully completed, yet I could not boot it, for some fd0 error. Desperately, I started installing Xen 3.3.1 in Fedora 8. "make"... "make install"... My heart flew up into my mouth when some errors appeared, however, the install process is still going, and I realized those are trivial ones.

Successful installation. After modifying the boot loader, I reboot the machine, waiting for the beautiful Xen interface. Yes, I have a Xen Liunx choice in boot, but I soon realized one similar error happened. This time, I believed I made some mistake in /boot/grub/menu.list. With the help of senior, I finally finished the correct modification.

Done! I could not help laughing! It has already taken me more than one week!

Running a xen in vmware is too slow, my next step is to install a Fedora 8 on my pc, and directly install Xen 3.3.0 in it. There's a long way to finish the virtual cluster, and also a long way to acquaint Linux and virtualization technology. However, after I made a successful installation of Xen, I believe I can do more!

Following is my steps of Xen 3.3.0 installation in Fedora 8, hoping to give you some help.

1.check packages

#cd xen3.3.0/tools/check
#./chk build

2.modify makefile

#vim xen3.3.0/Makefile
comment all lines of codes with 'stubdom'

3.modify hg

#vim xen3.3.0/buildconfigs/src.hg-clone
comment all lines of codes with 'hg'

4.generate linux-2.6.18-xen.hg

#cp linux-2.6.18-xen-3.3.0.tar ./xen3.3.0/
#tar -xzf linux-2.6.18-xen-3.3.0.tar
#mv linux-2.6.18-xen-3.3.0 linux-2.6.18-xen.hg

5.install

#make
#make install

6.install check. successful installation will give you following changes.

/etc/xen
/lib/modules
/boot


7.generate initrd-2.6.18.8-xen.img

#cd /boot
#mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18.8-xen.img 2.6.18.8-xen


8.Modify the boot loader

#vim /boot/grub/menu.lst

title  Xen 3.3 / XenLinux 2.6
root(hd0, 0)
kernel  /xen-3.3.gz dom0_mem=262144
module  /vmlinuz-2.6.18.8-xen root=/dev/VolGroup00/LogVol00 ro console=tty0
module  /initrd-2.6.18.8-xen.img

#sudo mv /lib/tls /lib/tls.disabled

9.reboot the machine, and verify that it boots into the Xen kernel, and check that Xen is running correctly by running the command sudo xm list, which should show that Domain-0 is the only machine at the moment.

 

 原文地址 http://blog.donews.com/frank777/archive/2009/09/08/1559392.aspx
如果图片或页面不能正常显示请点击这里
Linux技术文章推荐文章

文章评论