Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 62233 Details for
Bug 70161
Ebuild to be used with the source and or binaries of Xen
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
html version of guide
xen.html (text/plain), 30.10 KB, created by
Edward Middleton
on 2005-06-29 07:50:01 UTC
(
hide
)
Description:
html version of guide
Filename:
MIME Type:
Creator:
Edward Middleton
Created:
2005-06-29 07:50:01 UTC
Size:
30.10 KB
patch
obsolete
><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ><html> ><head> ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ><link title="new" rel="stylesheet" href="./css/main.css" type="text/css"> ><link REL="shortcut icon" HREF="favicon.ico" TYPE="image/x-icon"> ><title>Gentoo Linux > Documentation >-- > Gentoo Xen Linux Guide</title> ></head> ><body style="margin-left:0px;margin-top:0px;" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0"> ><tr><td valign="top" height="125" bgcolor="#45347b"><table cellspacing="0" cellpadding="0" border="0" width="193"> ><tr><td class="logobg" valign="top" align="center" height="88"><a href="/"><img border="0" src="images/gtop-s.jpg" alt="Gentoo Logo"></a></td></tr> ><tr><td class="logobg" valign="top" align="center" height="36"><a href="/"><img border="0" src="images/gbot-s.gif" alt="Gentoo Logo Side"></a></td></tr> ></table></td></tr> ><tr><td valign="top" align="right" colspan="1" bgcolor="#ffffff"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> ><td width="99%" class="content" valign="top" align="left"> ><br><p class="dochead">Gentoo Xen Linux Guide</p> ><form name="contents" action="http://www.gentoo.org"> ><b>Contents</b>: > <select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" style="font-family:Arial,Helvetica, sans-serif; font-size:10"><option value="#doc_chap1">1. Xen concepts</option> ><option value="#doc_chap2">2. Gentoo in domain0</option> ><option value="#doc_chap3">3. Gentoo in domainN</option> ><option value="#doc_chap4">4. Tips/Tricks/Thoughts/Hacks/etc</option> ><option value="#doc_chap5">5. References</option></select> ></form> ><p class="chaphead"><span class="chapnum"><a name="doc_chap1">1. </a></span>Xen concepts</p> ><p class="secthead"><a name="doc_chap1_sect1">Introduction </a></p> ><p> >Xen is designed to allow you to run multiple operating systems simultaneously on >a single computer with <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/performance.html">performance</a> close to that of a native operating system . ></p> ><p> >In order to understand how this is possible some concepts need to be >understood. ></p> ><p class="secthead"><a name="doc_chap1_sect2">Basic Problems </a></p> ><p> >In order to run two or more operating systems simultaneously on the same >machine two basic problems must be overcome. ></p> ><ul> > <li> ><b>Hardware isolation</b> - how to avoid two operating systems > accessing the same hardware at the same time.</li> > <li> ><b>Scheduling</b> - deciding how to allocate CPU time to an OS</li> ></ul> ><p> >Probably the most difficult of these problems is Hardware isolation. There > are two basic approaches to achieving <span class="code">hardware isolation</span>, <span class="code">hardware > emulation</span> and <span class="code">hardware virtualization</span>. ></p> ><p class="secthead"><a name="doc_chap1_sect3">Emulation vs Virtualization </a></p> ><p> >Emulation involves presenting a fake representation of the hardware to the >operating system. Emulation can allow you to run programs completely >independently of the underlying hardware but it tends to be slow. ></p> ><p> >The other approach, Virtualization attempts to use the hardware directly and >arbitrate its access at the hardware level. This approach tends to be much >faster but requires hardware support which is not currently found in consumer >hardware. ></p> ><p> >Xen takes an approach called <span class="code">para-virtualization</span> that has performance >similar to full virtualization, but that can be run on consumer level hardware. ></p> ><p class="secthead"><a name="doc_chap1_sect4">Para-virtualization </a></p> ><p> >Para-virtualization uses a software layer below the OS to arbitrate hardware >access and thus avoids the need for special hardware. OS's running under Xen >need to be modified so that for operations requiring arbitration, they access >the hypervisor rather then the hardware. ></p> ><p class="secthead"><a name="doc_chap1_sect5">Xen terminology </a></p> ><p> >In Xen OS instances (file system and associated kernel) are referred to as >domains. A domain that has direct access to hardware is referred to as a >privileged domain. In the default setup the base operating system (the one >everything is controlled from) is a privileged domain and all other domains >are unprivileged. ></p> ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b>The first privileged domain is referred to as <span class="code">domain0</span> and is used >to control all other domains</p></td></tr></table> ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b><span class="code">domainN</span> is used to refer to unprivileged domains</p></td></tr></table> ><p class="chaphead"><span class="chapnum"><a name="doc_chap2">2. </a></span>Gentoo in domain0</p> ><p class="secthead"><a name="doc_chap2_sect1">emerging the base components </a></p> ><p> >firstly you need to emerge the hypervisor and kernel source. The ><span class="code">app-emulation/xen</span> ebuild contains the hypervisor and a server for >communicating with the hypervisor. The <span class="code">sys-kernel/xen-sources</span> contains >a Linux kernel modified to run under the Xen hypervisor. ></p> ><a name="doc_chap2_pre1"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.1: emerge xen</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">emerge app-emulation/xen sys-kernel/xen-sources</span> ></pre></td></tr> ></table> ><p> >you will need to configure your kernel for the hardware in your system. To do >this change to the Xen sources directory then run make menuconfig. ></p> ><a name="doc_chap2_pre2"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.2: configure your kernel</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">cd /usr/src/linux-2.6.11.10-xen</span> ># <span class="input">make menuconfig</span> ></pre></td></tr> ></table> ><p> >This is the same as any other kernel except that there will be some extra >options for Xen related features. It is OK to remove drivers for hardware you >don't have but do not change any Xen options. ></p> > ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b>By default the required Xen settings are selected. You should only need >to change settings for you specific hardware</p></td></tr></table> > ><p> >The following Xen settings are required for an <span class="code">domain0</span> kernel. ></p> > ><a name="doc_chap2_pre3"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.3: configure basic Xen options</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ><span class="comment">(configure XEN settings)</span> >XEN ---> > [*] Privileged Guest (domain 0) > [*] Block-device backend driver > [*] Network-device backend driver > [*] Block-device frontend driver > [*] Network-device frontend driver > [ ] Piplined transmitter (DANGEROUS) > [*] Scrub memory before freeing it to Xen > Processor Type (X86) ---> ></pre></td></tr> ></table> > ><p> >Because we will be using LVM you need to have the <span class="code">Device mapper support</span> >selected. you should also select the appropriate drivers for you hard drive. ></p> > ><a name="doc_chap2_pre4"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.4: configure required devices</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ><span class="comment">(configure LVM support)</span> >Device Drivers ---> > Multi-device support (RAID and LVM) ---> > <*> Device mapper support > ><span class="comment">(if you are using ide drives at minimium set the following)</span> >Device Drivers ---> > ATA/ATAPI/MFM/RLL support ---> > <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support > > <*> Include IDE/ATA-2 DISK support > > <*> generic/default IDE chipset support > ></pre></td></tr> ></table> > ><p> >You need to make sure the <span class="code">/dev file system support</span> is not selected and >that all the file systems you are using are selected (i.e. ext3). You should >also make sure <span class="code">Advanced partition selection</span> is selected ></p> > ><a name="doc_chap2_pre5"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.5: select required filesystems</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ><span class="comment">(insure the /dev file system is not selected</span> >File systems ---> > Pseudo Filesystems ---> > [*] /proc file system support > <span class="input">[ ] /dev file system support (OBSOLETE)</span> > [*] Virtual memory file system support (former shm fs) > ><span class="comment">(Select one or more of the following options as needed by your system)</span> >File system ---> > <*> Reiserfs support > <*> Ext3 journalling file system support > <*> JFS filesystem support > <*> Second extended fs support > <*> XFS filesystem support > ><span class="comment">(At least this should selected)</span> >File system ---> > Partition Types ---> > [*] Advanced partition selection ></pre></td></tr> ></table> > ><p> >Now that your kernel is configured, it is time to compile and install it. Exit >the menuconfig and start the compilation process: ></p> > ><a name="doc_chap2_pre6"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.6: compile your kernel</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">make && make modules_install</span> ></pre></td></tr> ></table> > ><p> >When the kernel has finished compiling, copy the kernel image to /boot. ></p> > ><a name="doc_chap2_pre7"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.7: Installing the kernel</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">cp vmlinux /boot/vmlinux-syms-2.6.11.10-xen</span> ># <span class="input">cp vmlinuz /boot/vmlinuz-2.6.11.10-xen</span> ># <span class="input">cp System.map /boot/System.map-2.6.11.10-xen</span> ># <span class="input">cp .config /boot/config-2.6.11.10-xen</span> ></pre></td></tr> ></table> > ><p> >you will need to modify <span class="path">/boot/grub/grub.conf</span> so the the hypervisor >is run before the domain0 kernel is booted. ></p> > ><a name="doc_chap2_pre8"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.8: Editing /boot/grub/grub.conf</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">nano /boot/grub/grub.conf</span> ></pre></td></tr> ></table> > ><p> >add the following entry to the <span class="path">/boot/grub/grub.conf</span> file. ></p> > ><a name="doc_chap2_pre9"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 2.9: grub entry for xen</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> >title=Xen 2.0.6 / XenLinux 2.6.11.10 ><span class="comment"># You need to set the root partition to your boot partition.</span> >root (hd0,0) >kernel /xen.gz dom0_mem=131072 >module /vmlinuz-2.6.11.10-xen root=/dev/hda6 ></pre></td></tr> ></table> > ><p> >You should now reboot your system and check that the privileged <span class="code">domain0</span> >boots. ></p> > ><p class="chaphead"><span class="chapnum"><a name="doc_chap3">3. </a></span>Gentoo in domainN</p> ><p class="secthead"><a name="doc_chap3_sect1">creating the root partition </a></p> > ><p> >It is now time to setup the unprivileged domains. You will need to start by >creating partitions for your new operating systems. ></p> > ><p> >I have chosen the simplest partition scheme, a single root partition and a >swap file. The choice is mostly arbitrary. You can check out the ><a href="http://www.gentoo.org/doc/en/handbook/2005.0/handbook-x86.xml?part=1&chap=4#doc_chap2"> >Gentoo Linux x86 Handbook</a> for other possible partitioning schemes. ></p> > ><a name="doc_chap3_pre1"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.1: creating logical xen partitions</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">lvcreate -L2M -nxen1-root vg</span> ># <span class="input">lvcreate -L100M -nxen1-swap vg</span> ></pre></td></tr> ></table> > ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b>If you haven't already setup lvm read ><a href="http://www.gentoo.org/doc/en/lvm2.xml">Gentoo LVM2 installation</a> ></p></td></tr></table> > ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b><span class="code">vg</span> will be whatever you call your volume group</p></td></tr></table> > ><p> >Next we need to format the partitions. I have chosen to use ext3 but the >choice is arbitrary. ></p> > ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b>your xen kernel must be configured with support for the file system you >choose</p></td></tr></table> > ><a name="doc_chap3_pre2"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.2: Applying a file system on the root partition</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">mkfs.ext3 /dev/vg/xen1-root</span> ></pre></td></tr> ></table> ><a name="doc_chap3_pre3"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.3: Creating a Swap signature</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">mkswap /dev/vg/xen1-swap</span> ></pre></td></tr> ></table> ><p class="secthead"><a name="doc_chap3_sect2">Installing the OS </a></p> ><p> >The final stage is installing your OS on the new partition. This is mostly the >same as a normal install. ></p> ><p> >you will need to create the gentoo mount point and mount the root partition. ></p> ><a name="doc_chap3_pre4"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.4: Mounting partition</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">mkdir /mnt/gentoo</span> ># <span class="input">mount -t ext3 /dev/vg/xen1-root /mnt/gentoo</span> ></pre></td></tr> ></table> ><p> >You will need to get a tarball with one of the stages and unpack it to your ><span class="path">/mnt/gentoo</span> directory. If you don't know how to do this read ><a href="http://www.gentoo.org/doc/en/handbook/2005.0/handbook-x86.xml?part=1&chap=5"> >Gentoo Handbook chapter 5</a> ></p> ><p> >Now unpack your downloaded stage onto your system. We use GNU's <span class="code">tar</span> to >proceed as it is the easiest method: ></p> ><a name="doc_chap3_pre5"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.5: Unpacking the stage</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">cd /mnt/gentoo</span> ># <span class="input">tar -xvjpf stage3-<subarch>-2005.0.tar.bz2</span> ></pre></td></tr> ></table> ><p> >This will create the base folders. You will then need to bind the proc file >system to the mount point on the new partition. ></p> ><a name="doc_chap3_pre6"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.6: Binding /proc</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">mount --bind /proc /mnt/gentoo/proc</span> ></pre></td></tr> ></table> ><p> >We will be using nfs to access portage so we will bind the portage partition >from our main system. You will need to create the mount point then bind >portage to it. ></p> ><a name="doc_chap3_pre7"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.7: Binding /usr/portage</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">mkdir /mnt/gentoo/usr/portage</span> ># <span class="input">mount --bind /usr/portage /mnt/gentoo/usr/portage</span> ></pre></td></tr> ></table> ><p> >You should copy the <span class="path">/etc/resolve.conf</span> file and the ><span class="path">/etc/make.conf</span> to <span class="path">/mnt/gentoo/etc</span> ></p> ><a name="doc_chap3_pre8"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.8: Copying resolve.conf and make.conf</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">cp /etc/resolve.conf /mnt/gentoo/etc/resolve.conf</span> ># <span class="input">cp /etc/make.conf /mnt/gentoo/etc/make.conf</span> ></pre></td></tr> ></table> > ><p> >You should now chroot into the partition and continue the install >process. ></p> > ><a name="doc_chap3_pre9"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.9: Enter chroot</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">chroot /mnt/gentoo /bin/bash</span> ># <span class="input">env-update</span> ># <span class="input">source /etc/profile</span> ></pre></td></tr> ></table> > ><p> >When you edit your fstab file it should contain the root file system and >the swap file entries. ></p> > ><a name="doc_chap3_pre10"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.10: Editing /etc/fstab</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">nano /etc/fstab</span> ></pre></td></tr> ></table> > ><a name="doc_chap3_pre11"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.11: fstab entries</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ><span class="comment"># there is no boot partition so don't include it</span> >/dev/sda1 / ext2 noatime 0 0 >/dev/sda2 none swap sw 0 0 ></pre></td></tr> ></table> > ><table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#bbffbb"><p class="note"><b>Note: </b>You must have <span class="path">/dev/hdaN</span> entries in you <span class="code">domain0</span> >or the hypervisor will not be able to determine the major and minor for the >device.</p></td></tr></table> > ><p> >Set a static address because that is simple. ></p> > ><a name="doc_chap3_pre12"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.12: Editting /etc/conf.d/net</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">nano -w /etc/conf.d/net</span> ></pre></td></tr> ></table> > ><a name="doc_chap3_pre13"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.13: Setting static address</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> >iface_eth0="192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0" >gateway="eth0/192.168.0.1" ></pre></td></tr> ></table> > ><p> >Next edit the hosts file and add the hostname. ></p> > ><a name="doc_chap3_pre14"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.14: Editing /etc/hosts</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">nano -e /etc/hosts</span> ></pre></td></tr> ></table> > ><a name="doc_chap3_pre15"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.15: Add hostname</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> >127.0.0.1 localhost xen1 ></pre></td></tr> ></table> > ><p> >In order for the os to be started you need to create a configuration file as >follows. ></p> > ><a name="doc_chap3_pre16"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.16: Create startup file</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">nano /etc/xen/auto/xen1</span> ></pre></td></tr> ></table> > ><a name="doc_chap3_pre17"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.17: Xen startup file</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> >kernel = "/usr/src/linux-2.6.11.10-xen/vmlinuz" >memory = 128 >name = "xen1" >vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ] >disk = [ 'phy:0801,vg/xen1-root,hda1,w','phy:0802,vg/xen1-swap,hda2,w' ] >root = "/dev/hda1" ></pre></td></tr> ></table> > ><p> >Start the hypervisor access daemon and add it to the default domain. ></p> > ><a name="doc_chap3_pre18"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.18: Starting hypervisor daemon</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">/etc/init.d/xend start</span> ></pre></td></tr> ></table> > ><a name="doc_chap3_pre19"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.19: Add xend to default</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">rc-update add xend default</span> ></pre></td></tr> ></table> > ><p> >You can now start the new domain and display the domain boot sequence. ></p> > ><a name="doc_chap3_pre20"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.20: starting domain</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">xm create -c /etc/xen/auto/xen1</span> ></pre></td></tr> ></table> > ><p class="secthead"><a name="doc_chap3_sect3">the xm command </a></p> > ><p> >the <span class="input">xm</span> allows you to control the hypervisor. You can >use it to start and stop domains, to check domain status and number >of other hypervisor related functions. ></p> > ><p> >using the following command you can display the status of the >guest domains. ></p> > ><a name="doc_chap3_pre21"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.21: display domain status</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">xm list</span> ></pre></td></tr> ></table> > ><p> >using the following command you can stop a domain synchronously ></p> > ><a name="doc_chap3_pre22"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 3.22: stopping a domain</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">xm shutdown -H -w xen1</span> ></pre></td></tr> ></table> > ><p class="chaphead"><span class="chapnum"><a name="doc_chap4">4. </a></span>Tips/Tricks/Thoughts/Hacks/etc</p> ><p class="secthead"><a name="doc_chap4_sect1">disable tls </a></p> > ><p> >tls does not work directly with Xen and has to be emulated. This makes >tls libraries very slow. It is recommended that you disable tls for >domains running under Xen. ></p> > ><a name="doc_chap4_pre1"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 4.1: Editing /etc/make.conf</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">nano /etc/make.conf</span> ></pre></td></tr> ></table> > ><a name="doc_chap4_pre2"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 4.2: Unset tls</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> >USE="-tls ... " ></pre></td></tr> ></table> > ><a name="doc_chap4_pre3"></a><table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0"> ><tr><td class="infohead" bgcolor="#7a5ada"><p class="caption"> > Code listing 4.3: Disable tls</p></td></tr> ><tr><td bgcolor="#ddddff"><pre> ># <span class="input">mv /lib/tls /lib/tls.disable</span> ></pre></td></tr> ></table> ><p class="chaphead"><span class="chapnum"><a name="doc_chap5">5. </a></span>References</p> ><ul> > <li> > The main Xen <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/"> > homepage</a>, > <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/readmes/user/user.html"> > manual</a>, > <a href="http://wiki.xensource.com/xenwiki/XenFaq">FAQ</a>, and > <a href="http://lists.xensource.com/">mailing lists</a>. > </li> > <li> > A howto in the gentoo forums about Xen setup. > <a href="http://forums.gentoo.org/viewtopic-p-2462628.html#2462628">http://forums.gentoo.org/viewtopic-p-2462628.html#2462628</a> > </li> ></ul> ><br><tt> > The contents of this document are licensed under the <a href="http://creativecommons.org/licenses/by-sa/1.0">Creative Commons - Attribution / Share Alike</a> license. ></tt><br> ></td> ><td width="1%" bgcolor="#dddaec" valign="top"><table border="0" cellspacing="5" cellpadding="0"> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center" class="alttext"> > Updated 2005-06-16</td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td class="alttext"> > <b><a class="altlink" href="mailto:edwardmiddleton@k3.dion.ne.jp">Edward Middleton</a></b> ><br><i>Author</i><br><br> ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td class="alttext"> ><b>Summary:</b> >This guide describes how to install Xen Linux over an existing gentoo system >and how to create a second gentoo system to run in parallel with it. ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center"> ><p class="alttext"><b>Donate</b> to support our development efforts. > </p> ><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> ><input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="business" value="drobbins@gentoo.org"><input type="hidden" name="item_name" value="Gentoo Linux Support"><input type="hidden" name="item_number" value="1000"><input type="hidden" name="image_url" value="images/paypal.png"><input type="hidden" name="no_shipping" value="1"><input type="hidden" name="return" value="http://www.gentoo.org"><input type="hidden" name="cancel_return" value="http://www.gentoo.org"><input type="image" src="" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> ></form> ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center"><a href="http://store.gentoo.org"><img src="images/store.png" alt="The Gentoo Linux Store" border="0"></a></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center"> ><a href="http://www.phparch.com/bannerclick.php?AID=68&BID=1&BT=127929" target="_top"><img src="images/phpa-gentoo.gif" width="125" height="144" alt="php|architect" border="0"></a><p class="alttext"> > php|architect is the monthly magazine for PHP professionals, available > worldwide in print and electronic format. A percentage of all the sales > will be donated back into the Gentoo project. > </p> ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center"> ><a href="http://www.tek.net" target="_top"><img src="images/tek-gentoo.gif" width="125" height="125" alt="Tek Alchemy" border="0"></a><p class="alttext"> > Tek Alchemy offers dedicated servers and other hosting solutions running Gentoo Linux. > </p> ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center"> ><a href="http://www.qksrv.net/click-477620-5032687" target="_top"><img src="http://www.qksrv.net/image-477620-5032687" width="125" height="125" alt="DDR Memory at Crucial.com" border="0"></a><p class="alttext"> > Purchase RAM from <b>Crucial.com</b> and a percentage of your sale will go towards further Gentoo Linux development. > </p> ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ><tr><td align="center"> ><a href="http://www.netraverse.com/gentoo.htm" target="_top"><img src="images/netraverse-gentoo.gif" width="125" height="102" alt="Win4Lin at NeTraverse" border="0"></a><p class="alttext"> > Win4Lin from <b>NeTraverse</b> lets you run Windows applications under Gentoo Linux at native speeds. > </p> ></td></tr> ><tr><td><img src="images/line.gif" alt="line"></td></tr> ></table></td> ></tr></table></td></tr> ><tr><td colspan="2" align="right" class="infohead" width="100%" bgcolor="#7a5ada"> > Copyright 2001-2003 Gentoo Technologies, Inc. Questions, Comments, Corrections? Email <a class="highlight" href="mailto:www@gentoo.org">www@gentoo.org</a>. > </td></tr> ></table></body> ></html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 70161
:
43893
|
43894
|
43934
|
44961
|
44962
|
44963
|
44965
|
50718
|
51453
|
52423
|
52424
|
53755
|
53756
|
53757
|
53758
|
53759
|
56536
|
57185
|
57186
|
57187
|
57188
|
57189
|
57231
|
57232
|
57233
|
57234
|
57444
|
59355
|
59688
|
59694
|
59695
|
59703
|
59710
|
59947
|
60478
|
60552
|
60561
|
60562
|
60746
|
61091
|
61951
|
62232
| 62233 |
66585