- Use of trademark entities;

- Use of guimenu/guimenuitem/application tags where needed;
- Fix/add some userinput tags
- Try to be consistent on capitalization of dom0/domU
- s/X Window/X11
- Expand a bit the text regarding the commands to use to set up Xen.
This commit is contained in:
Marc Fonvieille 2007-04-09 17:02:39 +00:00
parent 325a5b3f4a
commit 1128d006b1
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=29978

View file

@ -40,7 +40,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para>How to install FreeBSD on an Intel-based Apple Macintosh <para>How to install FreeBSD on an &intel;-based &apple; &macintosh;
computer.</para> computer.</para>
</listitem> </listitem>
@ -79,19 +79,19 @@
<sect2 id="virtualization-guest-parallels"> <sect2 id="virtualization-guest-parallels">
<title>Parallels on MacOS</title> <title>Parallels on MacOS</title>
<para><application>Parallels Desktop</application> for Mac is a commercial software product <para><application>Parallels Desktop</application> for &mac; is a commercial software product
available for Intel based Apple Mac computers running MacOS available for &intel; based &apple; &mac; computers running &macos;
10.4.6 or higher. FreeBSD is a fully supported guest 10.4.6 or higher. FreeBSD is a fully supported guest
operating system. Once <application>Parallels</application> has been installed on MacOS operating system. Once <application>Parallels</application> has been installed on &macos;
X, the user must configure a virtual machine and then install X, the user must configure a virtual machine and then install
the desired guest operating system.</para> the desired guest operating system.</para>
<sect3 id="virtualization-guest-parallels-install"> <sect3 id="virtualization-guest-parallels-install">
<title>Installing FreeBSD on Parallels/MacOS X</title> <title>Installing FreeBSD on Parallels/&macos; X</title>
<para>The first step in installing FreeBSD on MacOS <para>The first step in installing FreeBSD on &macos;
X/<application>Parallels</application> is to create a new virtual machine for X/<application>Parallels</application> is to create a new virtual machine for
installing FreeBSD. Select 'FreeBSD' as the Guest OS Type installing FreeBSD. Select <guimenuitem>FreeBSD</guimenuitem> as the <guimenu>Guest OS Type</guimenu>
when prompted, and choose a reasonable amount of disk and when prompted, and choose a reasonable amount of disk and
memory depending on your plans for this virtual FreeBSD memory depending on your plans for this virtual FreeBSD
instance. 4GB and 512MB of RAM work well for most uses of instance. 4GB and 512MB of RAM work well for most uses of
@ -101,8 +101,8 @@
you will need to install FreeBSD on it. This is best done you will need to install FreeBSD on it. This is best done
with an official FreeBSD CDROM or with an ISO image with an official FreeBSD CDROM or with an ISO image
downloaded from an official FTP site. When you have the downloaded from an official FTP site. When you have the
appropriate ISO image on your local Mac filesystem or a appropriate ISO image on your local &mac; filesystem or a
CDROM in your Mac's CD drive, click on the disc icon in the CDROM in your &mac;'s CD drive, click on the disc icon in the
bottom right corner of your FreeBSD <application>Parallels</application> window. This bottom right corner of your FreeBSD <application>Parallels</application> window. This
will bring up a window that allows you to associate the will bring up a window that allows you to associate the
CDROM drive in your virtual machine with an ISO file on CDROM drive in your virtual machine with an ISO file on
@ -113,18 +113,18 @@
clicking the reboot icon. <application>Parallels</application> will reboot with a clicking the reboot icon. <application>Parallels</application> will reboot with a
special BIOS that first checks if you have a CDROM just as a special BIOS that first checks if you have a CDROM just as a
normal BIOS would do. In this case it will find the FreeBSD normal BIOS would do. In this case it will find the FreeBSD
installation media and begin a normal sysinstall based installation media and begin a normal <application>sysinstall</application> based
installation as described in <xref linkend="install">. You installation as described in <xref linkend="install">. You
may install, but do not attempt to configure X Window at may install, but do not attempt to configure X11 at
this time. When you have finished the installation, reboot this time. When you have finished the installation, reboot
into your newly installed FreeBSD virtual machine.</para> into your newly installed FreeBSD virtual machine.</para>
</sect3> </sect3>
<sect3 id="virtualization-guest-parallels-configure"> <sect3 id="virtualization-guest-parallels-configure">
<title>Configuring FreeBSD on MacOS X/Parallels</title> <title>Configuring FreeBSD on &macos; X/Parallels</title>
<para>After FreeBSD has been successfully installed on MacOS <para>After FreeBSD has been successfully installed on &macos;
X with <application>Parallels</application>, there are a number of configuration X with <application>Parallels</application>, there are a number of configuration
steps that can be taken to optimize the system for steps that can be taken to optimize the system for
virtualized operation.</para> virtualized operation.</para>
@ -143,7 +143,7 @@
<para>Without this setting, an idle FreeBSD <application>Parallels</application> guest <para>Without this setting, an idle FreeBSD <application>Parallels</application> guest
OS will use roughly 15% of the CPU of a single OS will use roughly 15% of the CPU of a single
processor iMac. After this change the usage will be processor &imac;. After this change the usage will be
closer to a mere 5%.</para> closer to a mere 5%.</para>
</step> </step>
@ -163,7 +163,7 @@
<para>The most basic networking setup involves simply <para>The most basic networking setup involves simply
using DHCP to connect your virtual machine to the same using DHCP to connect your virtual machine to the same
local area network as your host Mac. This can be local area network as your host &mac;. This can be
accomplished by adding accomplished by adding
<literal>ifconfig_ed0="DHCP"</literal> to <literal>ifconfig_ed0="DHCP"</literal> to
<filename>/etc/rc.conf</filename>. More advanced <filename>/etc/rc.conf</filename>. More advanced
@ -195,10 +195,12 @@
company. Guest operating systems are known as domU domains, company. Guest operating systems are known as domU domains,
and the host operating system is known as dom0. The first and the host operating system is known as dom0. The first
step in running a virtual FreeBSD instance under Linux is to install step in running a virtual FreeBSD instance under Linux is to install
<application>&xen;</application> for Linux dom0.</para> <application>&xen;</application> for Linux dom0. The host
operating system will be a Slackware Linux
distribution.</para>
<sect3 id="xen-slackware-dom0"> <sect3 id="xen-slackware-dom0">
<title>Setup &xen; 3 on Linux Dom0</title> <title>Setup &xen; 3 on Linux dom0</title>
<procedure> <procedure>
<step> <step>
@ -213,9 +215,9 @@
<step> <step>
<title>Unpack the tarball</title> <title>Unpack the tarball</title>
<screen>&prompt.root; cd xen-3.0.4_1-src <screen>&prompt.root; <userinput>cd xen-3.0.4_1-src</userinput>
&prompt.root; KERNELS="linux-2.6-xen0 linux-2.6-xenU" make world &prompt.root; <userinput>KERNELS="linux-2.6-xen0 linux-2.6-xenU" make world</userinput>
&prompt.root; make install</screen> &prompt.root; <userinput>make install</userinput></screen>
<note> <note>
<para>To re-compile the kernel for Dom0:</para> <para>To re-compile the kernel for Dom0:</para>
@ -233,7 +235,8 @@
<step> <step>
<title>Add a menu entry into Grub menu.lst</title> <title>Add a menu entry into Grub menu.lst</title>
<screen>&prompt.root; <userinput><command>vi</command> <filename>/boot/grub/menu.lst</filename></userinput></screen> <para>Edit <filename>/boot/grub/menu.lst</filename> and
add the following lines:</para>
<programlisting>title Xen-3.0.4 <programlisting>title Xen-3.0.4
root (hd0,0) root (hd0,0)
@ -244,14 +247,21 @@ module /boot/vmlinuz-2.6.16.33-xen0 root=/dev/hda1 ro</programlisting>
<step> <step>
<title>Reboot your computer into &xen;</title> <title>Reboot your computer into &xen;</title>
<screen>&prompt.root; <userinput><command>vi</command> <filename>/etc/xen/xend-config.sxp</filename></userinput> <para>First, edit
<filename>/etc/xen/xend-config.sxp</filename>, and add
the following line:</para>
(network-script 'network-bridge netdev=eth0')</screen> <programlisting>(network-script 'network-bridge netdev=eth0')</programlisting>
<para>Then, we can launch
<application>&xen;</application>:</para>
<screen>&prompt.root; <userinput>/etc/init.d/xend start</userinput> <screen>&prompt.root; <userinput>/etc/init.d/xend start</userinput>
&prompt.root; <userinput>/etc/init.d/xendomains start</userinput></screen> &prompt.root; <userinput>/etc/init.d/xendomains start</userinput></screen>
<screen>&prompt.root; <userinput><command>xm</command> list</userinput> <para>Our dom0 is running:</para>
<screen>&prompt.root; <userinput>xm list</userinput>
Name ID Mem VCPUs State Time(s) Name ID Mem VCPUs State Time(s)
Domain-0 0 256 1 r----- 54452.9</screen> Domain-0 0 256 1 r----- 54452.9</screen>
</step> </step>
@ -301,11 +311,11 @@ extra += ",vfs.root.mountfrom=ufs:/dev/xbd769a"</programlisting>
<para>Next, the __xen_guest section in <filename>kernel-current</filename> <para>Next, the __xen_guest section in <filename>kernel-current</filename>
needs to be altered to add the VIRT_BASE that <application>&xen; 3.0.3</application> requires:</para> needs to be altered to add the VIRT_BASE that <application>&xen; 3.0.3</application> requires:</para>
<screen>&prompt.root; <userinput><command>objcopy</command> <filename>kernel-current</filename> -R __xen_guest</userinput> <screen>&prompt.root; <userinput>objcopy kernel-current -R __xen_guest</userinput>
&prompt.root; <userinput><command>perl</command> -e 'print "LOADER=generic,GUEST_OS=freebsd,GUEST_VER=7.0,XEN_VER=xen-3.0,BSD_SYMTAB,VIRT_BASE=0xC0000000\x00"' &gt; <filename>tmp</filename></userinput> &prompt.root; <userinput>perl -e 'print "LOADER=generic,GUEST_OS=freebsd,GUEST_VER=7.0,XEN_VER=xen-3.0,BSD_SYMTAB,VIRT_BASE=0xC0000000\x00"' &gt; tmp</userinput>
&prompt.root; <userinput><command>objcopy</command> <filename>kernel-current</filename> --add-section __xen_guest=<filename>tmp</filename></userinput></screen> &prompt.root; <userinput>objcopy kernel-current --add-section __xen_guest=tmp</userinput></screen>
<screen>&prompt.root; <userinput><command>objdump</command> -j __xen_guest -s <filename>kernel-current</filename></userinput> <screen>&prompt.root; <userinput>objdump -j __xen_guest -s kernel-current</userinput>
kernel-current: file format elf32-i386 kernel-current: file format elf32-i386
@ -317,7 +327,9 @@ Contents of section __xen_guest:
0040 445f5359 4d544142 2c564952 545f4241 D_SYMTAB,VIRT_BA 0040 445f5359 4d544142 2c564952 545f4241 D_SYMTAB,VIRT_BA
0050 53453d30 78433030 30303030 3000 SE=0xC0000000. </screen> 0050 53453d30 78433030 30303030 3000 SE=0xC0000000. </screen>
<screen>&prompt.root; <userinput><command>xm</command> create <filename>/etc/xen/xmexample1.bsd</filename> -c</userinput> <para>We are, now, ready to create and launch our domU:</para>
<screen>&prompt.root; <userinput>xm create /etc/xen/xmexample1.bsd -c</userinput>
Using config file "/etc/xen/xmexample1.bsd". Using config file "/etc/xen/xmexample1.bsd".
Started domain freebsd Started domain freebsd
WARNING: loader(8) metadata is missing! WARNING: loader(8) metadata is missing!
@ -378,13 +390,19 @@ FreeBSD/i386 (demo.freebsd.org) (xc0)
login: </screen> login: </screen>
<screen>&prompt.root; <userinput><command>uname</command> -a</userinput> <para>The domU should run the &os;&nbsp;7.0-CURRENT
kernel:</para>
<screen>&prompt.root; <userinput>uname -a</userinput>
FreeBSD demo.freebsd.org 7.0-CURRENT FreeBSD 7.0-CURRENT #113: Wed Jan 4 06:25:43 UTC 2006 FreeBSD demo.freebsd.org 7.0-CURRENT FreeBSD 7.0-CURRENT #113: Wed Jan 4 06:25:43 UTC 2006
kmacy@freebsd7.gateway.2wire.net:/usr/home/kmacy/p4/freebsd7_xen3/src/sys/i386-xen/compile/XENCONF i386</screen> kmacy@freebsd7.gateway.2wire.net:/usr/home/kmacy/p4/freebsd7_xen3/src/sys/i386-xen/compile/XENCONF i386</screen>
<para>The network can now be configured on the domU. The &os;
domU will use a specific interface called
<devicename>xn0</devicename>:</para>
<screen>&prompt.root; <userinput><command>ifconfig</command> xn0 10.10.10.200 netmask 255.0.0.0</userinput> <screen>&prompt.root; <userinput>ifconfig xn0 10.10.10.200 netmask 255.0.0.0</userinput>
&prompt.root; <userinput><command>ifconfig</command></userinput> &prompt.root; <userinput>ifconfig</userinput>
xn0: flags=843&lt;UP,BROADCAST,RUNNING,SIMPLEX&gt; mtu 1500 xn0: flags=843&lt;UP,BROADCAST,RUNNING,SIMPLEX&gt; mtu 1500
inet 10.10.10.200 netmask 0xff000000 broadcast 10.255.255.255 inet 10.10.10.200 netmask 0xff000000 broadcast 10.255.255.255
ether 00:16:3e:6b:de:3a ether 00:16:3e:6b:de:3a
@ -393,9 +411,10 @@ lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000 </screen> inet 127.0.0.1 netmask 0xff000000 </screen>
<para>On Dom0 Slackware:</para> <para>On dom0 Slackware, some <application>&xen;</application>
dependant network interfaces should show up:</para>
<screen>&prompt.root; <userinput><command>ifconfig</command></userinput> <screen>&prompt.root; <userinput>ifconfig</userinput>
eth0 Link encap:Ethernet HWaddr 00:07:E9:A0:02:C2 eth0 Link encap:Ethernet HWaddr 00:07:E9:A0:02:C2
inet addr:10.10.10.130 Bcast:0.0.0.0 Mask:255.0.0.0 inet addr:10.10.10.130 Bcast:0.0.0.0 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
@ -441,7 +460,7 @@ xenbr1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
collisions:0 txqueuelen:0 collisions:0 txqueuelen:0
RX bytes:112 (112.0 b) TX bytes:0 (0.0 b)</screen> RX bytes:112 (112.0 b) TX bytes:0 (0.0 b)</screen>
<screen>&prompt.root; <userinput><command>brctl</command> show</userinput> <screen>&prompt.root; <userinput>brctl show</userinput>
bridge name bridge id STP enabled interfaces bridge name bridge id STP enabled interfaces
xenbr1 8000.feffffffffff no vif0.1 xenbr1 8000.feffffffffff no vif0.1
peth0 peth0
@ -451,7 +470,7 @@ xenbr1 8000.feffffffffff no vif0.1
</sect2> </sect2>
<sect2 id="virtualization-guest-vmware"> <sect2 id="virtualization-guest-vmware">
<title>VMware on Windows/Mac/Linux</title> <title>VMware on &windows;/&mac;/&linux;</title>
<para>This section has yet to be written.</para> <para>This section has yet to be written.</para>