The occurrence of Xen is fictitious the one big breakthrough that changes a technology,The operating system is mixed in the traversal speed in Xen fictitious machine comparative almost in the traversal speed on hardware directly,This is in before is impossible,We enter this together below extremely fast fictitious world...
Installation Xentoo need not learn Xen deep fictitious machine,The moving mechanism that simply understands it and a few basic technical terms are enough:
Xen:
Xen is to be in what Cantabrigian university studies as the project is developed,Open a source below GPL license at present.Xen is by the definition half fictitious change (Paravirtualizing) VMM (fictitious machine monitor,Virtual Machine Monitor) ,This expresses,To call systematic government program,Should revise an operating system selectively,The applied program that does not run on need modification operating system however however.Although VMWare other and fictitious changed a system to come true complete fictitious change (they need not revise the operating system in using) ,But they still need to undertake real time machine code is translated,This meeting affects performance.Present Xen should hit a patch for the kernel,But,The processor in the future can support fictitious change,The kernel also did not need to hit a patch.E.g. ,The Pacifica processor of the VT of Intel and AMD will include this kind of support.XenSource company was in in August 2005 Intel developer forum (IDF) on make a statement say,The VT-Enabled platform that it has used Intel and Xen technology are fictitious changed Linux and Windows XP SP 2.
Dom0, domU:
In Xen," systematic government program " (Xen oneself is called " systematic government program " ,Because it manages code to run requires prerogative course than the system of client OS,be tall still.) move in 0 annulus,Client OS moves in 1 annulus,Applied process moves in 3 annulus.When the system guides,Xen is laded in the memory of 0 annulus.It starts the kernel that has repaired on 1 annulus,This is called to be Domain 0 (Domain is the fictitious machine in showing one moves,There is a Guest OS on its carrying out) .Begin from this Domain,You can be founded and manage more Domain,These Domains a general designation are Domain U.At present,The Linux kernel that has repaired 2.4 and 2.6 can serve as Domain 0,And physical equipment driver can move in prerogative class only,Namely on Domain 0.
Gentoo:
Gentoo Linux is a Linux system that is based on source bag.And already some commerce publish edition photograph than,Gentoo is very distinctive.
The commercial Linux nowadays is issued edition the installation course that offerred an almost complete automation.After automatic hardware detects,You should answer a few questions only,Differentiate hard disk is OK.A little while kongfu,All things had been installed,You should be landed only went.
The installation process of Gentoo is to be based on what the command goes,Having a thing hardly is automatic those who finish.Major setting is to pass use editor handiwork to install what configuration file finishs,Installation process can spend many time.
The installs a process to be able to regard as Linux course of Gentoo.The knowledge that you can acquire very much concerned system from which.Many measure is manual finish,Spent a lot of time,But evermore,The Linux that you can understand you better worked systematically.
Gentoo still uses specific ground to compile implement option compiler,These option can generate the CPU that is you to optimize code custom-builtly.
Besides,You still can be joined or take out is certain compile a feature.Final result is a need that accords with you optimize, personalized system.
Xentoo:
A term that starts newly,Be synthesized by Xen+Gentoo and come,The Gentoo that means runs on Xen,In the article,The representing's is a solution
So,Why should have Xentoo?
Because Gentoo is having afore-mentioned a lot of advantage,Like by Linux lover,The because be operated by accident,brings about hard disk very easily data when nevertheless abecedarian is installed is completely annihilated,And still must the edge sees the installation side manual,Accordingly many people install Gentoo with VMWare,But VMWare itself efficiency is not tall,Bring about installation and the time with the wasteful and many meeting when moving Gentoo.One day,Linuxfans people couldn't help eventually,Say to want to have Xentoo,Had Xentoo then...
Perfect installation Xentoo,Basically divide 3 level:
The first phase: ?ew kernel of En of dark blue ? and Dom0, test Xen
1.1, this installation experience basically consults Xen Users' Manual, must read this documentation seriously before installing Xen
1.2, what preparation wants software: XEn binary system installs a bag: XEn-2.0.7-install-x86_32.tgz and Xen source code are wrapped: XEn-2.0.7-src.tgz, and in documentation of Xen User's Manual + date software (place of installation moving Xen needs) , the software of * date (compile Xen place to need) (the executive file that Xen includes inside binary bag and had revised Linux2.4/2.6 kernel, but these kernels just are configured basically, almost all (the net gets stuck, sound gets stuck, wait for hardware) drive was not compiled go in. If want to experience Xen truly, to make hardware gets correct drive, should use a source to undertake compiling installing)
It is the place that mentions in Xen User's Manual wants software below:
+ The Iproute2 Package.
+ The Linux Bridge-utils (http://bridge.sourceforge.net)
+ The Linux Hotplug System (http://linux-hotplug.sourceforge.net/ )
* Twisted V1.3 or above (when compiling Xen, get through Make Install-twisted)
* Build Tools (gcc V3.2.x Or V3.3.x, binutils, GNU Make)
Development library of * Libcurl (Libcurl-devel)
Development library of * Zlib (Zlib-dev)
V2.2 of development library of * Python or above (Python-dev)
* LATEX(is used at generating documentation)
** includes installation from the binary system, install.sh is carried out to install after solution is pressed (it can detect what want software all ready, won't install) otherwise, after finishing, jump to 1.9
Measure basically introduces to be installed from Src under ** (2.4 have a bit with the installation means of 2.6 different, the introduction below can be aimed at the kernel of these two kinds of version at the same time)
1.3, solution pressing
#cd /tmp
#wget Http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-2.0.7-src.tgz
#tar -zxvf Xen-2.0.7-src.tar.gz
#cd Xen-2.0
1.4, the Makefile(that reads Xen is very simple, ten a few, basically did what work to solve Make, prepare to next modification, if the kernel is 2.6, this one pace can have jumped)
1.5, modification Makefile, (The basis needs to revise, the kernel is of 2.6 can jump over.Xen-2.0.7 of this one pace to support Linux-2.4.30 only at present, linux-2.6.11, netbsd-2.0, freebsd-5.3)
It is the Redhat9 that is aimed at me below, the modification of 2.4 kernelsKERNELS? = Linux-2.6-xen0 Linux-2.6-xenU
InsteadKERNELS? = Linux-2.4-xen0
Xen0 is the core of Host Os - Domain 0, and the core that XenU regards Guest Os - Domain U as, need not need any hardware driver.
Here does not compile XenU temporarily, basically be to save a few time, at the back the kernel that in Xen binary system is being used to install a bag directly when installing Gentoo, has compiled beforehand. Because my machine is slower, compile a kernel to want 2, 3 hours, everybody can decide to whether compile XenU according to his real need
1.6, source of duplicate Linux kernel (Bz2 format) arrive inside Xen-2.0 catalog (net fast fast can jump over this one pace, xen can download corresponding kernel from automatic net)
1.7, the.config document that uses oneself compiles a kernel: (Basically be with mine 2.4.30 kernels are below exemple, identical to 2.6 kernels principle, can according to oneself actual condition undertakes modification)
The Bug of program of patch of kernel of 1) , Xen, do not revise this, compile a kernel to be able to make mistake: (Do not have this Bug to 2.6 kernels, can jump over this one pace)
Modification Linux-2.4.30-xen-sparse/mkbuildtree
Find Cd ${AD}/include/asm-xen to join below: Ln -sf. . / Asm-i386/acpi.hLn -sf. . / Asm-i386/cobalt.hLn -sf. . / Asm-i386/e820.hLn -sf. . / Asm-i386/edd.hLn -sf. . / Asm-i386/hc_sl811-hw.hLn -sf. . / Asm-i386/lithium.hLn -sf. . / Asm-i386/pci-direct.hLn -sf. . / Asm-i386/save_state.hLn -sf. . / Asm-i386/sl811-hw.hLn -sf. . / Asm-i386/smpboot.h
2) , make Xen automatic hit a patch to the kernel, end in the patch break down program (must break down program, otherwise the Defconfig that Xen can use it to acquiesce, this configuration does not have any hardware drive)
#make Kernels
After inputting a command, xen can download kernel source automatically and hit a patch, hit a patch, when preparing Make kernel (at this moment screen shows) of information of one pile Config, press program of Ctrl+c break down.
The configuration file of duplicate and 3) , existing kernel arrives Linux-2.4.30-xen0
#cp /boot/config-2.4.30 Linux-2.4.30-xen0/.config
#cd Linux-2.4.30-xen0
#make ARCH=xen Oldconfig
What clew adds newly is meet concern the option of Xen during, choose Y entirely
4) , compile a kernel
#make ARCH=xen Dep
#make ARCH=xen Modules
#make ARCH=xen Modules_install
#make ARCH=xen Install
5) , installation and the Modutils(with kernel corresponding version are referenced Linux-2.4.30-xen0/Documentation/Changes)
6) , TLS Libraries (this is bar of Xen Users' Manual 2.4.3 medium textual, according to oneself actual condition is handled)
Users Of The XenLinux 2.6 Kernel Should Disable Thread Local Storage (e.g. By Doing A Mv /lib/tls /lib/tls.disabled) Before Attempting To Run With A XenLinux Kernel2.4. You Can Always Reenable It By Restoring The Directory To Its Original Location (i.e. Mv /lib/tls.disabled /lib/tls) .
The Reason For This Is That The Current TLS Implementation Uses Segmentation In A Way That Is Not Permissible Under Xen. If TLS Is Not Disabled, an Emulation Mode Is Used Within Xen Which Reduces Performance Substantially.
We Hope That This Issue Can Be Resolved By Working With Linux Distribution Vendors To Implement A Minor Backward-compatible Change To The TLS Library.
Carelessness is to use the user of 2.6 kernels to need to prohibit TLS (carry out this command #mv /lib/tls /lib/tls.disabled) , otherwise function can drop
** to the kernel of 2.6, can compile according to configuration of the proper motion after each afore-mentioned principles are revised accordingly
1.8, all modification be in order, compile installation Xen
Xen still needs to use 3 software (Twisted Matrix Framework, python Logging Package, iptables) , if some does not have to be able to install with the following command on the machine:
#cd /tmp/xen-2.0
#make Install-twisted;
#make Install-logging;
#make Install-iptables;
Begin to compile installation next (I do not have Latex, do not compile Doc so)
#make Install-xen;
#make Install-tools;
** attention, here does not carry out Make Kernels or Make Install-kernels again, because be in the 7th pace we already installed the new kernel that is revised by Xen via the hand moves configuration and be being compiled
1.9, revise the configuration that start / of the machine that the 128M memory that is aimed at 2.4 kernels and me is under Boot/grub/grub.conf (, xen occupied 12M left and right sides probably, if 2.6 kernels and older memory undertake be modificationed accordingly, recommend strongly use 256 or more memory)
Add: Title Xen 2.0 / XenLinux 2.4Kernel /boot/xen-2.0.gz Dom0_mem=53248Module /boot/vmlinuz-2.4-xen0 Root=/dev/hda2 Ro Console=tty0
1.1, test Xen, configuration Ttylinux
1) , download is solved press Ttylinux (http://sf.net/projects/xen/ )
#cd /tmp
#wget Http://jaist.dl.sourceforge.net/sourceforge/xen/ttylinux-xen.bz2
#bzip2 -d Ttylinux-xen.bz2
2) , found configuration file: / Etc/xen/auto/ttylinux
Content: Kernel = "/boot/vmlinuz-2.6-xenU "Memory = 64Name = "ttylinux "Nics = 1Ip = "1.2.3.4 "Disk = ['file:/tmp/ttylinux-xen, sda1, w' ]Root = "/dev/sda1 Ro "
** if / there are Vmlinuz-2.6-xenU or Vmlinuz-2.4-xenU inside Boot, can install a bag from the binary system of Xen / get in Boot catalog
3) , new start, enter XenLinux, executive command, found Domain(to start a fictitious Ttylinux namely)
#xend Start
#xm Create /etc/xen/auto/ttylinux -c
Examine the detailed use of Xm:
#xm Help
If Ttylinux is started smoothly,enter Login interface, and can Ping gets, the installation that proves the first phase succeeded basically.
The second phase: ?mU - Xentoo of dark blue ?
Here is to discuss the method that how install Gentoo to the file as DomU and is not true partition, unlike HOWTO_Xen_and_Gentoo
Basically consult hard disk of %26lt;Gentoo Linux installs referenced guideline %26gt; , %26gt; of manual of %26lt;Gentoo Linux X86, %26lt;Xen Users' Manual%26gt;- "A. Installing Xen / XenLinux On Debian "
2.1,
Make file of hard disk image above all (Root:4G, boot:32M, swap:256M) , if install hard disk partition directly, can jump over this one pace
#dd If=/dev/zero Of=xentoo-root.image Bs=1024k Count=4000
#dd If=/dev/zero Of=xentoo-swap.image Bs=1024k Count=256
2.2, the format changes file system (if install hard disk partition directly, criterion Image file name the equipment name with corresponding instead)
#mkfs.ext3 Xentoo-root.image
#mkswap Xentoo-swap.image
2.3, hang outfit partition to newly-built list (if install hard disk partition directly, criterion Image file name the equipment name with corresponding instead, and Mount command must not want Loop parameter)
#mkdir /mnt/gentoo
#mount -o Loop Xentoo-root.image /mnt/gentoo
2.4, download and the root that solution presses Stage3(http://mirror.gentoo.gr.jp/releases/x86/2005.1/stages/) to put Gentoo namely / Mnt/gentoo (download corresponding bag according to his CPU)
#cd /mnt/gentoo
#wget Http://mirror.gentoo.gr.jp/releases/x86/2005.1/stages/i686/stage3-i686-2005.1.tar.bz2
#tar -xvjpf Stage3-i686-2005.1.tar.bz2
2.5, setting system environment
#chroot /mnt/gentoo /bin/bash
Add DNS: Echo %26quot;nameserver 202.96.128.86%26quot; %26gt;%26gt;/ Etc/resolv.confEcho %26quot;domain Xenlinux%26quot; %26gt;%26gt;/ Etc/resolv.conf
Modification Root password
#passwd Root
Revise / Etc/fstab
/ Dev/sda1 / Ext3 Errors=remount-ro 0 1
/ Dev/sda2 None Swap Sw 0 0Proc /proc Proc Defaults 0 0Shm /dev/shm Tmpfs Nodev, nosuid, noexec 0 0
Exit
#exit
#umount /mnt/gentoo
2.6, found Xen to configure a file / Etc/xen/auto/xentoo (is recommended use 256 or more memory)
Kernel = "/boot/vmlinuz-2.6-xenU "Memory = 64Name = "xentoo "Nics = 1Ip = "192.168.0.3 "Gateway = "192.168.0.1 "Disk = ['file:/mnt/xentoo/xentoo-root-image, sda1, w' , 'file:/mnt/xentoo/xentoo-swap-image, sda2, w' ]Root = "/dev/sda1 Ro "
If ** installs hard disk partition directly, criterion Disk that group instead:Disk = ['phy:hDaX, sda1, w' , 'phy:hDaY, sda2, w' ]
HdaX, the Root partition of Xentoo of your deal out mixes HdaY correspondence Swap is divisional
2.7, the Xentoo that start
#xend Start
#xm Create /etc/xen/auto/xentoo -c
If do not have an accident to be able to enter Xentoo to log onto an interface
Afore-mentioned all operations were equivalent to the installation of Gentoo having the following move
# Chroot /mnt/gentoo /bin/bash
# Env-update
# Source /etc/profile
2.8, necessary software is installed in Xentoo
#emerge- - I used 1h here)
#emerge Fvwm (fvwm is the smallest the fastest, 3h)
The configuration method with the swiftest Fvwm:
#cp /usr/share/fvwm/system.fvwm2rc-sample-95 ~/.fvwm/.fvwm2rc
Installation and configuration Gentoo do not belong to article discussion limits, undertake according to the manual of Gentoo and oneself need sequel is installed please
After installation is over, clear rubbish file (Rm -rf /usr/portage/distfiles/*;rm -rf /var/tmp/* )
2.9, configuration Xwindow
Startx cannot be used below Xentoo, do not want anxious configuration XF86Config so, a few kinds of methods enter X:
* Forward X11 Apps Through Ssh (connect To The Domain With Ssh -X, run AnXterm - It Should Just Appear) .
* Run "vncserver" In The Guest, connect To It From Dom0 (or Any Other System) .
By Playing With Your Gdm / Kdm / Xdm Config, you Can Cause The Vncserver ToBe Started Automatically And Display The Login Screen.
* Run Xnest In Dom0, tell Apps To Connect To That Instead Of A Local Xserver.
* Run FreeNX Server In The DomU, connect To It Using The Free (as In Beer)Client From NoMachine. NX Performs Well And Can Do Nifty Things LikeForwarding Sound, printing And Local Filesystems (if You Can Figure Out HowTo Set It Up! To Set It Up!!
Here, it is with VNC exemple, referenced HOWTO Xvnc Terminal Server undertakes configuration, VNC of have the aid of can enter graphical interface very easily: -VNC of have the aid of can enter graphical interface very easily: -
According to documentation configuration is over, if be carried out directly / Etc/init.d/xdm Restart, still can make mistake, / Var/log/xdm.log: Xf86OpenConsole: Cannot Open /dev/tty0 (No Such File Or Directory)
Why? Oh, so I did not install Kdm and Gdm, can use Xdm only so:
Revise / Etc/X11/xdm/Xservers:
: 0Local /usr/bin/X
Instead
: 0Local /usr/bin/Xvnc -geometry 800x600 -depth 16
Modification ~/.xsession:
Add
# ! / Bin/bashExec /usr/bin/fvwm
Start Xdm afresh:
#/etc/init.d/xinetd Restart
#/etc/init.d/xdm Restart
Return Domain0, moving Vncviewer, receive DomU repeatedly can
2.1, the item that compiles new kernel to want to notice in Xentoo
Compile a process to ask referenced HOWTO Xen And Gentoo
Compile after finishing, poweroff, return in Dom0, duplicate new kernel come out, replace old kernel
#mount -o Loop Xentoo-root.image /mnt/gentoo
#cp /mnt/gentoo/usr/src/linux-2.6.x.y-xen/vmlinuz /boot/vmlinuz-2.6.x.y-xenU
#umount /mnt/gentoo
Revise / Etc/xen/auto/xentoo: Kernel = "/boot/vmlinuz-2.6.x.y-xenU "
Start Xentoo again can
#xm Create /etc/xen/auto/xentoo -c
Install here basically success, can begin to enjoy extremely fast fictitious Xentoo...
Need explains, caption place says extremely fast when installing Gentoo, the experience is less than, because Gentoo is the emission that is based on a source edition, the process that installs Gentoo is an education patience so. I looked with Emerge -p Gnome, need installation is wrapped 200 times almost, exceed the source code of 500M, day, if use my PII400/128M/6.4G to compile, the likelihood should be spent 5, between 6 climate, so I just install the smallest Fvwm. Compare however by traversal speed Gentoo other issue edition is fast many, the flower nods time installation or worthiness. The welcome communicates precious opinion, yi younger sister of the author: Lostfalcon @ Tom.com, reprint ask give chapter and verse for.
The third phase makes Gentoo can be started alone (break away from Xen)
Compile new kernel (Emerge Gentoo-source) , according to oneself actual condition undertakes configure and be compilinged
Divisional to installing hard disk directly, modification Grub can
To installing Image file, search relevant documentation please
Appendix:
1, fictitious machine of comprehensive introduction Xen (Http://tech.ccidnet.com/art/289/20050905/325111_1.html)
2, Xen Users' Manual (http://www.cl.cam.ac.uk/Research/SRG/netos/xen/readmes/user/ )
3, brief introduction of Gentoo Linux (Http://www.huihoo.com/gentoo/ )
4, manual of Gentoo Linux X86 (Http://www.gentoo.org/doc/zh_tw/handbook/handbook-x86.xml? Full=1)
5, HOWTO Xen And Gentoo (http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo)
6, does hard disk of Gentoo Linux install referenced guideline (Http://www.linuxfans.org/nuke/modules.php? Name=Forums%26amp;file=viewtopic%26amp;t=5921)
7, How To Run Xwindows In The Guest OS (http://lists.xensource.com/archives/html/xen-users/2005-09/msg00630.html)
8, HOWTO Xvnc Terminal Server (http://gentoo-wiki.com/HOWTO_Xvnc_terminal_server)
Textual link:Http://linuxfans.org/nuke/modules.php? Name=Forums%26file=viewtopic%26t=136229
...